blob: eb5d19eee2401ff367c26c9e90c1fbc81b443ccd [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.
Charles-François Natali6613c182011-11-27 12:41:06 +01004# Generated by GNU Autoconf 2.67 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010# 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
Charles-François Natali6613c182011-11-27 12:41:06 +0100224 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"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000323 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000363# 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000367# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000370 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000375 $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.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000537# 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'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000556PACKAGE_VERSION='3.2'
557PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000601SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000602LIBC
603LIBM
604HAVE_GETHOSTBYNAME
605HAVE_GETHOSTBYNAME_R
606HAVE_GETHOSTBYNAME_R_3_ARG
607HAVE_GETHOSTBYNAME_R_5_ARG
608HAVE_GETHOSTBYNAME_R_6_ARG
609LIBOBJS
610TRUE
611MACHDEP_OBJS
612DYNLOADFILE
613DLINCLDIR
614THREADOBJ
615LDLAST
616USE_THREAD_MODULE
617SIGNAL_OBJS
618USE_SIGNAL_MODULE
619LIBFFI_INCLUDEDIR
620PKG_CONFIG
621SHLIBS
622CFLAGSFORSHARED
623LINKFORSHARED
624CCSHARED
625BLDSHARED
626LDCXXSHARED
627LDSHARED
628SO
629LIBTOOL_CRUFT
630OTHER_LIBTOOL_OPT
631UNIVERSAL_ARCH_FLAGS
632BASECFLAGS
633OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000634ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000635LN
636INSTALL_DATA
637INSTALL_SCRIPT
638INSTALL_PROGRAM
Georg Brandl187c1112011-07-03 09:23:20 +0200639HAS_PYTHON
640DISABLE_ASDLGEN
Georg Brandl1ca2e792011-03-05 20:51:24 +0100641HAS_HG
642HGBRANCH
643HGTAG
644HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000645SVNVERSION
646ARFLAGS
647AR
648RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000649USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000650GNULD
651LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000652LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000653RUNSHARED
654INSTSONAME
655LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000656PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000657BLDLIBRARY
658DLLLIBRARY
659LDLIBRARY
660LIBRARY
661BUILDEXEEXT
662EGREP
663GREP
664CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200665NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000666MAINCC
667CXX
668OBJEXT
669EXEEXT
670ac_ct_CC
671CPPFLAGS
672LDFLAGS
673CFLAGS
674CC
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CONFIGURE_MACOSX_DEPLOYMENT_TARGET
677SGI_ABI
678MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000679FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000680FRAMEWORKUNIXTOOLSPREFIX
681FRAMEWORKALTINSTALLLAST
682FRAMEWORKALTINSTALLFIRST
683FRAMEWORKINSTALLLAST
684FRAMEWORKINSTALLFIRST
685PYTHONFRAMEWORKINSTALLDIR
686PYTHONFRAMEWORKPREFIX
687PYTHONFRAMEWORKDIR
688PYTHONFRAMEWORKIDENTIFIER
689PYTHONFRAMEWORK
690LIPO_32BIT_FLAGS
691ARCH_RUN_32BIT
692UNIVERSALSDK
693CONFIG_ARGS
694SOVERSION
695VERSION
696target_alias
697host_alias
698build_alias
699LIBS
700ECHO_T
701ECHO_N
702ECHO_C
703DEFS
704mandir
705localedir
706libdir
707psdir
708pdfdir
709dvidir
710htmldir
711infodir
712docdir
713oldincludedir
714includedir
715localstatedir
716sharedstatedir
717sysconfdir
718datadir
719datarootdir
720libexecdir
721sbindir
722bindir
723program_transform_name
724prefix
725exec_prefix
726PACKAGE_URL
727PACKAGE_BUGREPORT
728PACKAGE_STRING
729PACKAGE_VERSION
730PACKAGE_TARNAME
731PACKAGE_NAME
732PATH_SEPARATOR
733SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000734ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000735ac_user_opts='
736enable_option_checking
737enable_universalsdk
738with_universal_archs
739with_framework_name
740enable_framework
741with_gcc
742with_cxx_main
743with_suffix
744enable_shared
745enable_profiling
746with_pydebug
747with_libs
748with_system_expat
749with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000750enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000751with_dbmliborder
752with_signal_module
753with_dec_threads
754with_threads
755with_thread
756enable_ipv6
757with_doc_strings
758with_tsc
759with_pymalloc
760with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000761with_fpectl
762with_libm
763with_libc
764enable_big_digits
765with_wide_unicode
766with_computed_gotos
767'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000768 ac_precious_vars='build_alias
769host_alias
770target_alias
771CC
772CFLAGS
773LDFLAGS
774LIBS
775CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000776CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777
Guido van Rossum627b2d71993-12-24 10:39:16 +0000778
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000780ac_init_help=
781ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000782ac_unrecognized_opts=
783ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# The variables have the same names as the options, with
785# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000786cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000789no_recursion=
790prefix=NONE
791program_prefix=NONE
792program_suffix=NONE
793program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798x_includes=NONE
799x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000800
801# Installation directory options.
802# These are left unexpanded so users can "make install exec_prefix=/foo"
803# and all the variables that are supposed to be based on exec_prefix
804# by default will actually change.
805# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000807bindir='${exec_prefix}/bin'
808sbindir='${exec_prefix}/sbin'
809libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810datarootdir='${prefix}/share'
811datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812sysconfdir='${prefix}/etc'
813sharedstatedir='${prefix}/com'
814localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815includedir='${prefix}/include'
816oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
818infodir='${datarootdir}/info'
819htmldir='${docdir}'
820dvidir='${docdir}'
821pdfdir='${docdir}'
822psdir='${docdir}'
823libdir='${exec_prefix}/lib'
824localedir='${datarootdir}/locale'
825mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000830do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831 # If the previous option needs an argument, assign it.
832 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834 ac_prev=
835 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000836 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000839 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
840 *=) ac_optarg= ;;
841 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844 # Accept the important Cygnus configure options, so we can diagnose typos.
845
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 case $ac_dashdash$ac_option in
847 --)
848 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850 -bindir | --bindir | --bindi | --bind | --bin | --bi)
851 ac_prev=bindir ;;
852 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854
855 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860 -cache-file | --cache-file | --cache-fil | --cache-fi \
861 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
862 ac_prev=cache_file ;;
863 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
864 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000865 cache_file=$ac_optarg ;;
866
867 --config-cache | -C)
868 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
876 | --dataroo | --dataro | --datar)
877 ac_prev=datarootdir ;;
878 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
879 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
880 datarootdir=$ac_optarg ;;
881
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000883 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000885 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000886 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000887 ac_useropt_orig=$ac_useropt
888 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
889 case $ac_user_opts in
890 *"
891"enable_$ac_useropt"
892"*) ;;
893 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
894 ac_unrecognized_sep=', ';;
895 esac
896 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897
898 -docdir | --docdir | --docdi | --doc | --do)
899 ac_prev=docdir ;;
900 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
901 docdir=$ac_optarg ;;
902
903 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
904 ac_prev=dvidir ;;
905 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
906 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
908 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000909 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000911 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000912 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000913 ac_useropt_orig=$ac_useropt
914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
915 case $ac_user_opts in
916 *"
917"enable_$ac_useropt"
918"*) ;;
919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
920 ac_unrecognized_sep=', ';;
921 esac
922 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
925 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
926 | --exec | --exe | --ex)
927 ac_prev=exec_prefix ;;
928 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
929 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
930 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
933 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Obsolete; use --with-gas.
935 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 -help | --help | --hel | --he | -h)
938 ac_init_help=long ;;
939 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
940 ac_init_help=recursive ;;
941 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
942 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
944 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
950 ac_prev=htmldir ;;
951 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
952 | --ht=*)
953 htmldir=$ac_optarg ;;
954
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 -includedir | --includedir | --includedi | --included | --include \
956 | --includ | --inclu | --incl | --inc)
957 ac_prev=includedir ;;
958 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
959 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
962 -infodir | --infodir | --infodi | --infod | --info | --inf)
963 ac_prev=infodir ;;
964 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -libdir | --libdir | --libdi | --libd)
968 ac_prev=libdir ;;
969 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
973 | --libexe | --libex | --libe)
974 ac_prev=libexecdir ;;
975 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
976 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 -localedir | --localedir | --localedi | --localed | --locale)
980 ac_prev=localedir ;;
981 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
982 localedir=$ac_optarg ;;
983
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000985 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986 ac_prev=localstatedir ;;
987 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000988 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990
991 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
992 ac_prev=mandir ;;
993 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 # Obsolete; use --without-fp.
998 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 no_create=yes ;;
1003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1009 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1010 | --oldin | --oldi | --old | --ol | --o)
1011 ac_prev=oldincludedir ;;
1012 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1013 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1014 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1018 ac_prev=prefix ;;
1019 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1023 | --program-pre | --program-pr | --program-p)
1024 ac_prev=program_prefix ;;
1025 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1026 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1030 | --program-suf | --program-su | --program-s)
1031 ac_prev=program_suffix ;;
1032 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1033 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -program-transform-name | --program-transform-name \
1037 | --program-transform-nam | --program-transform-na \
1038 | --program-transform-n | --program-transform- \
1039 | --program-transform | --program-transfor \
1040 | --program-transfo | --program-transf \
1041 | --program-trans | --program-tran \
1042 | --progr-tra | --program-tr | --program-t)
1043 ac_prev=program_transform_name ;;
1044 -program-transform-name=* | --program-transform-name=* \
1045 | --program-transform-nam=* | --program-transform-na=* \
1046 | --program-transform-n=* | --program-transform-=* \
1047 | --program-transform=* | --program-transfor=* \
1048 | --program-transfo=* | --program-transf=* \
1049 | --program-trans=* | --program-tran=* \
1050 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001053 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1054 ac_prev=pdfdir ;;
1055 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1056 pdfdir=$ac_optarg ;;
1057
1058 -psdir | --psdir | --psdi | --psd | --ps)
1059 ac_prev=psdir ;;
1060 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1061 psdir=$ac_optarg ;;
1062
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1064 | -silent | --silent | --silen | --sile | --sil)
1065 silent=yes ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1068 ac_prev=sbindir ;;
1069 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1070 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1074 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1075 | --sharedst | --shareds | --shared | --share | --shar \
1076 | --sha | --sh)
1077 ac_prev=sharedstatedir ;;
1078 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1079 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1080 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1081 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 -site | --site | --sit)
1085 ac_prev=site ;;
1086 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1090 ac_prev=srcdir ;;
1091 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1095 | --syscon | --sysco | --sysc | --sys | --sy)
1096 ac_prev=sysconfdir ;;
1097 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1098 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1107 verbose=yes ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 -version | --version | --versio | --versi | --vers | -V)
1110 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001113 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001115 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001116 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 ac_useropt_orig=$ac_useropt
1118 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1119 case $ac_user_opts in
1120 *"
1121"with_$ac_useropt"
1122"*) ;;
1123 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1124 ac_unrecognized_sep=', ';;
1125 esac
1126 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
1128 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001129 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001131 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001132 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001133 ac_useropt_orig=$ac_useropt
1134 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1135 case $ac_user_opts in
1136 *"
1137"with_$ac_useropt"
1138"*) ;;
1139 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1140 ac_unrecognized_sep=', ';;
1141 esac
1142 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144 --x)
1145 # Obsolete; use --with-x.
1146 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1149 | --x-incl | --x-inc | --x-in | --x-i)
1150 ac_prev=x_includes ;;
1151 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1152 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1156 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1157 ac_prev=x_libraries ;;
1158 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1159 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001162 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1163Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164 ;;
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 *=*)
1167 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1168 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 case $ac_envvar in #(
1170 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001171 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001173 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 export $ac_envvar ;;
1175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001178 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001180 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Charles-François Natali6613c182011-11-27 12:41:06 +01001181 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 ;;
1183
1184 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001185done
1186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001189 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190fi
1191
Matthias Kloseb9621712010-04-24 17:59:49 +00001192if test -n "$ac_unrecognized_opts"; then
1193 case $enable_option_checking in
1194 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001195 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1197 esac
1198fi
1199
1200# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001201for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1202 datadir sysconfdir sharedstatedir localstatedir includedir \
1203 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1204 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 # Remove trailing slashes.
1208 case $ac_val in
1209 */ )
1210 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1211 eval $ac_var=\$ac_val;;
1212 esac
1213 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215 [\\/$]* | ?:[\\/]* ) continue;;
1216 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001218 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001219done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001220
Martin v. Löwis11437992002-04-12 09:54:03 +00001221# There might be people who depend on the old broken behavior: `$host'
1222# used to hold the argument of --host etc.
1223# FIXME: To remove some day.
1224build=$build_alias
1225host=$host_alias
1226target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001227
Martin v. Löwis11437992002-04-12 09:54:03 +00001228# FIXME: To remove some day.
1229if test "x$host_alias" != x; then
1230 if test "x$build_alias" = x; then
1231 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001232 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1233 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 elif test "x$build_alias" != "x$host_alias"; then
1235 cross_compiling=yes
1236 fi
1237fi
1238
1239ac_tool_prefix=
1240test -n "$host_alias" && ac_tool_prefix=$host_alias-
1241
1242test "$silent" = yes && exec 6>/dev/null
1243
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245ac_pwd=`pwd` && test -n "$ac_pwd" &&
1246ac_ls_di=`ls -di .` &&
1247ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001248 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001250 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251
1252
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253# Find the source files, if location was not specified.
1254if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 ac_confdir=`$as_dirname -- "$as_myself" ||
1258$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1259 X"$as_myself" : 'X\(//\)[^/]' \| \
1260 X"$as_myself" : 'X\(//\)$' \| \
1261 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1262$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)[^/].*/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)$/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\).*/{
1276 s//\1/
1277 q
1278 }
1279 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282 srcdir=..
1283 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284else
1285 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287if test ! -r "$srcdir/$ac_unique_file"; then
1288 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001289 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1292ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001293 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294 pwd)`
1295# When building in place, set srcdir=.
1296if test "$ac_abs_confdir" = "$ac_pwd"; then
1297 srcdir=.
1298fi
1299# Remove unnecessary trailing slashes from srcdir.
1300# Double slashes in file names in object file debugging info
1301# mess up M-x gdb in Emacs.
1302case $srcdir in
1303*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1304esac
1305for ac_var in $ac_precious_vars; do
1306 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1307 eval ac_env_${ac_var}_value=\$${ac_var}
1308 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1309 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1310done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312#
1313# Report the --help message.
1314#
1315if test "$ac_init_help" = "long"; then
1316 # Omit some internal or obsolete options to make the list less imposing.
1317 # This message is too long to be a string in the A/UX 3.1 sh.
1318 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001319\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001320
1321Usage: $0 [OPTION]... [VAR=VALUE]...
1322
1323To assign environment variables (e.g., CC, CFLAGS...), specify them as
1324VAR=VALUE. See below for descriptions of some of the useful variables.
1325
1326Defaults for the options are specified in brackets.
1327
1328Configuration:
1329 -h, --help display this help and exit
1330 --help=short display options specific to this package
1331 --help=recursive display the short help of all the included packages
1332 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001333 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001334 --cache-file=FILE cache test results in FILE [disabled]
1335 -C, --config-cache alias for \`--cache-file=config.cache'
1336 -n, --no-create do not create output files
1337 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1338
Martin v. Löwis11437992002-04-12 09:54:03 +00001339Installation directories:
1340 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001342 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001343 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001344
1345By default, \`make install' will install all the files in
1346\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1347an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1348for instance \`--prefix=\$HOME'.
1349
1350For better control, use the options below.
1351
1352Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001353 --bindir=DIR user executables [EPREFIX/bin]
1354 --sbindir=DIR system admin executables [EPREFIX/sbin]
1355 --libexecdir=DIR program executables [EPREFIX/libexec]
1356 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1357 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1358 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1359 --libdir=DIR object code libraries [EPREFIX/lib]
1360 --includedir=DIR C header files [PREFIX/include]
1361 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1362 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1363 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1364 --infodir=DIR info documentation [DATAROOTDIR/info]
1365 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1366 --mandir=DIR man documentation [DATAROOTDIR/man]
1367 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1368 --htmldir=DIR html documentation [DOCDIR]
1369 --dvidir=DIR dvi documentation [DOCDIR]
1370 --pdfdir=DIR pdf documentation [DOCDIR]
1371 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001372_ACEOF
1373
1374 cat <<\_ACEOF
1375_ACEOF
1376fi
1377
1378if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001379 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001380 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001381 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 cat <<\_ACEOF
1383
1384Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1387 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001388 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001389 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001390 --enable-framework[=INSTALLDIR]
1391 Build (MacOSX|Darwin) framework
1392 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001393 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001394 --enable-loadable-sqlite-extensions
1395 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001396 --enable-ipv6 Enable ipv6 (with ipv4) support
1397 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001398 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001399 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401Optional Packages:
1402 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1403 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001404 --with-universal-archs=ARCH
1405 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001406 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001407 --with-framework-name=FRAMEWORK
1408 specify an alternate name of the framework built
1409 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001411 --with-cxx-main=<compiler>
1412 compile main() and link python executable with C++
1413 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --with-suffix=.exe set executable suffix
1415 --with-pydebug build with Py_DEBUG defined
1416 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001417 --with-system-expat build pyexpat module using an installed expat
1418 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001419 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001420 --with-dbmliborder=db1:db2:...
1421 order to check db backends for dbm. Valid value is a
1422 colon separated string with the backend names
1423 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --with-signal-module disable/enable signal module
1425 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1426 --with(out)-threads[=DIRECTORY]
1427 disable/enable thread support
1428 --with(out)-thread[=DIRECTORY]
1429 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001431 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001433 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with-fpectl enable SIGFPE catching
1435 --with-libm=STRING math library
1436 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001437 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001438 --with(out)-computed-gotos
1439 Use computed gotos in evaluation loop (enabled by
1440 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001441
1442Some influential environment variables:
1443 CC C compiler command
1444 CFLAGS C compiler flags
1445 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1446 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001447 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001448 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 CPP C preprocessor
1451
1452Use these variables to override the choices made by `configure' or to help
1453it to find libraries and programs with nonstandard names/locations.
1454
Georg Brandle2e15612009-05-20 18:25:10 +00001455Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001458fi
1459
1460if test "$ac_init_help" = "recursive"; then
1461 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001463 test -d "$ac_dir" ||
1464 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1465 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 ac_builddir=.
1467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001468case "$ac_dir" in
1469.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1470*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001471 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 case $ac_top_builddir_sub in
1475 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1476 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1477 esac ;;
1478esac
1479ac_abs_top_builddir=$ac_pwd
1480ac_abs_builddir=$ac_pwd$ac_dir_suffix
1481# for backward compatibility:
1482ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001483
1484case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 ac_top_srcdir=$ac_top_builddir_sub
1488 ac_abs_top_srcdir=$ac_pwd ;;
1489 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 ac_top_srcdir=$srcdir
1492 ac_abs_top_srcdir=$srcdir ;;
1493 *) # Relative name.
1494 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1495 ac_top_srcdir=$ac_top_build_prefix$srcdir
1496 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001497esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001499
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500 cd "$ac_dir" || { ac_status=$?; continue; }
1501 # Check for guested configure.
1502 if test -f "$ac_srcdir/configure.gnu"; then
1503 echo &&
1504 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1505 elif test -f "$ac_srcdir/configure"; then
1506 echo &&
1507 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001509 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 fi || ac_status=$?
1511 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 done
1513fi
1514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001516if $ac_init_version; then
1517 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001518python configure 3.2
Charles-François Natali6613c182011-11-27 12:41:06 +01001519generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001520
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001521Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522This configure script is free software; the Free Software Foundation
1523gives unlimited permission to copy, distribute and modify it.
1524_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001527
1528## ------------------------ ##
1529## Autoconf initialization. ##
1530## ------------------------ ##
1531
1532# ac_fn_c_try_compile LINENO
1533# --------------------------
1534# Try to compile conftest.$ac_ext, and return whether this succeeded.
1535ac_fn_c_try_compile ()
1536{
1537 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1538 rm -f conftest.$ac_objext
1539 if { { ac_try="$ac_compile"
1540case "(($ac_try" in
1541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1542 *) ac_try_echo=$ac_try;;
1543esac
1544eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1545$as_echo "$ac_try_echo"; } >&5
1546 (eval "$ac_compile") 2>conftest.err
1547 ac_status=$?
1548 if test -s conftest.err; then
1549 grep -v '^ *+' conftest.err >conftest.er1
1550 cat conftest.er1 >&5
1551 mv -f conftest.er1 conftest.err
1552 fi
1553 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1554 test $ac_status = 0; } && {
1555 test -z "$ac_c_werror_flag" ||
1556 test ! -s conftest.err
1557 } && test -s conftest.$ac_objext; then :
1558 ac_retval=0
1559else
1560 $as_echo "$as_me: failed program was:" >&5
1561sed 's/^/| /' conftest.$ac_ext >&5
1562
1563 ac_retval=1
1564fi
Charles-François Natali6613c182011-11-27 12:41:06 +01001565 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 as_fn_set_status $ac_retval
1567
1568} # ac_fn_c_try_compile
1569
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001570# ac_fn_c_try_link LINENO
1571# -----------------------
1572# Try to link conftest.$ac_ext, and return whether this succeeded.
1573ac_fn_c_try_link ()
1574{
1575 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1576 rm -f conftest.$ac_objext conftest$ac_exeext
1577 if { { ac_try="$ac_link"
1578case "(($ac_try" in
1579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1580 *) ac_try_echo=$ac_try;;
1581esac
1582eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1583$as_echo "$ac_try_echo"; } >&5
1584 (eval "$ac_link") 2>conftest.err
1585 ac_status=$?
1586 if test -s conftest.err; then
1587 grep -v '^ *+' conftest.err >conftest.er1
1588 cat conftest.er1 >&5
1589 mv -f conftest.er1 conftest.err
1590 fi
1591 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1592 test $ac_status = 0; } && {
1593 test -z "$ac_c_werror_flag" ||
1594 test ! -s conftest.err
1595 } && test -s conftest$ac_exeext && {
1596 test "$cross_compiling" = yes ||
1597 $as_test_x conftest$ac_exeext
1598 }; then :
1599 ac_retval=0
1600else
1601 $as_echo "$as_me: failed program was:" >&5
1602sed 's/^/| /' conftest.$ac_ext >&5
1603
1604 ac_retval=1
1605fi
1606 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1607 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1608 # interfere with the next link command; also delete a directory that is
1609 # left behind by Apple's compiler. We do this before executing the actions.
1610 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali6613c182011-11-27 12:41:06 +01001611 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001612 as_fn_set_status $ac_retval
1613
1614} # ac_fn_c_try_link
1615
Matthias Kloseb9621712010-04-24 17:59:49 +00001616# ac_fn_c_try_cpp LINENO
1617# ----------------------
1618# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1619ac_fn_c_try_cpp ()
1620{
1621 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1622 if { { ac_try="$ac_cpp conftest.$ac_ext"
1623case "(($ac_try" in
1624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1625 *) ac_try_echo=$ac_try;;
1626esac
1627eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1628$as_echo "$ac_try_echo"; } >&5
1629 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1630 ac_status=$?
1631 if test -s conftest.err; then
1632 grep -v '^ *+' conftest.err >conftest.er1
1633 cat conftest.er1 >&5
1634 mv -f conftest.er1 conftest.err
1635 fi
1636 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001637 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001638 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1639 test ! -s conftest.err
1640 }; then :
1641 ac_retval=0
1642else
1643 $as_echo "$as_me: failed program was:" >&5
1644sed 's/^/| /' conftest.$ac_ext >&5
1645
1646 ac_retval=1
1647fi
Charles-François Natali6613c182011-11-27 12:41:06 +01001648 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001649 as_fn_set_status $ac_retval
1650
1651} # ac_fn_c_try_cpp
1652
1653# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1654# -------------------------------------------------------
1655# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1656# the include files in INCLUDES and setting the cache variable VAR
1657# accordingly.
1658ac_fn_c_check_header_mongrel ()
1659{
1660 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Charles-François Natali6613c182011-11-27 12:41:06 +01001661 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1663$as_echo_n "checking for $2... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001664if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001665 $as_echo_n "(cached) " >&6
1666fi
1667eval ac_res=\$$3
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1669$as_echo "$ac_res" >&6; }
1670else
1671 # Is the header compilable?
1672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1673$as_echo_n "checking $2 usability... " >&6; }
1674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1675/* end confdefs.h. */
1676$4
1677#include <$2>
1678_ACEOF
1679if ac_fn_c_try_compile "$LINENO"; then :
1680 ac_header_compiler=yes
1681else
1682 ac_header_compiler=no
1683fi
1684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1686$as_echo "$ac_header_compiler" >&6; }
1687
1688# Is the header present?
1689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1690$as_echo_n "checking $2 presence... " >&6; }
1691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1692/* end confdefs.h. */
1693#include <$2>
1694_ACEOF
1695if ac_fn_c_try_cpp "$LINENO"; then :
1696 ac_header_preproc=yes
1697else
1698 ac_header_preproc=no
1699fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001700rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1702$as_echo "$ac_header_preproc" >&6; }
1703
1704# So? What about this header?
1705case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1706 yes:no: )
1707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1708$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1710$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1711 ;;
1712 no:yes:* )
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1714$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1716$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1718$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1720$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1722$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001723( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001724## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001725## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001726 ) | sed "s/^/$as_me: WARNING: /" >&2
1727 ;;
1728esac
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1730$as_echo_n "checking for $2... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001731if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001732 $as_echo_n "(cached) " >&6
1733else
1734 eval "$3=\$ac_header_compiler"
1735fi
1736eval ac_res=\$$3
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1738$as_echo "$ac_res" >&6; }
1739fi
Charles-François Natali6613c182011-11-27 12:41:06 +01001740 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001741
1742} # ac_fn_c_check_header_mongrel
1743
1744# ac_fn_c_try_run LINENO
1745# ----------------------
1746# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1747# that executables *can* be run.
1748ac_fn_c_try_run ()
1749{
1750 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1751 if { { ac_try="$ac_link"
1752case "(($ac_try" in
1753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1754 *) ac_try_echo=$ac_try;;
1755esac
1756eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1757$as_echo "$ac_try_echo"; } >&5
1758 (eval "$ac_link") 2>&5
1759 ac_status=$?
1760 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1761 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1762 { { case "(($ac_try" in
1763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1764 *) ac_try_echo=$ac_try;;
1765esac
1766eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1767$as_echo "$ac_try_echo"; } >&5
1768 (eval "$ac_try") 2>&5
1769 ac_status=$?
1770 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1771 test $ac_status = 0; }; }; then :
1772 ac_retval=0
1773else
1774 $as_echo "$as_me: program exited with status $ac_status" >&5
1775 $as_echo "$as_me: failed program was:" >&5
1776sed 's/^/| /' conftest.$ac_ext >&5
1777
1778 ac_retval=$ac_status
1779fi
1780 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali6613c182011-11-27 12:41:06 +01001781 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 as_fn_set_status $ac_retval
1783
1784} # ac_fn_c_try_run
1785
1786# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1787# -------------------------------------------------------
1788# Tests whether HEADER exists and can be compiled using the include files in
1789# INCLUDES, setting the cache variable VAR accordingly.
1790ac_fn_c_check_header_compile ()
1791{
1792 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1794$as_echo_n "checking for $2... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001795if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001796 $as_echo_n "(cached) " >&6
1797else
1798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1799/* end confdefs.h. */
1800$4
1801#include <$2>
1802_ACEOF
1803if ac_fn_c_try_compile "$LINENO"; then :
1804 eval "$3=yes"
1805else
1806 eval "$3=no"
1807fi
1808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1809fi
1810eval ac_res=\$$3
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1812$as_echo "$ac_res" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001813 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001814
1815} # ac_fn_c_check_header_compile
1816
Matthias Kloseb9621712010-04-24 17:59:49 +00001817# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1818# -------------------------------------------
1819# Tests whether TYPE exists after having included INCLUDES, setting cache
1820# variable VAR accordingly.
1821ac_fn_c_check_type ()
1822{
1823 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1825$as_echo_n "checking for $2... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001826if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001827 $as_echo_n "(cached) " >&6
1828else
1829 eval "$3=no"
1830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831/* end confdefs.h. */
1832$4
1833int
1834main ()
1835{
1836if (sizeof ($2))
1837 return 0;
1838 ;
1839 return 0;
1840}
1841_ACEOF
1842if ac_fn_c_try_compile "$LINENO"; then :
1843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1844/* end confdefs.h. */
1845$4
1846int
1847main ()
1848{
1849if (sizeof (($2)))
1850 return 0;
1851 ;
1852 return 0;
1853}
1854_ACEOF
1855if ac_fn_c_try_compile "$LINENO"; then :
1856
1857else
1858 eval "$3=yes"
1859fi
1860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1861fi
1862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1863fi
1864eval ac_res=\$$3
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1866$as_echo "$ac_res" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001867 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001868
1869} # ac_fn_c_check_type
1870
1871# ac_fn_c_find_uintX_t LINENO BITS VAR
1872# ------------------------------------
1873# Finds an unsigned integer type with width BITS, setting cache variable VAR
1874# accordingly.
1875ac_fn_c_find_uintX_t ()
1876{
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1879$as_echo_n "checking for uint$2_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001880if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001881 $as_echo_n "(cached) " >&6
1882else
1883 eval "$3=no"
1884 # Order is important - never check a type that is potentially smaller
1885 # than half of the expected target width.
1886 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1887 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889/* end confdefs.h. */
1890$ac_includes_default
1891int
1892main ()
1893{
1894static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1895test_array [0] = 0
1896
1897 ;
1898 return 0;
1899}
1900_ACEOF
1901if ac_fn_c_try_compile "$LINENO"; then :
1902 case $ac_type in #(
1903 uint$2_t) :
1904 eval "$3=yes" ;; #(
1905 *) :
1906 eval "$3=\$ac_type" ;;
1907esac
1908fi
1909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001910 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001911
1912else
1913 break
1914fi
1915 done
1916fi
1917eval ac_res=\$$3
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1919$as_echo "$ac_res" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001920 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001921
1922} # ac_fn_c_find_uintX_t
1923
1924# ac_fn_c_find_intX_t LINENO BITS VAR
1925# -----------------------------------
1926# Finds a signed integer type with width BITS, setting cache variable VAR
1927# accordingly.
1928ac_fn_c_find_intX_t ()
1929{
1930 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1932$as_echo_n "checking for int$2_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001933if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001934 $as_echo_n "(cached) " >&6
1935else
1936 eval "$3=no"
1937 # Order is important - never check a type that is potentially smaller
1938 # than half of the expected target width.
1939 for ac_type in int$2_t 'int' 'long int' \
1940 'long long int' 'short int' 'signed char'; do
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001944 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001945int
1946main ()
1947{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001948static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001949test_array [0] = 0
1950
1951 ;
1952 return 0;
1953}
1954_ACEOF
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001959 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001960int
1961main ()
1962{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001963static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001964 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1965test_array [0] = 0
1966
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 case $ac_type in #(
1975 int$2_t) :
1976 eval "$3=yes" ;; #(
1977 *) :
1978 eval "$3=\$ac_type" ;;
1979esac
1980fi
1981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1982fi
1983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001984 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986else
1987 break
1988fi
1989 done
1990fi
1991eval ac_res=\$$3
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1993$as_echo "$ac_res" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01001994 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996} # ac_fn_c_find_intX_t
1997
1998# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1999# --------------------------------------------
2000# Tries to find the compile-time value of EXPR in a program that includes
2001# INCLUDES, setting VAR accordingly. Returns whether the value could be
2002# computed
2003ac_fn_c_compute_int ()
2004{
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 if test "$cross_compiling" = yes; then
2007 # Depending upon the size, compute the lo and hi bounds.
2008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011int
2012main ()
2013{
2014static int test_array [1 - 2 * !(($2) >= 0)];
2015test_array [0] = 0
2016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 ac_lo=0 ac_mid=0
2023 while :; do
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027int
2028main ()
2029{
2030static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2031test_array [0] = 0
2032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 ac_hi=$ac_mid; break
2039else
2040 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2041 if test $ac_lo -le $ac_mid; then
2042 ac_lo= ac_hi=
2043 break
2044 fi
2045 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 done
2049else
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) < 0)];
2057test_array [0] = 0
2058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 ac_hi=-1 ac_mid=-1
2065 while :; do
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
2070main ()
2071{
2072static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2073test_array [0] = 0
2074
2075 ;
2076 return 0;
2077}
2078_ACEOF
2079if ac_fn_c_try_compile "$LINENO"; then :
2080 ac_lo=$ac_mid; break
2081else
2082 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2083 if test $ac_mid -le $ac_hi; then
2084 ac_lo= ac_hi=
2085 break
2086 fi
2087 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090 done
2091else
2092 ac_lo= ac_hi=
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097# Binary search between lo and hi bounds.
2098while test "x$ac_lo" != "x$ac_hi"; do
2099 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h. */
2102$4
2103int
2104main ()
2105{
2106static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2107test_array [0] = 0
2108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 ac_hi=$ac_mid
2115else
2116 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119done
2120case $ac_lo in #((
2121?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2122'') ac_retval=1 ;;
2123esac
2124 else
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128static long int longval () { return $2; }
2129static unsigned long int ulongval () { return $2; }
2130#include <stdio.h>
2131#include <stdlib.h>
2132int
2133main ()
2134{
2135
2136 FILE *f = fopen ("conftest.val", "w");
2137 if (! f)
2138 return 1;
2139 if (($2) < 0)
2140 {
2141 long int i = longval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%ld", i);
2145 }
2146 else
2147 {
2148 unsigned long int i = ulongval ();
2149 if (i != ($2))
2150 return 1;
2151 fprintf (f, "%lu", i);
2152 }
2153 /* Do not output a trailing newline, as this causes \r\n confusion
2154 on some platforms. */
2155 return ferror (f) || fclose (f) != 0;
2156
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_run "$LINENO"; then :
2162 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2163else
2164 ac_retval=1
2165fi
2166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2167 conftest.$ac_objext conftest.beam conftest.$ac_ext
2168rm -f conftest.val
2169
2170 fi
Charles-François Natali6613c182011-11-27 12:41:06 +01002171 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002172 as_fn_set_status $ac_retval
2173
2174} # ac_fn_c_compute_int
2175
2176# ac_fn_c_check_func LINENO FUNC VAR
2177# ----------------------------------
2178# Tests whether FUNC exists, setting the cache variable VAR accordingly
2179ac_fn_c_check_func ()
2180{
2181 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2183$as_echo_n "checking for $2... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01002184if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002185 $as_echo_n "(cached) " >&6
2186else
2187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2188/* end confdefs.h. */
2189/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2190 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2191#define $2 innocuous_$2
2192
2193/* System header to define __stub macros and hopefully few prototypes,
2194 which can conflict with char $2 (); below.
2195 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2196 <limits.h> exists even on freestanding compilers. */
2197
2198#ifdef __STDC__
2199# include <limits.h>
2200#else
2201# include <assert.h>
2202#endif
2203
2204#undef $2
2205
2206/* Override any GCC internal prototype to avoid an error.
2207 Use char because int might match the return type of a GCC
2208 builtin and then its argument prototype would still apply. */
2209#ifdef __cplusplus
2210extern "C"
2211#endif
2212char $2 ();
2213/* The GNU C library defines this for functions which it implements
2214 to always fail with ENOSYS. Some functions are actually named
2215 something starting with __ and the normal name is an alias. */
2216#if defined __stub_$2 || defined __stub___$2
2217choke me
2218#endif
2219
2220int
2221main ()
2222{
2223return $2 ();
2224 ;
2225 return 0;
2226}
2227_ACEOF
2228if ac_fn_c_try_link "$LINENO"; then :
2229 eval "$3=yes"
2230else
2231 eval "$3=no"
2232fi
2233rm -f core conftest.err conftest.$ac_objext \
2234 conftest$ac_exeext conftest.$ac_ext
2235fi
2236eval ac_res=\$$3
2237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2238$as_echo "$ac_res" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01002239 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002240
2241} # ac_fn_c_check_func
2242
2243# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2244# ----------------------------------------------------
2245# Tries to find if the field MEMBER exists in type AGGR, after including
2246# INCLUDES, setting cache variable VAR accordingly.
2247ac_fn_c_check_member ()
2248{
2249 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2251$as_echo_n "checking for $2.$3... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01002252if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002253 $as_echo_n "(cached) " >&6
2254else
2255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2256/* end confdefs.h. */
2257$5
2258int
2259main ()
2260{
2261static $2 ac_aggr;
2262if (ac_aggr.$3)
2263return 0;
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 eval "$4=yes"
2270else
2271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2272/* end confdefs.h. */
2273$5
2274int
2275main ()
2276{
2277static $2 ac_aggr;
2278if (sizeof ac_aggr.$3)
2279return 0;
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_compile "$LINENO"; then :
2285 eval "$4=yes"
2286else
2287 eval "$4=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293eval ac_res=\$$4
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295$as_echo "$ac_res" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01002296 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002297
2298} # ac_fn_c_check_member
2299
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002300# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2301# ---------------------------------------------
2302# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2303# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002304ac_fn_c_check_decl ()
2305{
2306 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002307 as_decl_name=`echo $2|sed 's/ *(.*//'`
2308 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2310$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01002311if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002312 $as_echo_n "(cached) " >&6
2313else
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h. */
2316$4
2317int
2318main ()
2319{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002320#ifndef $as_decl_name
2321#ifdef __cplusplus
2322 (void) $as_decl_use;
2323#else
2324 (void) $as_decl_name;
2325#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002326#endif
2327
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 eval "$3=yes"
2334else
2335 eval "$3=no"
2336fi
2337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338fi
2339eval ac_res=\$$3
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2341$as_echo "$ac_res" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01002342 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002343
2344} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002346This file contains any messages produced by compilers while
2347running configure, to aid debugging if configure makes a mistake.
2348
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002349It was created by python $as_me 3.2, which was
Charles-François Natali6613c182011-11-27 12:41:06 +01002350generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002351
2352 $ $0 $@
2353
2354_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002355exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002356{
2357cat <<_ASUNAME
2358## --------- ##
2359## Platform. ##
2360## --------- ##
2361
2362hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2363uname -m = `(uname -m) 2>/dev/null || echo unknown`
2364uname -r = `(uname -r) 2>/dev/null || echo unknown`
2365uname -s = `(uname -s) 2>/dev/null || echo unknown`
2366uname -v = `(uname -v) 2>/dev/null || echo unknown`
2367
2368/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2369/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2370
2371/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2372/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2373/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002374/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002375/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2376/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2377/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2378
2379_ASUNAME
2380
2381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2382for as_dir in $PATH
2383do
2384 IFS=$as_save_IFS
2385 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002386 $as_echo "PATH: $as_dir"
2387 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002388IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002389
2390} >&5
2391
2392cat >&5 <<_ACEOF
2393
2394
2395## ----------- ##
2396## Core tests. ##
2397## ----------- ##
2398
2399_ACEOF
2400
2401
2402# Keep a trace of the command line.
2403# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002404# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002405# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002406# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002407ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002408ac_configure_args0=
2409ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002410ac_must_keep_next=false
2411for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002412do
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 for ac_arg
2414 do
2415 case $ac_arg in
2416 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2417 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2418 | -silent | --silent | --silen | --sile | --sil)
2419 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002420 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 esac
2423 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002428 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002430 case $ac_arg in
2431 *=* | --config-cache | -C | -disable-* | --disable-* \
2432 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2433 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2434 | -with-* | --with-* | -without-* | --without-* | --x)
2435 case "$ac_configure_args0 " in
2436 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2437 esac
2438 ;;
2439 -* ) ac_must_keep_next=true ;;
2440 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002441 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002442 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002443 ;;
2444 esac
2445 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002446done
Matthias Kloseb9621712010-04-24 17:59:49 +00002447{ ac_configure_args0=; unset ac_configure_args0;}
2448{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002449
2450# When interrupted or exit'd, cleanup temporary files, and complete
2451# config.log. We remove comments because anyway the quotes in there
2452# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002453# WARNING: Use '\'' to represent an apostrophe within the trap.
2454# 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 +00002455trap 'exit_status=$?
2456 # Save into config.log some information that might help in debugging.
2457 {
2458 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002459
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002460 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002461## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002462## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002463 echo
2464 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465(
2466 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2467 eval ac_val=\$$ac_var
2468 case $ac_val in #(
2469 *${as_nl}*)
2470 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2472$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac
2474 case $ac_var in #(
2475 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2477 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac ;;
2479 esac
2480 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2483 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 "s/'\''/'\''\\\\'\'''\''/g;
2486 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2487 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002488 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002490 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 esac |
2492 sort
2493)
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002495
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002496 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002497## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002498## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 echo
2500 for ac_var in $ac_subst_vars
2501 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502 eval ac_val=\$$ac_var
2503 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 done | sort
2508 echo
2509
2510 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002511 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002513## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 echo
2515 for ac_var in $ac_subst_files
2516 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 eval ac_val=\$$ac_var
2518 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002521 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002522 done | sort
2523 echo
2524 fi
2525
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002527 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002528## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002529## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 echo
2533 fi
2534 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 $as_echo "$as_me: caught signal $ac_signal"
2536 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 rm -f core *.core core.conftest.* &&
2539 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002542for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002544done
2545ac_signal=0
2546
2547# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002549
Matthias Kloseb9621712010-04-24 17:59:49 +00002550$as_echo "/* confdefs.h */" > confdefs.h
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552# Predefined preprocessor variables.
2553
2554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_NAME "$PACKAGE_NAME"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_VERSION "$PACKAGE_VERSION"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_STRING "$PACKAGE_STRING"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2572_ACEOF
2573
Matthias Kloseb9621712010-04-24 17:59:49 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_URL "$PACKAGE_URL"
2576_ACEOF
2577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578
2579# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002580# Prefer an explicitly selected file to automatically selected ones.
2581ac_site_file1=NONE
2582ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002584 # We do not want a PATH search for config.site.
2585 case $CONFIG_SITE in #((
2586 -*) ac_site_file1=./$CONFIG_SITE;;
2587 */*) ac_site_file1=$CONFIG_SITE;;
2588 *) ac_site_file1=./$CONFIG_SITE;;
2589 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 ac_site_file1=$prefix/share/config.site
2592 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593else
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 ac_site_file1=$ac_default_prefix/share/config.site
2595 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002597for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598do
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 test "x$ac_site_file" = xNONE && continue
2600 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2601 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2602$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002604 . "$ac_site_file" \
2605 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2607as_fn_error $? "failed to load site script $ac_site_file
Charles-François Natali6613c182011-11-27 12:41:06 +01002608See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002609 fi
2610done
2611
2612if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 # Some versions of bash will fail to source /dev/null (special files
2614 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2615 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2616 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2617$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2620 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 esac
2622 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002623else
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2625$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 >$cache_file
2627fi
2628
2629# Check that the precious variables saved in the cache have kept the same
2630# value.
2631ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2634 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2636 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 case $ac_old_set,$ac_new_set in
2638 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2640$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 +00002641 ac_cache_corrupted=: ;;
2642 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2644$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 ac_cache_corrupted=: ;;
2646 ,);;
2647 *)
2648 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 # differences in whitespace do not lead to failure.
2650 ac_old_val_w=`echo x $ac_old_val`
2651 ac_new_val_w=`echo x $ac_new_val`
2652 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2654$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2655 ac_cache_corrupted=:
2656 else
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2658$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2659 eval $ac_var=\$ac_old_val
2660 fi
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2662$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2664$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 fi;;
2666 esac
2667 # Pass precious variables to config.status.
2668 if test "$ac_new_set" = set; then
2669 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 *) ac_arg=$ac_var=$ac_new_val ;;
2672 esac
2673 case " $ac_configure_args " in
2674 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 esac
2677 fi
2678done
2679if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2683$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002684 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002686## -------------------- ##
2687## Main body of script. ##
2688## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689
Guido van Rossum7f43da71994-08-01 12:15:30 +00002690ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2694ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695
Guido van Rossum627b2d71993-12-24 10:39:16 +00002696
Michael W. Hudson54241132001-12-07 15:38:26 +00002697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002698ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002699
2700
Martin v. Löwis11437992002-04-12 09:54:03 +00002701
Benjamin Petersond23f8222009-04-05 19:13:16 +00002702if test "$prefix" != "/"; then
2703 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2704fi
2705
2706
Martin v. Löwis11437992002-04-12 09:54:03 +00002707
2708
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002709# We don't use PACKAGE_ variables, and they cause conflicts
2710# with other autoconf-based packages that include Python.h
2711grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2712rm confdefs.h
2713mv confdefs.h.new confdefs.h
2714
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002715
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002716VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002717
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002718# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002719
2720SOVERSION=1.0
2721
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002722# The later defininition of _XOPEN_SOURCE disables certain features
2723# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2724
Matthias Kloseb9621712010-04-24 17:59:49 +00002725$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002726
2727
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002728# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2729# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2730# them.
2731
Matthias Kloseb9621712010-04-24 17:59:49 +00002732$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002733
2734
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002735# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2736# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2737# them.
2738
Matthias Kloseb9621712010-04-24 17:59:49 +00002739$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002740
2741
Martin v. Löwisd6320502004-08-12 13:45:08 +00002742# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2743# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2744
Matthias Kloseb9621712010-04-24 17:59:49 +00002745$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002746
2747
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002748# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2749# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2750# them.
2751
Matthias Kloseb9621712010-04-24 17:59:49 +00002752$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002753
2754
2755
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002756define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002757
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002758# Arguments passed to configure.
2759
2760CONFIG_ARGS="$ac_configure_args"
2761
Matthias Kloseb9621712010-04-24 17:59:49 +00002762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2763$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002764# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002765if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002767 case $enableval in
2768 yes)
2769 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002770 if test ! -d "${enableval}"
2771 then
2772 enableval=/
2773 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002774 ;;
2775 esac
2776 case $enableval in
2777 no)
2778 UNIVERSALSDK=
2779 enable_universalsdk=
2780 ;;
2781 *)
2782 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002783 if test ! -d "${UNIVERSALSDK}"
2784 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002785 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002786 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002787 ;;
2788 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002789
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002790
Thomas Wouters477c8d52006-05-27 19:21:47 +00002791else
2792
2793 UNIVERSALSDK=
2794 enable_universalsdk=
2795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002796fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002797
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002798if test -n "${UNIVERSALSDK}"
2799then
Matthias Kloseb9621712010-04-24 17:59:49 +00002800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2801$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002802else
Matthias Kloseb9621712010-04-24 17:59:49 +00002803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2804$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002805fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002807
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002808
2809
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002810UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002811
Matthias Kloseb9621712010-04-24 17:59:49 +00002812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2813$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002814
2815# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002816if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002817 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2819$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002820 UNIVERSAL_ARCHS="$withval"
2821
2822else
2823
Matthias Kloseb9621712010-04-24 17:59:49 +00002824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2825$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002826
2827fi
2828
2829
2830
2831
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002832
2833# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002834if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002835 withval=$with_framework_name;
2836 PYTHONFRAMEWORK=${withval}
2837 PYTHONFRAMEWORKDIR=${withval}.framework
2838 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2839
2840else
2841
2842 PYTHONFRAMEWORK=Python
2843 PYTHONFRAMEWORKDIR=Python.framework
2844 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2845
2846fi
2847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002848# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002849if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002850 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002851 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002853 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002854 esac
2855 case $enableval in
2856 no)
2857 PYTHONFRAMEWORK=
2858 PYTHONFRAMEWORKDIR=no-framework
2859 PYTHONFRAMEWORKPREFIX=
2860 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002861 FRAMEWORKINSTALLFIRST=
2862 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002863 FRAMEWORKALTINSTALLFIRST=
2864 FRAMEWORKALTINSTALLLAST=
2865 if test "x${prefix}" = "xNONE"; then
2866 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2867 else
2868 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2869 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002870 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002871 ;;
2872 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002873 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002874 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002875 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002876 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002877 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2878 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002879 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002880
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002881 if test "x${prefix}" = "xNONE" ; then
2882 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002883
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002884 else
2885 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2886 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002887
2888 case "${enableval}" in
2889 /System*)
2890 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2891 if test "${prefix}" = "NONE" ; then
2892 # See below
2893 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2894 fi
2895 ;;
2896
2897 /Library*)
2898 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2899 ;;
2900
2901 */Library/Frameworks)
2902 MDIR="`dirname "${enableval}"`"
2903 MDIR="`dirname "${MDIR}"`"
2904 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2905
2906 if test "${prefix}" = "NONE"; then
2907 # User hasn't specified the
2908 # --prefix option, but wants to install
2909 # the framework in a non-default location,
2910 # ensure that the compatibility links get
2911 # installed relative to that prefix as well
2912 # instead of in /usr/local.
2913 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2914 fi
2915 ;;
2916
2917 *)
2918 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2919 ;;
2920 esac
2921
Jack Jansen127e56e2001-09-11 14:41:54 +00002922 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002923
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002924 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002925 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002926 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002928 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002929
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002930 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2931
2932 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2933
Jack Jansene578a632001-08-15 01:27:14 +00002934 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002935
Guido van Rossum563e7081996-09-10 18:20:48 +00002936else
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Jack Jansene578a632001-08-15 01:27:14 +00002938 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002939 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002940 PYTHONFRAMEWORKPREFIX=
2941 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002942 FRAMEWORKINSTALLFIRST=
2943 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002944 FRAMEWORKALTINSTALLFIRST=
2945 FRAMEWORKALTINSTALLLAST=
2946 if test "x${prefix}" = "xNONE" ; then
2947 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2948 else
2949 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2950 fi
Jack Jansene578a632001-08-15 01:27:14 +00002951 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002952
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002954fi
2955
Thomas Wouters477c8d52006-05-27 19:21:47 +00002956
2957
Michael W. Hudson54241132001-12-07 15:38:26 +00002958
2959
2960
2961
Jack Jansene578a632001-08-15 01:27:14 +00002962
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002963
2964
2965
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002966
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002967
Jack Jansene578a632001-08-15 01:27:14 +00002968##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002969## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002970## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002971##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002972# Set name for machine-dependent library files
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2975$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002976if test -z "$MACHDEP"
2977then
Guido van Rossum563e7081996-09-10 18:20:48 +00002978 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002979 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002980 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002981 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002982 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002983 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002984 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002985 ac_md_system=`echo $ac_sys_system |
2986 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2987 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002988 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002989 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002990
Guido van Rossum07397971997-04-29 21:49:50 +00002991 case $MACHDEP in
Victor Stinner0c17d0d2011-08-20 14:01:05 +02002992 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002993 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002994 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002995 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002996 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002997 esac
2998fi
Guido van Rossum91922671997-10-09 20:24:13 +00002999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003000# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3001# disable features if it is defined, without any means to access these
3002# features as extensions. For these systems, we skip the definition of
3003# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3004# some feature, make sure there is no alternative way to access this
3005# feature. Also, when using wildcards, make sure you have verified the
3006# need for not defining _XOPEN_SOURCE on all systems matching the
3007# wildcard, and that the wildcard does not include future systems
3008# (which may remove their limitations).
3009case $ac_sys_system/$ac_sys_release in
3010 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3011 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003012 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003013 # In addition, Stefan Krah confirms that issue #1244610 exists through
3014 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003015 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003016 define_xopen_source=no
3017 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3018 # also defined. This can be overridden by defining _BSD_SOURCE
3019 # As this has a different meaning on Linux, only define it on OpenBSD
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003022
3023 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003024 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003025 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3026 # also defined. This can be overridden by defining _BSD_SOURCE
3027 # As this has a different meaning on Linux, only define it on OpenBSD
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003030
3031 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003032 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3033 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3034 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003035 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 +00003036 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003037 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3038 # request to enable features supported by the standard as a request
3039 # to disable features not supported by the standard. The best way
3040 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3041 # entirely and define __EXTENSIONS__ instead.
3042 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003043 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003044 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3045 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003046 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003047 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003048 define_xopen_source=no;;
3049 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003050 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003051 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003052 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003053 # On FreeBSD 4, the math functions C89 does not cover are never defined
3054 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3055 FreeBSD/4.*)
3056 define_xopen_source=no;;
3057 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3058 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3059 # identifies itself as Darwin/7.*
3060 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3061 # disables platform specific features beyond repair.
3062 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3063 # has no effect, don't bother defining them
3064 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003065 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003066 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003067 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003068 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3069 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3070 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003071 AIX/4)
3072 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003073 AIX/5)
3074 if test `uname -r` -eq 1; then
3075 define_xopen_source=no
3076 fi
3077 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003078 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3079 # defining NI_NUMERICHOST.
3080 QNX/6.3.2)
3081 define_xopen_source=no
3082 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003083
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003084esac
3085
3086if test $define_xopen_source = yes
3087then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003090
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003091
3092 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3093 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3094 # several APIs are not declared. Since this is also needed in some
3095 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
Matthias Kloseb9621712010-04-24 17:59:49 +00003097$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
3099
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003100
Matthias Kloseb9621712010-04-24 17:59:49 +00003101$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003102
3103
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003104fi
3105
Guido van Rossum91922671997-10-09 20:24:13 +00003106#
3107# SGI compilers allow the specification of the both the ABI and the
3108# ISA on the command line. Depending on the values of these switches,
3109# different and often incompatable code will be generated.
3110#
3111# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3112# thus supply support for various ABI/ISA combinations. The MACHDEP
3113# variable is also adjusted.
3114#
3115
3116if test ! -z "$SGI_ABI"
3117then
3118 CC="cc $SGI_ABI"
3119 LDFLAGS="$SGI_ABI $LDFLAGS"
3120 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3123$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003124
Jack Jansen6b08a402004-06-03 12:41:45 +00003125# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3126# it may influence the way we can build extensions, so distutils
3127# needs to check it
3128
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129
Jack Jansen6b08a402004-06-03 12:41:45 +00003130CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003132
Matthias Kloseb9621712010-04-24 17:59:49 +00003133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3134$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003135ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3137$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003138
Guido van Rossum627b2d71993-12-24 10:39:16 +00003139# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003140
3141# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3142# for debug/optimization stuff. BASECFLAGS is for flags that are required
3143# just to get things to compile and link. Users are free to override OPT
3144# when running configure or make. The build should not break if they do.
3145# BASECFLAGS should generally not be messed with, however.
3146
3147# XXX shouldn't some/most/all of this code be merged with the stuff later
3148# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3150$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003153if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003155 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003156 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003157 without_gcc=yes;;
3158 yes) CC=gcc
3159 without_gcc=no;;
3160 *) CC=$withval
3161 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003162 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003163else
Martin v. Löwis11437992002-04-12 09:54:03 +00003164
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003165 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003166 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003167 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003168 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003169 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170fi
3171
Matthias Kloseb9621712010-04-24 17:59:49 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3173$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003174
Guido van Rossum8b131c51995-03-09 14:10:13 +00003175# If the user switches compilers, we can't believe the cache
3176if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3177then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003178 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003179(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003180fi
3181
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003182# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3183# when the compiler supports them, but we don't always want -O2, and
3184# we set -g later.
3185if test -z "$CFLAGS"; then
3186 CFLAGS=
3187fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003188ac_ext=c
3189ac_cpp='$CPP $CPPFLAGS'
3190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3192ac_compiler_gnu=$ac_cv_c_compiler_gnu
3193if test -n "$ac_tool_prefix"; then
3194 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3195set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3197$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003198if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003199 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003200else
3201 if test -n "$CC"; then
3202 ac_cv_prog_CC="$CC" # Let the user override the test.
3203else
Martin v. Löwis11437992002-04-12 09:54:03 +00003204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3205for as_dir in $PATH
3206do
3207 IFS=$as_save_IFS
3208 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210 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 +00003211 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003212 $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 +00003213 break 2
3214 fi
3215done
Matthias Kloseb9621712010-04-24 17:59:49 +00003216 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003218
Jack Jansendd19cf82001-12-06 22:36:17 +00003219fi
3220fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003221CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003222if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3224$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003225else
Matthias Kloseb9621712010-04-24 17:59:49 +00003226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3227$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003228fi
3229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230
Martin v. Löwis11437992002-04-12 09:54:03 +00003231fi
3232if test -z "$ac_cv_prog_CC"; then
3233 ac_ct_CC=$CC
3234 # Extract the first word of "gcc", so it can be a program name with args.
3235set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3237$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003238if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003239 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003240else
3241 if test -n "$ac_ct_CC"; then
3242 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3243else
3244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3245for as_dir in $PATH
3246do
3247 IFS=$as_save_IFS
3248 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003249 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003250 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 +00003251 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 $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 +00003253 break 2
3254 fi
3255done
Matthias Kloseb9621712010-04-24 17:59:49 +00003256 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003258
3259fi
3260fi
3261ac_ct_CC=$ac_cv_prog_ac_ct_CC
3262if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3264$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003265else
Matthias Kloseb9621712010-04-24 17:59:49 +00003266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3267$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003268fi
3269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270 if test "x$ac_ct_CC" = x; then
3271 CC=""
3272 else
3273 case $cross_compiling:$ac_tool_warned in
3274yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003275{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3276$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003277ac_tool_warned=yes ;;
3278esac
3279 CC=$ac_ct_CC
3280 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003281else
3282 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003283fi
3284
Jack Jansendd19cf82001-12-06 22:36:17 +00003285if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286 if test -n "$ac_tool_prefix"; then
3287 # 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 +00003288set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3290$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003291if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003293else
3294 if test -n "$CC"; then
3295 ac_cv_prog_CC="$CC" # Let the user override the test.
3296else
Martin v. Löwis11437992002-04-12 09:54:03 +00003297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3298for as_dir in $PATH
3299do
3300 IFS=$as_save_IFS
3301 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003303 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 +00003304 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 $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 +00003306 break 2
3307 fi
3308done
Matthias Kloseb9621712010-04-24 17:59:49 +00003309 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003311
3312fi
3313fi
3314CC=$ac_cv_prog_CC
3315if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3317$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003318else
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3320$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003321fi
3322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323
Martin v. Löwis11437992002-04-12 09:54:03 +00003324 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003325fi
3326if test -z "$CC"; then
3327 # Extract the first word of "cc", so it can be a program name with args.
3328set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3330$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003331if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003332 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003333else
3334 if test -n "$CC"; then
3335 ac_cv_prog_CC="$CC" # Let the user override the test.
3336else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003337 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3339for as_dir in $PATH
3340do
3341 IFS=$as_save_IFS
3342 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003343 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344 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 +00003345 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3346 ac_prog_rejected=yes
3347 continue
3348 fi
3349 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003350 $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 +00003351 break 2
3352 fi
3353done
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003355IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003356
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003357if test $ac_prog_rejected = yes; then
3358 # We found a bogon in the path, so make sure we never use it.
3359 set dummy $ac_cv_prog_CC
3360 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003362 # We chose a different compiler from the bogus one.
3363 # However, it has the same basename, so the bogon will be chosen
3364 # first if we set CC to just the basename; use the full file name.
3365 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003366 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003367 fi
3368fi
3369fi
3370fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003371CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003372if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3374$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003375else
Matthias Kloseb9621712010-04-24 17:59:49 +00003376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3377$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003378fi
3379
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003380
Martin v. Löwis11437992002-04-12 09:54:03 +00003381fi
3382if test -z "$CC"; then
3383 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003384 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003385 do
3386 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3387set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3389$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003390if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003392else
3393 if test -n "$CC"; then
3394 ac_cv_prog_CC="$CC" # Let the user override the test.
3395else
Martin v. Löwis11437992002-04-12 09:54:03 +00003396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399 IFS=$as_save_IFS
3400 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003402 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 +00003403 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 $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 +00003405 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003407done
Matthias Kloseb9621712010-04-24 17:59:49 +00003408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
3411fi
3412fi
3413CC=$ac_cv_prog_CC
3414if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3416$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003417else
Matthias Kloseb9621712010-04-24 17:59:49 +00003418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3419$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003420fi
3421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 test -n "$CC" && break
3424 done
3425fi
3426if test -z "$CC"; then
3427 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003428 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003429do
3430 # Extract the first word of "$ac_prog", so it can be a program name with args.
3431set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3433$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003434if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003436else
3437 if test -n "$ac_ct_CC"; then
3438 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3439else
3440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3441for as_dir in $PATH
3442do
3443 IFS=$as_save_IFS
3444 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446 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 +00003447 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003448 $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 +00003449 break 2
3450 fi
3451done
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455fi
3456fi
3457ac_ct_CC=$ac_cv_prog_ac_ct_CC
3458if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3460$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003461else
Matthias Kloseb9621712010-04-24 17:59:49 +00003462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3463$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003464fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 test -n "$ac_ct_CC" && break
3468done
Michael W. Hudson54241132001-12-07 15:38:26 +00003469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470 if test "x$ac_ct_CC" = x; then
3471 CC=""
3472 else
3473 case $cross_compiling:$ac_tool_warned in
3474yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477ac_tool_warned=yes ;;
3478esac
3479 CC=$ac_ct_CC
3480 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003481fi
3482
3483fi
3484
3485
Matthias Kloseb9621712010-04-24 17:59:49 +00003486test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003488as_fn_error $? "no acceptable C compiler found in \$PATH
Charles-François Natali6613c182011-11-27 12:41:06 +01003489See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003490
3491# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003492$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3493set X $ac_compile
3494ac_compiler=$2
3495for ac_option in --version -v -V -qversion; do
3496 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497case "(($ac_try" in
3498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3499 *) ac_try_echo=$ac_try;;
3500esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3502$as_echo "$ac_try_echo"; } >&5
3503 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003505 if test -s conftest.err; then
3506 sed '10a\
3507... rest of stderr output deleted ...
3508 10q' conftest.err >conftest.er1
3509 cat conftest.er1 >&5
3510 fi
3511 rm -f conftest.er1 conftest.err
3512 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3513 test $ac_status = 0; }
3514done
Martin v. Löwis11437992002-04-12 09:54:03 +00003515
Matthias Kloseb9621712010-04-24 17:59:49 +00003516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003517/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003518
Martin v. Löwis11437992002-04-12 09:54:03 +00003519int
3520main ()
3521{
3522
3523 ;
3524 return 0;
3525}
3526_ACEOF
3527ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003528ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003529# Try to create an executable without -o first, disregard a.out.
3530# It will help us diagnose broken compilers, and finding out an intuition
3531# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3533$as_echo_n "checking whether the C compiler works... " >&6; }
3534ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3535
3536# The possible output files:
3537ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539ac_rmfiles=
3540for ac_file in $ac_files
3541do
3542 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003543 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3545 esac
3546done
3547rm -f $ac_rmfiles
3548
Matthias Kloseb9621712010-04-24 17:59:49 +00003549if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550case "(($ac_try" in
3551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3552 *) ac_try_echo=$ac_try;;
3553esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003554eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3555$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3559 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3561# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3562# in a Makefile. We should not override ac_cv_exeext if it was cached,
3563# so that the user can short-circuit this test for compilers unknown to
3564# Autoconf.
3565for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003566do
3567 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003569 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003570 ;;
3571 [ab].out )
3572 # We found the default executable, but exeext='' is most
3573 # certainly right.
3574 break;;
3575 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003576 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577 then :; else
3578 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3579 fi
3580 # We set ac_cv_exeext here because the later test for it is not
3581 # safe: cross compilers may not add the suffix if given an `-o'
3582 # argument, so we may need to know it at that point already.
3583 # Even if this section looks crufty: it has the advantage of
3584 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003585 break;;
3586 * )
3587 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 esac
3589done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590test "$ac_cv_exeext" = no && ac_cv_exeext=
3591
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003592else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593 ac_file=''
3594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003595if test -z "$ac_file"; then :
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3597$as_echo "no" >&6; }
3598$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003599sed 's/^/| /' conftest.$ac_ext >&5
3600
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003603as_fn_error 77 "C compiler cannot create executables
Charles-François Natali6613c182011-11-27 12:41:06 +01003604See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003605else
3606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3607$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3610$as_echo_n "checking for C compiler default output file name... " >&6; }
3611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3612$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003613ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003614
Matthias Kloseb9621712010-04-24 17:59:49 +00003615rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003616ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3618$as_echo_n "checking for suffix of executables... " >&6; }
3619if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620case "(($ac_try" in
3621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3622 *) ac_try_echo=$ac_try;;
3623esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003624eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3625$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3629 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003630 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3631# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3632# work properly (i.e., refer to `conftest.exe'), while it won't with
3633# `rm'.
3634for ac_file in conftest.exe conftest conftest.*; do
3635 test -f "$ac_file" || continue
3636 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003638 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3639 break;;
3640 * ) break;;
3641 esac
3642done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003643else
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003646as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Charles-François Natali6613c182011-11-27 12:41:06 +01003647See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003649rm -f conftest conftest$ac_cv_exeext
3650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3651$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003652
3653rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003654EXEEXT=$ac_cv_exeext
3655ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3657/* end confdefs.h. */
3658#include <stdio.h>
3659int
3660main ()
3661{
3662FILE *f = fopen ("conftest.out", "w");
3663 return ferror (f) || fclose (f) != 0;
3664
3665 ;
3666 return 0;
3667}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003669ac_clean_files="$ac_clean_files conftest.out"
3670# Check that the compiler produces executables we can run. If not, either
3671# the compiler is broken, or we cross compile.
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3673$as_echo_n "checking whether we are cross compiling... " >&6; }
3674if test "$cross_compiling" != yes; then
3675 { { ac_try="$ac_link"
3676case "(($ac_try" in
3677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3678 *) ac_try_echo=$ac_try;;
3679esac
3680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3681$as_echo "$ac_try_echo"; } >&5
3682 (eval "$ac_link") 2>&5
3683 ac_status=$?
3684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3685 test $ac_status = 0; }
3686 if { ac_try='./conftest$ac_cv_exeext'
3687 { { case "(($ac_try" in
3688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3689 *) ac_try_echo=$ac_try;;
3690esac
3691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3692$as_echo "$ac_try_echo"; } >&5
3693 (eval "$ac_try") 2>&5
3694 ac_status=$?
3695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3696 test $ac_status = 0; }; }; then
3697 cross_compiling=no
3698 else
3699 if test "$cross_compiling" = maybe; then
3700 cross_compiling=yes
3701 else
3702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003704as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003705If you meant to cross compile, use \`--host'.
Charles-François Natali6613c182011-11-27 12:41:06 +01003706See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 fi
3708 fi
3709fi
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3711$as_echo "$cross_compiling" >&6; }
3712
3713rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3714ac_clean_files=$ac_clean_files_save
3715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3716$as_echo_n "checking for suffix of object files... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003717if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $as_echo_n "(cached) " >&6
3719else
3720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003721/* end confdefs.h. */
3722
3723int
3724main ()
3725{
3726
3727 ;
3728 return 0;
3729}
3730_ACEOF
3731rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003732if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733case "(($ac_try" in
3734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3735 *) ac_try_echo=$ac_try;;
3736esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3738$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3742 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 for ac_file in conftest.o conftest.obj conftest.*; do
3744 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3748 break;;
3749 esac
3750done
3751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003753sed 's/^/| /' conftest.$ac_ext >&5
3754
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003757as_fn_error $? "cannot compute suffix of object files: cannot compile
Charles-François Natali6613c182011-11-27 12:41:06 +01003758See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003759fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003760rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3763$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003764OBJEXT=$ac_cv_objext
3765ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3767$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003768if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003770else
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
Martin v. Löwis11437992002-04-12 09:54:03 +00003774int
3775main ()
3776{
3777#ifndef __GNUC__
3778 choke me
3779#endif
3780
3781 ;
3782 return 0;
3783}
3784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003785if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 ac_compiler_gnu=yes
3787else
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003791ac_cv_c_compiler_gnu=$ac_compiler_gnu
3792
3793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3795$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3796if test $ac_compiler_gnu = yes; then
3797 GCC=yes
3798else
3799 GCC=
3800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801ac_test_CFLAGS=${CFLAGS+set}
3802ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3804$as_echo_n "checking whether $CC accepts -g... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003805if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808 ac_save_c_werror_flag=$ac_c_werror_flag
3809 ac_c_werror_flag=yes
3810 ac_cv_prog_cc_g=no
3811 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
Martin v. Löwis11437992002-04-12 09:54:03 +00003815int
3816main ()
3817{
3818
3819 ;
3820 return 0;
3821}
3822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003823if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003825else
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 CFLAGS=""
3827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828/* end confdefs.h. */
3829
3830int
3831main ()
3832{
3833
3834 ;
3835 return 0;
3836}
3837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003838if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839
Matthias Kloseb9621712010-04-24 17:59:49 +00003840else
3841 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844/* end confdefs.h. */
3845
3846int
3847main ()
3848{
3849
3850 ;
3851 return 0;
3852}
3853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003854if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862 ac_c_werror_flag=$ac_save_c_werror_flag
3863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3865$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003866if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003867 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003868elif test $ac_cv_prog_cc_g = yes; then
3869 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003870 CFLAGS="-g -O2"
3871 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003872 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003873 fi
3874else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003875 if test "$GCC" = yes; then
3876 CFLAGS="-O2"
3877 else
3878 CFLAGS=
3879 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3882$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01003883if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003885else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003887ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003889/* end confdefs.h. */
3890#include <stdarg.h>
3891#include <stdio.h>
3892#include <sys/types.h>
3893#include <sys/stat.h>
3894/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3895struct buf { int x; };
3896FILE * (*rcsopen) (struct buf *, struct stat *, int);
3897static char *e (p, i)
3898 char **p;
3899 int i;
3900{
3901 return p[i];
3902}
3903static char *f (char * (*g) (char **, int), char **p, ...)
3904{
3905 char *s;
3906 va_list v;
3907 va_start (v,p);
3908 s = g (p, va_arg (v,int));
3909 va_end (v);
3910 return s;
3911}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003912
3913/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3914 function prototypes and stuff, but not '\xHH' hex character constants.
3915 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003917 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3918 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003920int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3923 inside strings and character constants. */
3924#define FOO(x) 'x'
3925int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3926
Skip Montanaro6dead952003-09-25 14:50:04 +00003927int test (int i, double x);
3928struct s1 {int (*f) (int a);};
3929struct s2 {int (*f) (double a);};
3930int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3931int argc;
3932char **argv;
3933int
3934main ()
3935{
3936return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3937 ;
3938 return 0;
3939}
3940_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3942 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003943do
3944 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948rm -f core conftest.err conftest.$ac_objext
3949 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003950done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003952CC=$ac_save_CC
3953
3954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955# AC_CACHE_VAL
3956case "x$ac_cv_prog_cc_c89" in
3957 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3959$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3962$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003963 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3966$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003967esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003968if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003969
Matthias Kloseb9621712010-04-24 17:59:49 +00003970fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003971
Martin v. Löwis11437992002-04-12 09:54:03 +00003972ac_ext=c
3973ac_cpp='$CPP $CPPFLAGS'
3974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3976ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003977
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003978
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003979
3980
Matthias Kloseb9621712010-04-24 17:59:49 +00003981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3982$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003985if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003987
3988 case $withval in
3989 no) with_cxx_main=no
3990 MAINCC='$(CC)';;
3991 yes) with_cxx_main=yes
3992 MAINCC='$(CXX)';;
3993 *) with_cxx_main=yes
3994 MAINCC=$withval
3995 if test -z "$CXX"
3996 then
3997 CXX=$withval
3998 fi;;
3999 esac
4000else
4001
4002 with_cxx_main=no
4003 MAINCC='$(CC)'
4004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005fi
4006
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4008$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004009
4010preset_cxx="$CXX"
4011if test -z "$CXX"
4012then
4013 case "$CC" in
4014 gcc) # Extract the first word of "g++", so it can be a program name with args.
4015set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4017$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01004018if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004020else
4021 case $CXX in
4022 [\\/]* | ?:[\\/]*)
4023 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4024 ;;
4025 *)
4026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4027for as_dir in notfound
4028do
4029 IFS=$as_save_IFS
4030 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032 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 +00004033 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004035 break 2
4036 fi
4037done
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004040
4041 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4042 ;;
4043esac
4044fi
4045CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004046if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4048$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004049else
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4051$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004053
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004054 ;;
4055 cc) # Extract the first word of "c++", so it can be a program name with args.
4056set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01004059if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004061else
4062 case $CXX in
4063 [\\/]* | ?:[\\/]*)
4064 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4065 ;;
4066 *)
4067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in notfound
4069do
4070 IFS=$as_save_IFS
4071 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004072 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073 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 +00004074 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004076 break 2
4077 fi
4078done
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004081
4082 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4083 ;;
4084esac
4085fi
4086CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004087if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4089$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004090else
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004095 ;;
4096 esac
4097 if test "$CXX" = "notfound"
4098 then
4099 CXX=""
4100 fi
4101fi
4102if test -z "$CXX"
4103then
4104 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4105do
4106 # Extract the first word of "$ac_prog", so it can be a program name with args.
4107set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4109$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01004110if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112else
4113 if test -n "$CXX"; then
4114 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4115else
4116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4117for as_dir in $PATH
4118do
4119 IFS=$as_save_IFS
4120 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122 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 +00004123 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125 break 2
4126 fi
4127done
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130
4131fi
4132fi
4133CXX=$ac_cv_prog_CXX
4134if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4136$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137else
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4139$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004140fi
4141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143 test -n "$CXX" && break
4144done
4145test -n "$CXX" || CXX="notfound"
4146
4147 if test "$CXX" = "notfound"
4148 then
4149 CXX=""
4150 fi
4151fi
4152if test "$preset_cxx" != "$CXX"
4153then
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004155
4156 By default, distutils will build C++ extension modules with \"$CXX\".
4157 If this is not intended, then set CXX on the configure command line.
4158 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004159$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004160
4161 By default, distutils will build C++ extension modules with \"$CXX\".
4162 If this is not intended, then set CXX on the configure command line.
4163 " >&2;}
4164fi
4165
4166
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4168$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4169save_LDFLAGS="$LDFLAGS"
4170LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004171
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4173/* end confdefs.h. */
4174
4175int
4176main ()
4177{
4178
4179 ;
4180 return 0;
4181}
4182_ACEOF
4183if ac_fn_c_try_link "$LINENO"; then :
4184 NO_AS_NEEDED="-Wl,--no-as-needed"
4185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4186$as_echo "yes" >&6; }
4187else
4188 NO_AS_NEEDED=""
4189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4190$as_echo "no" >&6; }
4191fi
4192rm -f core conftest.err conftest.$ac_objext \
4193 conftest$ac_exeext conftest.$ac_ext
4194LDFLAGS="$save_LDFLAGS"
4195
4196
4197
4198# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004199ac_ext=c
4200ac_cpp='$CPP $CPPFLAGS'
4201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4205$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004206# On Suns, sometimes $CPP names a directory.
4207if test -n "$CPP" && test -d "$CPP"; then
4208 CPP=
4209fi
4210if test -z "$CPP"; then
Charles-François Natali6613c182011-11-27 12:41:06 +01004211 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004213else
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 # Double quotes because CPP needs to be expanded
4215 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4216 do
4217 ac_preproc_ok=false
4218for ac_c_preproc_warn_flag in '' yes
4219do
4220 # Use a header file that comes with gcc, so configuring glibc
4221 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004222 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4223 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004224 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004227/* end confdefs.h. */
4228#ifdef __STDC__
4229# include <limits.h>
4230#else
4231# include <assert.h>
4232#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004233 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004235if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004236
Matthias Kloseb9621712010-04-24 17:59:49 +00004237else
Martin v. Löwis11437992002-04-12 09:54:03 +00004238 # Broken: fails on valid input.
4239continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004240fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004241rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004247#include <ac_nonexistent.h>
4248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004249if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004250 # Broken: success on invalid input.
4251continue
4252else
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 # Passes both tests.
4254ac_preproc_ok=:
4255break
4256fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004257rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004258
4259done
4260# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004261rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004262if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 break
4264fi
4265
4266 done
4267 ac_cv_prog_CPP=$CPP
4268
4269fi
4270 CPP=$ac_cv_prog_CPP
4271else
4272 ac_cv_prog_CPP=$CPP
4273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4275$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004276ac_preproc_ok=false
4277for ac_c_preproc_warn_flag in '' yes
4278do
4279 # Use a header file that comes with gcc, so configuring glibc
4280 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004281 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4282 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 # On the NeXT, cc -E runs the code through the compiler's parser,
4284 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004286/* end confdefs.h. */
4287#ifdef __STDC__
4288# include <limits.h>
4289#else
4290# include <assert.h>
4291#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004294if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004295
Matthias Kloseb9621712010-04-24 17:59:49 +00004296else
Martin v. Löwis11437992002-04-12 09:54:03 +00004297 # Broken: fails on valid input.
4298continue
4299fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004300rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004301
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004306#include <ac_nonexistent.h>
4307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004308if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004309 # Broken: success on invalid input.
4310continue
4311else
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 # Passes both tests.
4313ac_preproc_ok=:
4314break
4315fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004316rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004317
4318done
4319# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004320rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004321if $ac_preproc_ok; then :
4322
Martin v. Löwis11437992002-04-12 09:54:03 +00004323else
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004326as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Charles-François Natali6613c182011-11-27 12:41:06 +01004327See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004328fi
4329
4330ac_ext=c
4331ac_cpp='$CPP $CPPFLAGS'
4332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4334ac_compiler_gnu=$ac_cv_c_compiler_gnu
4335
4336
Matthias Kloseb9621712010-04-24 17:59:49 +00004337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4338$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01004339if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004341else
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 # Loop through the user's path and test for each of PROGNAME-LIST
4345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4347do
4348 IFS=$as_save_IFS
4349 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 for ac_prog in grep ggrep; do
4351 for ac_exec_ext in '' $ac_executable_extensions; do
4352 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4353 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4354# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 # Check for GNU $ac_path_GREP
4356case `"$ac_path_GREP" --version 2>&1` in
4357*GNU*)
4358 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4359*)
4360 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 while :
4363 do
4364 cat "conftest.in" "conftest.in" >"conftest.tmp"
4365 mv "conftest.tmp" "conftest.in"
4366 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4369 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004370 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4372 # Best one so far, save it but keep looking for a better one
4373 ac_cv_path_GREP="$ac_path_GREP"
4374 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004375 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 # 10*(2^10) chars as input seems more than enough
4377 test $ac_count -gt 10 && break
4378 done
4379 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4380esac
4381
Matthias Kloseb9621712010-04-24 17:59:49 +00004382 $ac_path_GREP_found && break 3
4383 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004388 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 +00004389 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390else
4391 ac_cv_path_GREP=$GREP
4392fi
4393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4396$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 GREP="$ac_cv_path_GREP"
4398
4399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4401$as_echo_n "checking for egrep... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01004402if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404else
4405 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4406 then ac_cv_path_EGREP="$GREP -E"
4407 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004408 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 # Loop through the user's path and test for each of PROGNAME-LIST
4411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4413do
4414 IFS=$as_save_IFS
4415 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004416 for ac_prog in egrep; do
4417 for ac_exec_ext in '' $ac_executable_extensions; do
4418 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4419 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4420# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421 # Check for GNU $ac_path_EGREP
4422case `"$ac_path_EGREP" --version 2>&1` in
4423*GNU*)
4424 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4425*)
4426 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428 while :
4429 do
4430 cat "conftest.in" "conftest.in" >"conftest.tmp"
4431 mv "conftest.tmp" "conftest.in"
4432 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004433 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4435 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004436 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004437 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4438 # Best one so far, save it but keep looking for a better one
4439 ac_cv_path_EGREP="$ac_path_EGREP"
4440 ac_path_EGREP_max=$ac_count
4441 fi
4442 # 10*(2^10) chars as input seems more than enough
4443 test $ac_count -gt 10 && break
4444 done
4445 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4446esac
4447
Matthias Kloseb9621712010-04-24 17:59:49 +00004448 $ac_path_EGREP_found && break 3
4449 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004451 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004452IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004454 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 +00004455 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456else
4457 ac_cv_path_EGREP=$EGREP
4458fi
4459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460 fi
4461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4463$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004464 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004465
4466
Matthias Kloseb9621712010-04-24 17:59:49 +00004467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4468$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01004469if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 $as_echo_n "(cached) " >&6
4471else
4472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004473/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004474#include <stdlib.h>
4475#include <stdarg.h>
4476#include <string.h>
4477#include <float.h>
4478
4479int
4480main ()
4481{
4482
4483 ;
4484 return 0;
4485}
4486_ACEOF
4487if ac_fn_c_try_compile "$LINENO"; then :
4488 ac_cv_header_stdc=yes
4489else
4490 ac_cv_header_stdc=no
4491fi
4492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4493
4494if test $ac_cv_header_stdc = yes; then
4495 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4497/* end confdefs.h. */
4498#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004499
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004500_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004502 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004503
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004504else
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004506fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004507rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004508
Matthias Kloseb9621712010-04-24 17:59:49 +00004509fi
4510
4511if test $ac_cv_header_stdc = yes; then
4512 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4514/* end confdefs.h. */
4515#include <stdlib.h>
4516
4517_ACEOF
4518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4519 $EGREP "free" >/dev/null 2>&1; then :
4520
4521else
4522 ac_cv_header_stdc=no
4523fi
4524rm -f conftest*
4525
4526fi
4527
4528if test $ac_cv_header_stdc = yes; then
4529 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4530 if test "$cross_compiling" = yes; then :
4531 :
4532else
4533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4534/* end confdefs.h. */
4535#include <ctype.h>
4536#include <stdlib.h>
4537#if ((' ' & 0x0FF) == 0x020)
4538# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4539# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4540#else
4541# define ISLOWER(c) \
4542 (('a' <= (c) && (c) <= 'i') \
4543 || ('j' <= (c) && (c) <= 'r') \
4544 || ('s' <= (c) && (c) <= 'z'))
4545# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4546#endif
4547
4548#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4549int
4550main ()
4551{
4552 int i;
4553 for (i = 0; i < 256; i++)
4554 if (XOR (islower (i), ISLOWER (i))
4555 || toupper (i) != TOUPPER (i))
4556 return 2;
4557 return 0;
4558}
4559_ACEOF
4560if ac_fn_c_try_run "$LINENO"; then :
4561
4562else
4563 ac_cv_header_stdc=no
4564fi
4565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4566 conftest.$ac_objext conftest.beam conftest.$ac_ext
4567fi
4568
4569fi
4570fi
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4572$as_echo "$ac_cv_header_stdc" >&6; }
4573if test $ac_cv_header_stdc = yes; then
4574
4575$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4576
4577fi
4578
4579# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4580for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4581 inttypes.h stdint.h unistd.h
4582do :
4583 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4584ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4585"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004586if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004587 cat >>confdefs.h <<_ACEOF
4588#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4589_ACEOF
4590
4591fi
4592
4593done
4594
4595
4596
4597 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01004598if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004599 MINIX=yes
4600else
4601 MINIX=
4602fi
4603
4604
4605 if test "$MINIX" = yes; then
4606
4607$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4608
4609
4610$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4611
4612
4613$as_echo "#define _MINIX 1" >>confdefs.h
4614
4615 fi
4616
4617
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4619$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01004620if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004621 $as_echo_n "(cached) " >&6
4622else
4623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4624/* end confdefs.h. */
4625
4626# define __EXTENSIONS__ 1
4627 $ac_includes_default
4628int
4629main ()
4630{
4631
4632 ;
4633 return 0;
4634}
4635_ACEOF
4636if ac_fn_c_try_compile "$LINENO"; then :
4637 ac_cv_safe_to_define___extensions__=yes
4638else
4639 ac_cv_safe_to_define___extensions__=no
4640fi
4641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4642fi
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4644$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4645 test $ac_cv_safe_to_define___extensions__ = yes &&
4646 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4647
4648 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4649
4650 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4651
4652 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4653
4654 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4655
4656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658# Check for unsupported systems
4659case $ac_sys_system/$ac_sys_release in
4660atheos*|Linux*/1*)
4661 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4662 echo See README for details.
4663 exit 1;;
4664esac
4665
4666
Matthias Kloseb9621712010-04-24 17:59:49 +00004667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4668$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004669
4670# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004671if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004672 withval=$with_suffix;
4673 case $withval in
4674 no) EXEEXT=;;
4675 yes) EXEEXT=.exe;;
4676 *) EXEEXT=$withval;;
4677 esac
4678fi
4679
Matthias Kloseb9621712010-04-24 17:59:49 +00004680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4681$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004682
4683# Test whether we're running on a non-case-sensitive system, in which
4684# case we give a warning if no ext is given
4685
Matthias Kloseb9621712010-04-24 17:59:49 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4687$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004688if test ! -d CaseSensitiveTestDir; then
4689mkdir CaseSensitiveTestDir
4690fi
4691
4692if test -d casesensitivetestdir
4693then
Matthias Kloseb9621712010-04-24 17:59:49 +00004694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4695$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004696 BUILDEXEEXT=.exe
4697else
Matthias Kloseb9621712010-04-24 17:59:49 +00004698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4699$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004700 BUILDEXEEXT=$EXEEXT
4701fi
4702rmdir CaseSensitiveTestDir
4703
4704case $MACHDEP in
4705bsdos*)
4706 case $CC in
4707 gcc) CC="$CC -D_HAVE_BSDI";;
4708 esac;;
4709esac
4710
4711case $ac_sys_system in
4712hp*|HP*)
4713 case $CC in
4714 cc|*/cc) CC="$CC -Ae";;
4715 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004716esac
4717
4718
4719
Matthias Kloseb9621712010-04-24 17:59:49 +00004720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4721$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004722if test -z "$LIBRARY"
4723then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004724 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4727$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004728
4729# LDLIBRARY is the name of the library to link against (as opposed to the
4730# name of the library into which to insert object files). BLDLIBRARY is also
4731# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4732# is blank as the main program is not linked directly against LDLIBRARY.
4733# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4734# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4735# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4736# DLLLIBRARY is the shared (i.e., DLL) library.
4737#
4738# RUNSHARED is used to run shared python without installed libraries
4739#
4740# INSTSONAME is the name of the shared library that will be use to install
4741# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004742#
4743# LDVERSION is the shared library version number, normally the Python version
4744# with the ABI build flags appended.
4745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004746
4747
4748
4749
4750
4751
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753LDLIBRARY="$LIBRARY"
4754BLDLIBRARY='$(LDLIBRARY)'
4755INSTSONAME='$(LDLIBRARY)'
4756DLLLIBRARY=''
4757LDLIBRARYDIR=''
4758RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004759LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760
4761# LINKCC is the command that links the python executable -- default is $(CC).
4762# If CXX is set, and if it is needed to link a main function that was
4763# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4764# python might then depend on the C++ runtime
4765# This is altered for AIX in order to build the export list before
4766# linking.
4767
Matthias Kloseb9621712010-04-24 17:59:49 +00004768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4769$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004770if test -z "$LINKCC"
4771then
4772 LINKCC='$(PURIFY) $(MAINCC)'
4773 case $ac_sys_system in
4774 AIX*)
4775 exp_extra="\"\""
4776 if test $ac_sys_release -ge 5 -o \
4777 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4778 exp_extra="."
4779 fi
4780 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781 QNX*)
4782 # qcc must be used because the other compilers do not
4783 # support -N.
4784 LINKCC=qcc;;
4785 esac
4786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4788$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789
4790# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4791# make sure we default having it set to "no": this is used by
4792# distutils.unixccompiler to know if it should add --enable-new-dtags
4793# to linker command lines, and failing to detect GNU ld simply results
4794# in the same bahaviour as before.
4795
Matthias Kloseb9621712010-04-24 17:59:49 +00004796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4797$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004798ac_prog=ld
4799if test "$GCC" = yes; then
4800 ac_prog=`$CC -print-prog-name=ld`
4801fi
4802case `"$ac_prog" -V 2>&1 < /dev/null` in
4803 *GNU*)
4804 GNULD=yes;;
4805 *)
4806 GNULD=no;;
4807esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4809$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4812$as_echo_n "checking for inline... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01004813if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004814 $as_echo_n "(cached) " >&6
4815else
4816 ac_cv_c_inline=no
4817for ac_kw in inline __inline__ __inline; do
4818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4819/* end confdefs.h. */
4820#ifndef __cplusplus
4821typedef int foo_t;
4822static $ac_kw foo_t static_foo () {return 0; }
4823$ac_kw foo_t foo () {return 0; }
4824#endif
4825
4826_ACEOF
4827if ac_fn_c_try_compile "$LINENO"; then :
4828 ac_cv_c_inline=$ac_kw
4829fi
4830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4831 test "$ac_cv_c_inline" != no && break
4832done
4833
4834fi
4835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4836$as_echo "$ac_cv_c_inline" >&6; }
4837
4838case $ac_cv_c_inline in
4839 inline | yes) ;;
4840 *)
4841 case $ac_cv_c_inline in
4842 no) ac_val=;;
4843 *) ac_val=$ac_cv_c_inline;;
4844 esac
4845 cat >>confdefs.h <<_ACEOF
4846#ifndef __cplusplus
4847#define inline $ac_val
4848#endif
4849_ACEOF
4850 ;;
4851esac
4852
4853if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004854
4855$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004856
4857
4858fi
4859
4860
Matthias Kloseb9621712010-04-24 17:59:49 +00004861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4862$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004864if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865 enableval=$enable_shared;
4866fi
4867
4868
4869if test -z "$enable_shared"
4870then
4871 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004872 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873 enable_shared="yes";;
4874 *)
4875 enable_shared="no";;
4876 esac
4877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4879$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004880
Matthias Kloseb9621712010-04-24 17:59:49 +00004881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4882$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004883# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004884if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885 enableval=$enable_profiling; ac_save_cc="$CC"
4886 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004887 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888 ac_enable_profiling="no"
4889else
Matthias Kloseb9621712010-04-24 17:59:49 +00004890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891/* end confdefs.h. */
4892int main() { return 0; }
4893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004894if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895 ac_enable_profiling="yes"
4896else
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4900 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004901fi
4902
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903 CC="$ac_save_cc"
4904fi
4905
Matthias Kloseb9621712010-04-24 17:59:49 +00004906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4907$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908
4909case "$ac_enable_profiling" in
4910 "yes")
4911 BASECFLAGS="-pg $BASECFLAGS"
4912 LDFLAGS="-pg $LDFLAGS"
4913 ;;
4914esac
4915
Matthias Kloseb9621712010-04-24 17:59:49 +00004916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4917$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918
4919# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4920# library that we build, but we do not want to link against it (we
4921# will find it with a -framework option). For this reason there is an
4922# extra variable BLDLIBRARY against which Python and the extension
4923# modules are linked, BLDLIBRARY. This is normally the same as
4924# LDLIBRARY, but empty for MacOSX framework builds.
4925if test "$enable_framework"
4926then
4927 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4928 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4929 BLDLIBRARY=''
4930else
4931 BLDLIBRARY='$(LDLIBRARY)'
4932fi
4933
4934# Other platforms follow
4935if test $enable_shared = "yes"; then
4936
Matthias Kloseb9621712010-04-24 17:59:49 +00004937$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938
4939 case $ac_sys_system in
4940 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004941 LDLIBRARY='libpython$(LDVERSION).dll.a'
4942 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943 ;;
4944 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004945 LDLIBRARY='libpython$(LDVERSION).so'
4946 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4948 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004949 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004950 then
4951 PY3LIBRARY=libpython3.so
4952 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004954 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004955 LDLIBRARY='libpython$(LDVERSION).so'
4956 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4958 case $ac_sys_system in
4959 FreeBSD*)
4960 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4961 ;;
4962 esac
4963 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004964 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004965 then
4966 PY3LIBRARY=libpython3.so
4967 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 ;;
4969 hp*|HP*)
4970 case `uname -m` in
4971 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004972 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 ;;
4974 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004975 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004976 ;;
4977 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004978 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4980 ;;
4981 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004982 LDLIBRARY='libpython$(LDVERSION).so'
4983 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004984 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4985 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004987 LDLIBRARY='libpython$(LDVERSION).dylib'
4988 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4990 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004991 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004992 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004993 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4994 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995
4996 esac
4997else # shared is disabled
4998 case $ac_sys_system in
4999 CYGWIN*)
5000 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005001 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005002 ;;
5003 esac
5004fi
5005
Matthias Kloseb9621712010-04-24 17:59:49 +00005006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5007$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008
5009if test -n "$ac_tool_prefix"; then
5010 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5011set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5013$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005014if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005015 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016else
5017 if test -n "$RANLIB"; then
5018 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5019else
5020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5021for as_dir in $PATH
5022do
5023 IFS=$as_save_IFS
5024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5027 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 break 2
5030 fi
5031done
Matthias Kloseb9621712010-04-24 17:59:49 +00005032 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033IFS=$as_save_IFS
5034
5035fi
5036fi
5037RANLIB=$ac_cv_prog_RANLIB
5038if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5040$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041else
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044fi
5045
5046
5047fi
5048if test -z "$ac_cv_prog_RANLIB"; then
5049 ac_ct_RANLIB=$RANLIB
5050 # Extract the first word of "ranlib", so it can be a program name with args.
5051set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5053$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005054if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056else
5057 if test -n "$ac_ct_RANLIB"; then
5058 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5059else
5060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5061for as_dir in $PATH
5062do
5063 IFS=$as_save_IFS
5064 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5067 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069 break 2
5070 fi
5071done
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073IFS=$as_save_IFS
5074
5075fi
5076fi
5077ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5078if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5080$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081else
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5083$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084fi
5085
5086 if test "x$ac_ct_RANLIB" = x; then
5087 RANLIB=":"
5088 else
5089 case $cross_compiling:$ac_tool_warned in
5090yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005091{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5092$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093ac_tool_warned=yes ;;
5094esac
5095 RANLIB=$ac_ct_RANLIB
5096 fi
5097else
5098 RANLIB="$ac_cv_prog_RANLIB"
5099fi
5100
5101
5102for ac_prog in ar aal
5103do
5104 # Extract the first word of "$ac_prog", so it can be a program name with args.
5105set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5107$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005108if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005110else
5111 if test -n "$AR"; then
5112 ac_cv_prog_AR="$AR" # Let the user override the test.
5113else
5114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5115for as_dir in $PATH
5116do
5117 IFS=$as_save_IFS
5118 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5121 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 break 2
5124 fi
5125done
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005127IFS=$as_save_IFS
5128
5129fi
5130fi
5131AR=$ac_cv_prog_AR
5132if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5134$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135else
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138fi
5139
5140
5141 test -n "$AR" && break
5142done
5143test -n "$AR" || AR="ar"
5144
5145
5146# tweak ARFLAGS only if the user didn't set it on the command line
5147
5148if test -z "$ARFLAGS"
5149then
5150 ARFLAGS="rc"
5151fi
5152
5153
5154# Extract the first word of "svnversion", so it can be a program name with args.
5155set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005158if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005159 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160else
5161 if test -n "$SVNVERSION"; then
5162 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5163else
5164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165for as_dir in $PATH
5166do
5167 IFS=$as_save_IFS
5168 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005169 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5171 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173 break 2
5174 fi
5175done
Matthias Kloseb9621712010-04-24 17:59:49 +00005176 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177IFS=$as_save_IFS
5178
5179 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5180fi
5181fi
5182SVNVERSION=$ac_cv_prog_SVNVERSION
5183if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5185$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186else
Matthias Kloseb9621712010-04-24 17:59:49 +00005187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005189fi
5190
5191
5192if test $SVNVERSION = found
5193then
5194 SVNVERSION="svnversion \$(srcdir)"
5195else
5196 SVNVERSION="echo Unversioned directory"
5197fi
5198
Georg Brandl1ca2e792011-03-05 20:51:24 +01005199
5200
5201
Georg Brandl187c1112011-07-03 09:23:20 +02005202
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005203if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005204then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005205# Extract the first word of "hg", so it can be a program name with args.
5206set dummy hg; ac_word=$2
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005209if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005210 $as_echo_n "(cached) " >&6
5211else
5212 if test -n "$HAS_HG"; then
5213 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5214else
5215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216for as_dir in $PATH
5217do
5218 IFS=$as_save_IFS
5219 test -z "$as_dir" && as_dir=.
5220 for ac_exec_ext in '' $ac_executable_extensions; do
5221 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5222 ac_cv_prog_HAS_HG="found"
5223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224 break 2
5225 fi
5226done
5227 done
5228IFS=$as_save_IFS
5229
5230 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5231fi
5232fi
5233HAS_HG=$ac_cv_prog_HAS_HG
5234if test -n "$HAS_HG"; then
5235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5236$as_echo "$HAS_HG" >&6; }
5237else
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5239$as_echo "no" >&6; }
5240fi
5241
5242
Georg Brandl187c1112011-07-03 09:23:20 +02005243else
5244HAS_HG=no-repository
5245fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005246if test $HAS_HG = found
5247then
5248 HGVERSION="hg id -i \$(srcdir)"
5249 HGTAG="hg id -t \$(srcdir)"
5250 HGBRANCH="hg id -b \$(srcdir)"
5251else
5252 HGVERSION=""
5253 HGTAG=""
5254 HGBRANCH=""
5255fi
5256
Georg Brandl187c1112011-07-03 09:23:20 +02005257
5258DISABLE_ASDLGEN=""
5259# Extract the first word of "python", so it can be a program name with args.
5260set dummy python; ac_word=$2
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005263if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005264 $as_echo_n "(cached) " >&6
5265else
5266 if test -n "$HAS_PYTHON"; then
5267 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5268else
5269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272 IFS=$as_save_IFS
5273 test -z "$as_dir" && as_dir=.
5274 for ac_exec_ext in '' $ac_executable_extensions; do
5275 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5276 ac_cv_prog_HAS_PYTHON="found"
5277 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278 break 2
5279 fi
5280done
5281 done
5282IFS=$as_save_IFS
5283
5284 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5285fi
5286fi
5287HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5288if test -n "$HAS_PYTHON"; then
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5290$as_echo "$HAS_PYTHON" >&6; }
5291else
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297if test $HAS_HG != found -o $HAS_PYTHON != found
5298then
5299 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5300fi
5301
5302
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303case $MACHDEP in
5304bsdos*|hp*|HP*)
5305 # install -d does not work on BSDI or HP-UX
5306 if test -z "$INSTALL"
5307 then
5308 INSTALL="${srcdir}/install-sh -c"
5309 fi
5310esac
5311ac_aux_dir=
5312for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005313 if test -f "$ac_dir/install-sh"; then
5314 ac_aux_dir=$ac_dir
5315 ac_install_sh="$ac_aux_dir/install-sh -c"
5316 break
5317 elif test -f "$ac_dir/install.sh"; then
5318 ac_aux_dir=$ac_dir
5319 ac_install_sh="$ac_aux_dir/install.sh -c"
5320 break
5321 elif test -f "$ac_dir/shtool"; then
5322 ac_aux_dir=$ac_dir
5323 ac_install_sh="$ac_aux_dir/shtool install -c"
5324 break
5325 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005326done
5327if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005328 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329fi
5330
5331# These three variables are undocumented and unsupported,
5332# and are intended to be withdrawn in a future Autoconf release.
5333# They can cause serious problems if a builder's source tree is in a directory
5334# whose full name contains unusual characters.
5335ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5336ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5337ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5338
5339
5340# Find a good install program. We prefer a C program (faster),
5341# so one script is as good as another. But avoid the broken or
5342# incompatible versions:
5343# SysV /etc/install, /usr/sbin/install
5344# SunOS /usr/etc/install
5345# IRIX /sbin/install
5346# AIX /bin/install
5347# AmigaOS /C/install, which installs bootblocks on floppy discs
5348# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5349# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5350# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5351# OS/2's system install, which has a completely different semantic
5352# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005353# Reject install programs that cannot install multiple files.
5354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5355$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356if test -z "$INSTALL"; then
Charles-François Natali6613c182011-11-27 12:41:06 +01005357if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359else
5360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5361for as_dir in $PATH
5362do
5363 IFS=$as_save_IFS
5364 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 # Account for people who put trailing slashes in PATH elements.
5366case $as_dir/ in #((
5367 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005369 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005370 /usr/ucb/* ) ;;
5371 *)
5372 # OSF1 and SCO ODT 3.0 have their own names for install.
5373 # Don't use installbsd from OSF since it installs stuff as root
5374 # by default.
5375 for ac_prog in ginstall scoinst install; do
5376 for ac_exec_ext in '' $ac_executable_extensions; do
5377 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5378 if test $ac_prog = install &&
5379 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5380 # AIX install. It has an incompatible calling convention.
5381 :
5382 elif test $ac_prog = install &&
5383 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5384 # program-specific install script used by HP pwplus--don't use.
5385 :
5386 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 rm -rf conftest.one conftest.two conftest.dir
5388 echo one > conftest.one
5389 echo two > conftest.two
5390 mkdir conftest.dir
5391 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5392 test -s conftest.one && test -s conftest.two &&
5393 test -s conftest.dir/conftest.one &&
5394 test -s conftest.dir/conftest.two
5395 then
5396 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5397 break 3
5398 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399 fi
5400 fi
5401 done
5402 done
5403 ;;
5404esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005405
5406 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407IFS=$as_save_IFS
5408
Matthias Kloseb9621712010-04-24 17:59:49 +00005409rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410
5411fi
5412 if test "${ac_cv_path_install+set}" = set; then
5413 INSTALL=$ac_cv_path_install
5414 else
5415 # As a last resort, use the slow shell script. Don't cache a
5416 # value for INSTALL within a source directory, because that will
5417 # break other packages using the cache if that directory is
5418 # removed, or if the value is a relative name.
5419 INSTALL=$ac_install_sh
5420 fi
5421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5423$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424
5425# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5426# It thinks the first close brace ends the variable substitution.
5427test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5428
5429test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5430
5431test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5432
5433
5434# Not every filesystem supports hard links
5435
5436if test -z "$LN" ; then
5437 case $ac_sys_system in
5438 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439 *) LN=ln;;
5440 esac
5441fi
5442
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005443# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005444
5445ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005446
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5449$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
5451# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005452if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453 withval=$with_pydebug;
5454if test "$withval" != no
5455then
5456
Matthias Kloseb9621712010-04-24 17:59:49 +00005457$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458
Matthias Kloseb9621712010-04-24 17:59:49 +00005459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5460$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005462 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005463else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5464$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465fi
5466else
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5468$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005469fi
5470
5471
5472# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5473# merged with this chunk of code?
5474
5475# Optimizer/debugger flags
5476# ------------------------
5477# (The following bit of code is complicated enough - please keep things
5478# indented properly. Just pretend you're editing Python code. ;-)
5479
5480# There are two parallel sets of case statements below, one that checks to
5481# see if OPT was set and one that does BASECFLAGS setting based upon
5482# compiler and platform. BASECFLAGS tweaks need to be made even if the
5483# user set OPT.
5484
5485# tweak OPT based on compiler and platform, only if the user didn't set
5486# it on the command line
5487
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005488if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489then
5490 case $GCC in
5491 yes)
5492 if test "$CC" != 'g++' ; then
5493 STRICT_PROTO="-Wstrict-prototypes"
5494 fi
5495 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5496 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5497 WRAP="-fwrapv"
5498 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005499
5500 # Clang also needs -fwrapv
5501 if test "$CC" = "clang" ; then
5502 WRAP="-fwrapv"
5503 fi
5504
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505 case $ac_cv_prog_cc_g in
5506 yes)
5507 if test "$Py_DEBUG" = 'true' ; then
5508 # Optimization messes up debuggers, so turn it off for
5509 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005510 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511 else
5512 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5513 fi
5514 ;;
5515 *)
5516 OPT="-O3 -Wall $STRICT_PROTO"
5517 ;;
5518 esac
5519 case $ac_sys_system in
5520 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5521 ;;
5522 esac
5523 ;;
5524
5525 *)
5526 OPT="-O"
5527 ;;
5528 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529fi
5530
5531
5532
5533# The -arch flags for universal builds on OSX
5534UNIVERSAL_ARCH_FLAGS=
5535
5536
5537# tweak BASECFLAGS based on compiler and platform
5538case $GCC in
5539yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005540 # Python doesn't violate C99 aliasing rules, but older versions of
5541 # GCC produce warnings for legal Python code. Enable
5542 # -fno-strict-aliasing on versions of GCC that support but produce
5543 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5545$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546 ac_save_cc="$CC"
5547 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005548 save_CFLAGS="$CFLAGS"
Charles-François Natali6613c182011-11-27 12:41:06 +01005549 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005551else
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005554
Matthias Kloseb159a552010-04-25 21:00:44 +00005555
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005556int
5557main ()
5558{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005559
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005560 ;
5561 return 0;
5562}
Matthias Kloseb159a552010-04-25 21:00:44 +00005563
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005565if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005566
5567 CC="$ac_save_cc -fstrict-aliasing"
5568 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005570/* end confdefs.h. */
5571
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005572 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005573int
5574main ()
5575{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005576double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005577 ;
5578 return 0;
5579}
Matthias Kloseb159a552010-04-25 21:00:44 +00005580
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005582if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005583
5584 ac_cv_no_strict_aliasing=no
5585
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586else
Matthias Kloseb159a552010-04-25 21:00:44 +00005587
5588 ac_cv_no_strict_aliasing=yes
5589
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005590fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005592
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005593else
Matthias Kloseb159a552010-04-25 21:00:44 +00005594
5595 ac_cv_no_strict_aliasing=no
5596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005599fi
5600
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005601 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5604$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005605 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606 then
5607 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5608 fi
5609
5610 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5611 # support. Without this, treatment of subnormals doesn't follow
5612 # the standard.
5613 case $ac_sys_machine in
5614 alpha*)
5615 BASECFLAGS="$BASECFLAGS -mieee"
5616 ;;
5617 esac
5618
5619 case $ac_sys_system in
5620 SCO_SV*)
5621 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5622 ;;
5623 # is there any other compiler on Darwin besides gcc?
5624 Darwin*)
5625 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5626 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005627 if test "${CC}" = gcc
5628 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5630$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005631 case "${UNIVERSALSDK}" in
5632 */MacOSX10.4u.sdk)
5633 # Build using 10.4 SDK, force usage of gcc when the
5634 # compiler is gcc, otherwise the user will get very
5635 # confusing error messages when building on OSX 10.6
5636 CC=gcc-4.0
5637 CPP=cpp-4.0
5638 ;;
5639 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5641$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005642 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643
5644
5645 if test "${enable_universalsdk}"; then
5646 UNIVERSAL_ARCH_FLAGS=""
5647 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5648 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5649 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005650 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5652 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005653 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005654 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655
5656 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5657 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005658 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005659 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005661 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5662 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005663 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005664 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005665
5666 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5667 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005668 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005669 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005670
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005672 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 +00005673
5674 fi
5675
5676
Ronald Oussoren666028b2010-04-18 19:07:43 +00005677 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5678 if test "${UNIVERSALSDK}" != "/"
5679 then
5680 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5681 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005682 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 fi
5684 fi
5685
5686 # Calculate the right deployment target for this build.
5687 #
5688 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5689 if test ${cur_target} '>' 10.2; then
5690 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005691 if test ${enable_universalsdk}; then
5692 if test "${UNIVERSAL_ARCHS}" = "all"; then
5693 # Ensure that the default platform for a
5694 # 4-way universal build is OSX 10.5,
5695 # that's the first OS release where
5696 # 4-way builds make sense.
5697 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005698
5699 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5700 cur_target='10.5'
5701
5702 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5703 cur_target='10.5'
5704
5705 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5706 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005707 fi
5708 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005709 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005710 # On Intel macs default to a deployment
5711 # target of 10.4, that's the first OSX
5712 # release with Intel support.
5713 cur_target="10.4"
5714 fi
5715 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 fi
5717 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5718
5719 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5720 # environment with a value that is the same as what we'll use
5721 # in the Makefile to ensure that we'll get the same compiler
5722 # environment during configure and build time.
5723 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5724 export MACOSX_DEPLOYMENT_TARGET
5725 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5726
5727 ;;
5728 OSF*)
5729 BASECFLAGS="$BASECFLAGS -mieee"
5730 ;;
5731 esac
5732 ;;
5733
5734*)
5735 case $ac_sys_system in
5736 OpenUNIX*|UnixWare*)
5737 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5738 ;;
5739 OSF*)
5740 BASECFLAGS="$BASECFLAGS -ieee -std"
5741 ;;
5742 SCO_SV*)
5743 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5744 ;;
5745 esac
5746 ;;
5747esac
5748
5749if test "$Py_DEBUG" = 'true'; then
5750 :
5751else
5752 OPT="-DNDEBUG $OPT"
5753fi
5754
5755if test "$ac_arch_flags"
5756then
5757 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5758fi
5759
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760# Check whether GCC supports PyArg_ParseTuple format
5761if test "$GCC" = "yes"
5762then
Matthias Kloseb9621712010-04-24 17:59:49 +00005763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5764$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 save_CFLAGS=$CFLAGS
5766 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768/* end confdefs.h. */
5769
5770 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771int
5772main ()
5773{
5774
5775 ;
5776 return 0;
5777}
Matthias Kloseb159a552010-04-25 21:00:44 +00005778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005780if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
Matthias Kloseb159a552010-04-25 21:00:44 +00005782
Matthias Kloseb9621712010-04-24 17:59:49 +00005783$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784
Matthias Kloseb159a552010-04-25 21:00:44 +00005785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005786$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788else
Matthias Kloseb159a552010-04-25 21:00:44 +00005789
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005791$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792
5793fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5795 CFLAGS=$save_CFLAGS
5796fi
5797
5798# On some compilers, pthreads are available without further options
5799# (e.g. MacOS X). On some of these systems, the compiler will not
5800# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5801# So we have to see first whether pthreads are available without
5802# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5804$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005805if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005806 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807else
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 ac_cv_pthread_is_default=no
5810else
Matthias Kloseb9621712010-04-24 17:59:49 +00005811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812/* end confdefs.h. */
5813
5814#include <pthread.h>
5815
5816void* routine(void* p){return NULL;}
5817
5818int main(){
5819 pthread_t p;
5820 if(pthread_create(&p,NULL,routine,NULL)!=0)
5821 return 1;
5822 (void)pthread_detach(p);
5823 return 0;
5824}
5825
5826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005827if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828
5829 ac_cv_pthread_is_default=yes
5830 ac_cv_kthread=no
5831 ac_cv_pthread=no
5832
5833else
Matthias Kloseb9621712010-04-24 17:59:49 +00005834 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
5839
5840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
5842
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5844$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845
5846
5847if test $ac_cv_pthread_is_default = yes
5848then
5849 ac_cv_kpthread=no
5850else
5851# -Kpthread, if available, provides the right #defines
5852# and linker options to make pthread_create available
5853# Some compilers won't report that they do not support -Kpthread,
5854# so we need to run a program to see whether it really made the
5855# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5857$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005858if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005859 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860else
5861 ac_save_cc="$CC"
5862CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005863if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 ac_cv_kpthread=no
5865else
Matthias Kloseb9621712010-04-24 17:59:49 +00005866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867/* end confdefs.h. */
5868
5869#include <pthread.h>
5870
5871void* routine(void* p){return NULL;}
5872
5873int main(){
5874 pthread_t p;
5875 if(pthread_create(&p,NULL,routine,NULL)!=0)
5876 return 1;
5877 (void)pthread_detach(p);
5878 return 0;
5879}
5880
5881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005882if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883 ac_cv_kpthread=yes
5884else
Matthias Kloseb9621712010-04-24 17:59:49 +00005885 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5888 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
5890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891CC="$ac_save_cc"
5892fi
5893
Matthias Kloseb9621712010-04-24 17:59:49 +00005894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5895$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896fi
5897
5898if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5899then
5900# -Kthread, if available, provides the right #defines
5901# and linker options to make pthread_create available
5902# Some compilers won't report that they do not support -Kthread,
5903# so we need to run a program to see whether it really made the
5904# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5906$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005907if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005908 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909else
5910 ac_save_cc="$CC"
5911CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005912if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ac_cv_kthread=no
5914else
Matthias Kloseb9621712010-04-24 17:59:49 +00005915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916/* end confdefs.h. */
5917
5918#include <pthread.h>
5919
5920void* routine(void* p){return NULL;}
5921
5922int main(){
5923 pthread_t p;
5924 if(pthread_create(&p,NULL,routine,NULL)!=0)
5925 return 1;
5926 (void)pthread_detach(p);
5927 return 0;
5928}
5929
5930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005931if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ac_cv_kthread=yes
5933else
Matthias Kloseb9621712010-04-24 17:59:49 +00005934 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5937 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938fi
5939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940CC="$ac_save_cc"
5941fi
5942
Matthias Kloseb9621712010-04-24 17:59:49 +00005943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5944$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945fi
5946
5947if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5948then
5949# -pthread, if available, provides the right #defines
5950# and linker options to make pthread_create available
5951# Some compilers won't report that they do not support -pthread,
5952# so we need to run a program to see whether it really made the
5953# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5955$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005956if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958else
5959 ac_save_cc="$CC"
5960CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005961if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ac_cv_pthread=no
5963else
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
5967#include <pthread.h>
5968
5969void* routine(void* p){return NULL;}
5970
5971int main(){
5972 pthread_t p;
5973 if(pthread_create(&p,NULL,routine,NULL)!=0)
5974 return 1;
5975 (void)pthread_detach(p);
5976 return 0;
5977}
5978
5979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005980if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 ac_cv_pthread=yes
5982else
Matthias Kloseb9621712010-04-24 17:59:49 +00005983 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987fi
5988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989CC="$ac_save_cc"
5990fi
5991
Matthias Kloseb9621712010-04-24 17:59:49 +00005992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5993$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994fi
5995
5996# If we have set a CC compiler flag for thread support then
5997# check if it works for CXX, too.
5998ac_cv_cxx_thread=no
5999if test ! -z "$CXX"
6000then
Matthias Kloseb9621712010-04-24 17:59:49 +00006001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6002$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003ac_save_cxx="$CXX"
6004
6005if test "$ac_cv_kpthread" = "yes"
6006then
6007 CXX="$CXX -Kpthread"
6008 ac_cv_cxx_thread=yes
6009elif test "$ac_cv_kthread" = "yes"
6010then
6011 CXX="$CXX -Kthread"
6012 ac_cv_cxx_thread=yes
6013elif test "$ac_cv_pthread" = "yes"
6014then
6015 CXX="$CXX -pthread"
6016 ac_cv_cxx_thread=yes
6017fi
6018
6019if test $ac_cv_cxx_thread = yes
6020then
6021 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6022 $CXX -c conftest.$ac_ext 2>&5
6023 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6024 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6025 then
6026 ac_cv_cxx_thread=yes
6027 else
6028 ac_cv_cxx_thread=no
6029 fi
6030 rm -fr conftest*
6031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6033$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034fi
6035CXX="$ac_save_cxx"
6036
6037
6038# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6040$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006041if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043else
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045/* end confdefs.h. */
6046#include <stdlib.h>
6047#include <stdarg.h>
6048#include <string.h>
6049#include <float.h>
6050
6051int
6052main ()
6053{
6054
6055 ;
6056 return 0;
6057}
6058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006059if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060 ac_cv_header_stdc=yes
6061else
Matthias Kloseb9621712010-04-24 17:59:49 +00006062 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6065
6066if test $ac_cv_header_stdc = yes; then
6067 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069/* end confdefs.h. */
6070#include <string.h>
6071
6072_ACEOF
6073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 $EGREP "memchr" >/dev/null 2>&1; then :
6075
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076else
6077 ac_cv_header_stdc=no
6078fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006079rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080
6081fi
6082
6083if test $ac_cv_header_stdc = yes; then
6084 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086/* end confdefs.h. */
6087#include <stdlib.h>
6088
6089_ACEOF
6090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 $EGREP "free" >/dev/null 2>&1; then :
6092
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093else
6094 ac_cv_header_stdc=no
6095fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006096rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097
6098fi
6099
6100if test $ac_cv_header_stdc = yes; then
6101 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103 :
6104else
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106/* end confdefs.h. */
6107#include <ctype.h>
6108#include <stdlib.h>
6109#if ((' ' & 0x0FF) == 0x020)
6110# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6111# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6112#else
6113# define ISLOWER(c) \
6114 (('a' <= (c) && (c) <= 'i') \
6115 || ('j' <= (c) && (c) <= 'r') \
6116 || ('s' <= (c) && (c) <= 'z'))
6117# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6118#endif
6119
6120#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6121int
6122main ()
6123{
6124 int i;
6125 for (i = 0; i < 256; i++)
6126 if (XOR (islower (i), ISLOWER (i))
6127 || toupper (i) != TOUPPER (i))
6128 return 2;
6129 return 0;
6130}
6131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006132if ac_fn_c_try_run "$LINENO"; then :
6133
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134else
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139fi
6140
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141fi
6142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6144$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145if test $ac_cv_header_stdc = yes; then
6146
Matthias Kloseb9621712010-04-24 17:59:49 +00006147$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148
6149fi
6150
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006151for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6152fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006153ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006154shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006155unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006156sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6157sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006158sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006159sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006160sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006161sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006162bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006163do :
6164 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6165ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006166if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006167 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006168#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006169_ACEOF
6170
6171fi
6172
Guido van Rossum627b2d71993-12-24 10:39:16 +00006173done
6174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006175ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006176for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6179$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006180if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006181 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006182else
Matthias Kloseb9621712010-04-24 17:59:49 +00006183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006184/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006185#include <sys/types.h>
6186#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006187
Martin v. Löwis11437992002-04-12 09:54:03 +00006188int
6189main ()
6190{
6191if ((DIR *) 0)
6192return 0;
6193 ;
6194 return 0;
6195}
6196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006198 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006199else
Matthias Kloseb9621712010-04-24 17:59:49 +00006200 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006204eval ac_res=\$$as_ac_Header
6205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6206$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006207if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006208 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006209#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006210_ACEOF
6211
6212ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006213fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006214
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006215done
6216# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6217if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6219$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006220if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006221 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006222else
Martin v. Löwis11437992002-04-12 09:54:03 +00006223 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006227/* Override any GCC internal prototype to avoid an error.
6228 Use char because int might match the return type of a GCC
6229 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006230#ifdef __cplusplus
6231extern "C"
6232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006233char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006234int
6235main ()
6236{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006237return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006238 ;
6239 return 0;
6240}
6241_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006242for ac_lib in '' dir; do
6243 if test -z "$ac_lib"; then
6244 ac_res="none required"
6245 else
6246 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006247 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006249 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006250 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006252rm -f core conftest.err conftest.$ac_objext \
6253 conftest$ac_exeext
Charles-François Natali6613c182011-11-27 12:41:06 +01006254 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006257done
Charles-François Natali6613c182011-11-27 12:41:06 +01006258if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260else
6261 ac_cv_search_opendir=no
6262fi
6263rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006264LIBS=$ac_func_search_save_LIBS
6265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6267$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006268ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006269if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006270 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006271
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006272fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006273
Michael W. Hudson54241132001-12-07 15:38:26 +00006274else
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6276$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006277if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006279else
6280 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006284/* Override any GCC internal prototype to avoid an error.
6285 Use char because int might match the return type of a GCC
6286 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006287#ifdef __cplusplus
6288extern "C"
6289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006290char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006291int
6292main ()
6293{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006294return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006295 ;
6296 return 0;
6297}
6298_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006299for ac_lib in '' x; do
6300 if test -z "$ac_lib"; then
6301 ac_res="none required"
6302 else
6303 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006304 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006305 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006306 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006307 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006309rm -f core conftest.err conftest.$ac_objext \
6310 conftest$ac_exeext
Charles-François Natali6613c182011-11-27 12:41:06 +01006311 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006312 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006314done
Charles-François Natali6613c182011-11-27 12:41:06 +01006315if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006317else
6318 ac_cv_search_opendir=no
6319fi
6320rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006321LIBS=$ac_func_search_save_LIBS
6322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6324$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006325ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006326if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006327 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006328
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006329fi
6330
6331fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006332
Matthias Kloseb9621712010-04-24 17:59:49 +00006333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6334$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006335if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006336 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006337else
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006339/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006340#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341int
6342main ()
6343{
6344return makedev(0, 0);
6345 ;
6346 return 0;
6347}
6348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006350 ac_cv_header_sys_types_h_makedev=yes
6351else
Matthias Kloseb9621712010-04-24 17:59:49 +00006352 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006354rm -f core conftest.err conftest.$ac_objext \
6355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356
6357fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6359$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006360
6361if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006362ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006363if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006364
Matthias Kloseb9621712010-04-24 17:59:49 +00006365$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366
6367fi
6368
6369
6370
6371 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006373if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006374
Matthias Kloseb9621712010-04-24 17:59:49 +00006375$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006376
6377fi
6378
6379
6380 fi
6381fi
6382
Michael W. Hudson54241132001-12-07 15:38:26 +00006383
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006384# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006385for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006386do :
6387 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006388#ifdef HAVE_CURSES_H
6389#include <curses.h>
6390#endif
6391
Matthias Kloseb9621712010-04-24 17:59:49 +00006392"
Charles-François Natali6613c182011-11-27 12:41:06 +01006393if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006394 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006395#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006396_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006398fi
6399
6400done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006401
6402
Martin v. Löwis11017b12006-01-14 18:12:57 +00006403# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006404for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006405do :
6406 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 +00006407#ifdef HAVE_ASM_TYPES_H
6408#include <asm/types.h>
6409#endif
6410#ifdef HAVE_SYS_SOCKET_H
6411#include <sys/socket.h>
6412#endif
6413
Matthias Kloseb9621712010-04-24 17:59:49 +00006414"
Charles-François Natali6613c182011-11-27 12:41:06 +01006415if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006416 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006417#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418_ACEOF
6419
6420fi
6421
6422done
6423
6424
Guido van Rossum627b2d71993-12-24 10:39:16 +00006425# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006426was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6428$as_echo_n "checking for clock_t in time.h... " >&6; }
6429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006430/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006431#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006432
6433_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006435 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006436 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006437else
Martin v. Löwis11437992002-04-12 09:54:03 +00006438
6439
Matthias Kloseb9621712010-04-24 17:59:49 +00006440$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006441
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006442
Guido van Rossum627b2d71993-12-24 10:39:16 +00006443fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006444rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006445
Matthias Kloseb9621712010-04-24 17:59:49 +00006446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6447$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006448
Neal Norwitz11690112002-07-30 01:08:28 +00006449# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6451$as_echo_n "checking for makedev... " >&6; }
6452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006453/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006454
Jesus Cea740f53a2010-04-28 11:35:30 +00006455#if defined(MAJOR_IN_MKDEV)
6456#include <sys/mkdev.h>
6457#elif defined(MAJOR_IN_SYSMACROS)
6458#include <sys/sysmacros.h>
6459#else
6460#include <sys/types.h>
6461#endif
6462
Neal Norwitz11690112002-07-30 01:08:28 +00006463int
6464main ()
6465{
Jesus Cea740f53a2010-04-28 11:35:30 +00006466
6467 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006468 ;
6469 return 0;
6470}
Matthias Kloseb159a552010-04-25 21:00:44 +00006471
Neal Norwitz11690112002-07-30 01:08:28 +00006472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006473if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006474 ac_cv_has_makedev=yes
6475else
Matthias Kloseb9621712010-04-24 17:59:49 +00006476 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006478rm -f core conftest.err conftest.$ac_objext \
6479 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006480if test "$ac_cv_has_makedev" = "no"; then
6481 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006483/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006484
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006485#define _OSF_SOURCE 1
6486#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006487
Neal Norwitz11690112002-07-30 01:08:28 +00006488int
6489main ()
6490{
6491 makedev(0, 0)
6492 ;
6493 return 0;
6494}
6495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006496if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006497 ac_cv_has_makedev=yes
6498else
Matthias Kloseb9621712010-04-24 17:59:49 +00006499 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006501rm -f core conftest.err conftest.$ac_objext \
6502 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006503 if test "$ac_cv_has_makedev" = "yes"; then
6504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006506
6507 fi
6508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6510$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006511if test "$ac_cv_has_makedev" = "yes"; then
6512
Matthias Kloseb9621712010-04-24 17:59:49 +00006513$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006514
6515fi
6516
Martin v. Löwis399a6892002-10-04 10:22:02 +00006517# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6518# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6519# defined, but the compiler does not support pragma redefine_extname,
6520# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6521# structures (such as rlimit64) without declaring them. As a
6522# work-around, disable LFS on such configurations
6523
6524use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6526$as_echo_n "checking Solaris LFS bug... " >&6; }
6527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006528/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006529
6530#define _LARGEFILE_SOURCE 1
6531#define _FILE_OFFSET_BITS 64
6532#include <sys/resource.h>
6533
Martin v. Löwis399a6892002-10-04 10:22:02 +00006534int
6535main ()
6536{
6537struct rlimit foo;
6538 ;
6539 return 0;
6540}
6541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006543 sol_lfs_bug=no
6544else
Matthias Kloseb9621712010-04-24 17:59:49 +00006545 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6549$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006550if test "$sol_lfs_bug" = "yes"; then
6551 use_lfs=no
6552fi
6553
6554if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006555# Two defines needed to enable largefile support on various platforms
6556# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006557case $ac_sys_system/$ac_sys_release in
6558AIX*)
6559
6560$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6561
6562 ;;
6563esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006564
Matthias Kloseb9621712010-04-24 17:59:49 +00006565$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006566
6567
Matthias Kloseb9621712010-04-24 17:59:49 +00006568$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006569
Martin v. Löwis399a6892002-10-04 10:22:02 +00006570fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006571
Guido van Rossum84e7b241996-08-19 21:59:00 +00006572# Add some code to confdefs.h so that the test for off_t works on SCO
6573cat >> confdefs.h <<\EOF
6574#if defined(SCO_DS)
6575#undef _OFF_T
6576#endif
6577EOF
6578
Guido van Rossumef2255b2000-03-10 22:30:29 +00006579# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006580ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006581if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006582
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006583else
Martin v. Löwis11437992002-04-12 09:54:03 +00006584
6585cat >>confdefs.h <<_ACEOF
6586#define mode_t int
6587_ACEOF
6588
6589fi
6590
Matthias Kloseb9621712010-04-24 17:59:49 +00006591ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006592if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006593
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006594else
Martin v. Löwis11437992002-04-12 09:54:03 +00006595
6596cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006597#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006598_ACEOF
6599
6600fi
6601
Matthias Kloseb9621712010-04-24 17:59:49 +00006602ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006603if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006604
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006605else
Martin v. Löwis11437992002-04-12 09:54:03 +00006606
6607cat >>confdefs.h <<_ACEOF
6608#define pid_t int
6609_ACEOF
6610
6611fi
6612
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006613
Martin v. Löwis11437992002-04-12 09:54:03 +00006614cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006615#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006616_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006617
Matthias Kloseb9621712010-04-24 17:59:49 +00006618ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006619if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006620
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006621else
Martin v. Löwis11437992002-04-12 09:54:03 +00006622
6623cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006624#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006625_ACEOF
6626
6627fi
6628
Matthias Kloseb9621712010-04-24 17:59:49 +00006629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6630$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006631if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006632 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006633else
Matthias Kloseb9621712010-04-24 17:59:49 +00006634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006635/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006636#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006637
6638_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006639if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006640 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006641 ac_cv_type_uid_t=yes
6642else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006643 ac_cv_type_uid_t=no
6644fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006645rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006646
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6649$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006650if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006651
Matthias Kloseb9621712010-04-24 17:59:49 +00006652$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006653
6654
Matthias Kloseb9621712010-04-24 17:59:49 +00006655$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006656
6657fi
6658
Matthias Kloseb9621712010-04-24 17:59:49 +00006659ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6660case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006661 no|yes) ;; #(
6662 *)
6663
Matthias Kloseb9621712010-04-24 17:59:49 +00006664$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006665
6666
6667cat >>confdefs.h <<_ACEOF
6668#define uint32_t $ac_cv_c_uint32_t
6669_ACEOF
6670;;
6671 esac
6672
Matthias Kloseb9621712010-04-24 17:59:49 +00006673ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6674case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006675 no|yes) ;; #(
6676 *)
6677
Matthias Kloseb9621712010-04-24 17:59:49 +00006678$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006679
6680
6681cat >>confdefs.h <<_ACEOF
6682#define uint64_t $ac_cv_c_uint64_t
6683_ACEOF
6684;;
6685 esac
6686
Matthias Kloseb9621712010-04-24 17:59:49 +00006687ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6688case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006689 no|yes) ;; #(
6690 *)
6691
6692cat >>confdefs.h <<_ACEOF
6693#define int32_t $ac_cv_c_int32_t
6694_ACEOF
6695;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006696esac
6697
Matthias Kloseb9621712010-04-24 17:59:49 +00006698ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6699case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006700 no|yes) ;; #(
6701 *)
6702
6703cat >>confdefs.h <<_ACEOF
6704#define int64_t $ac_cv_c_int64_t
6705_ACEOF
6706;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006707esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006708
Matthias Kloseb9621712010-04-24 17:59:49 +00006709ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006710if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711
Matthias Kloseb9621712010-04-24 17:59:49 +00006712$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006713
6714fi
6715
Jack Jansendd19cf82001-12-06 22:36:17 +00006716
Michael W. Hudson54241132001-12-07 15:38:26 +00006717# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006718# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006719# The cast to long int works around a bug in the HP C Compiler
6720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6724$as_echo_n "checking size of int... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006725if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 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 +00006729
Martin v. Löwis11437992002-04-12 09:54:03 +00006730else
Matthias Kloseb9621712010-04-24 17:59:49 +00006731 if test "$ac_cv_type_int" = yes; then
6732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006734as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natali6613c182011-11-27 12:41:06 +01006735See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006736 else
6737 ac_cv_sizeof_int=0
6738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6743$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744
6745
6746
Martin v. Löwis11437992002-04-12 09:54:03 +00006747cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006748#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006749_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006750
6751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006752# The cast to long int works around a bug in the HP C Compiler
6753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6755# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6757$as_echo_n "checking size of long... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006758if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006760else
Matthias Kloseb9621712010-04-24 17:59:49 +00006761 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 +00006762
Martin v. Löwis11437992002-04-12 09:54:03 +00006763else
Matthias Kloseb9621712010-04-24 17:59:49 +00006764 if test "$ac_cv_type_long" = yes; then
6765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006767as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natali6613c182011-11-27 12:41:06 +01006768See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769 else
6770 ac_cv_sizeof_long=0
6771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006773
Martin v. Löwis11437992002-04-12 09:54:03 +00006774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6776$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777
6778
6779
Martin v. Löwis11437992002-04-12 09:54:03 +00006780cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006781#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006782_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006783
6784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006785# The cast to long int works around a bug in the HP C Compiler
6786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6788# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6790$as_echo_n "checking size of void *... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006791if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006792 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006793else
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 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 +00006795
Martin v. Löwis11437992002-04-12 09:54:03 +00006796else
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 if test "$ac_cv_type_void_p" = yes; then
6798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006800as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natali6613c182011-11-27 12:41:06 +01006801See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802 else
6803 ac_cv_sizeof_void_p=0
6804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006806
Martin v. Löwis11437992002-04-12 09:54:03 +00006807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6809$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006810
6811
6812
Martin v. Löwis11437992002-04-12 09:54:03 +00006813cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006814#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006815_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006816
6817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006818# The cast to long int works around a bug in the HP C Compiler
6819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6821# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6823$as_echo_n "checking size of short... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006824if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 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 +00006828
Martin v. Löwis11437992002-04-12 09:54:03 +00006829else
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 if test "$ac_cv_type_short" = yes; then
6831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006833as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natali6613c182011-11-27 12:41:06 +01006834See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006835 else
6836 ac_cv_sizeof_short=0
6837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006839
Martin v. Löwis11437992002-04-12 09:54:03 +00006840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6842$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006843
6844
6845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006847#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006848_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006849
6850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006851# The cast to long int works around a bug in the HP C Compiler
6852# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6853# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6854# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6856$as_echo_n "checking size of float... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006857if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006859else
Matthias Kloseb9621712010-04-24 17:59:49 +00006860 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 +00006861
Martin v. Löwis11437992002-04-12 09:54:03 +00006862else
Matthias Kloseb9621712010-04-24 17:59:49 +00006863 if test "$ac_cv_type_float" = yes; then
6864 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006866as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natali6613c182011-11-27 12:41:06 +01006867See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006868 else
6869 ac_cv_sizeof_float=0
6870 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006872
Martin v. Löwis11437992002-04-12 09:54:03 +00006873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6875$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876
6877
6878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006880#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006881_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006882
6883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006884# The cast to long int works around a bug in the HP C Compiler
6885# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6886# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6887# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6889$as_echo_n "checking size of double... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006890if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006891 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006892else
Matthias Kloseb9621712010-04-24 17:59:49 +00006893 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 +00006894
Martin v. Löwis11437992002-04-12 09:54:03 +00006895else
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 if test "$ac_cv_type_double" = yes; then
6897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006899as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natali6613c182011-11-27 12:41:06 +01006900See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006901 else
6902 ac_cv_sizeof_double=0
6903 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905
Martin v. Löwis11437992002-04-12 09:54:03 +00006906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6908$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006909
6910
6911
Martin v. Löwis11437992002-04-12 09:54:03 +00006912cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006913#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006914_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006915
6916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006917# The cast to long int works around a bug in the HP C Compiler
6918# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6919# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6920# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6922$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006923if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006925else
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 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 +00006927
Martin v. Löwis11437992002-04-12 09:54:03 +00006928else
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 if test "$ac_cv_type_fpos_t" = yes; then
6930 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6931$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006932as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01006933See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006934 else
6935 ac_cv_sizeof_fpos_t=0
6936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6941$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006942
6943
6944
Martin v. Löwis11437992002-04-12 09:54:03 +00006945cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006946#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006947_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006948
Michael W. Hudson54241132001-12-07 15:38:26 +00006949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006950# The cast to long int works around a bug in the HP C Compiler
6951# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6952# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6953# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6955$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006956if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006957 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006958else
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 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 +00006960
Martin v. Löwis18e16552006-02-15 17:27:45 +00006961else
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 if test "$ac_cv_type_size_t" = yes; then
6963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006965as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01006966See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967 else
6968 ac_cv_sizeof_size_t=0
6969 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006971
Martin v. Löwis18e16552006-02-15 17:27:45 +00006972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6974$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975
6976
6977
Martin v. Löwis18e16552006-02-15 17:27:45 +00006978cat >>confdefs.h <<_ACEOF
6979#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6980_ACEOF
6981
6982
Christian Heimes400adb02008-02-01 08:12:03 +00006983# The cast to long int works around a bug in the HP C Compiler
6984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6988$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006989if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006991else
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 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 +00006993
Christian Heimes400adb02008-02-01 08:12:03 +00006994else
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 if test "$ac_cv_type_pid_t" = yes; then
6996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006998as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01006999See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00007000 else
7001 ac_cv_sizeof_pid_t=0
7002 fi
7003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007004
Christian Heimes400adb02008-02-01 08:12:03 +00007005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7007$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007008
7009
7010
7011cat >>confdefs.h <<_ACEOF
7012#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7013_ACEOF
7014
7015
Michael W. Hudson54241132001-12-07 15:38:26 +00007016
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7018$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007019have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007021/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007022
Martin v. Löwis11437992002-04-12 09:54:03 +00007023int
7024main ()
7025{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007026long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007027 ;
7028 return 0;
7029}
7030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007032
7033
Matthias Kloseb9621712010-04-24 17:59:49 +00007034$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007035
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007036 have_long_long=yes
7037
Guido van Rossumec95c7b1998-08-04 17:59:56 +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_long_long" >&5
7041$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007042if test "$have_long_long" = 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 long long" >&5
7048$as_echo_n "checking size of long long... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007049if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007051else
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 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 +00007053
Martin v. Löwis11437992002-04-12 09:54:03 +00007054else
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 if test "$ac_cv_type_long_long" = 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;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007058as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natali6613c182011-11-27 12:41:06 +01007059See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060 else
7061 ac_cv_sizeof_long_long=0
7062 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064
Martin v. Löwis11437992002-04-12 09:54:03 +00007065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7067$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068
7069
7070
Martin v. Löwis11437992002-04-12 09:54:03 +00007071cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007072#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007073_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007074
Michael W. Hudson54241132001-12-07 15:38:26 +00007075
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007076fi
7077
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7079$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007080have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007082/* end confdefs.h. */
7083
7084int
7085main ()
7086{
7087long double x; x = (long double)0;
7088 ;
7089 return 0;
7090}
7091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007092if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007093
7094
Matthias Kloseb9621712010-04-24 17:59:49 +00007095$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007096
7097 have_long_double=yes
7098
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007099fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7102$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007103if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007104# The cast to long int works around a bug in the HP C Compiler
7105# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7106# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7107# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7109$as_echo_n "checking size of long double... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007110if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007111 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007112else
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 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 +00007114
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007115else
Matthias Kloseb9621712010-04-24 17:59:49 +00007116 if test "$ac_cv_type_long_double" = yes; then
7117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007119as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natali6613c182011-11-27 12:41:06 +01007120See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007121 else
7122 ac_cv_sizeof_long_double=0
7123 fi
7124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7128$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007129
7130
7131
7132cat >>confdefs.h <<_ACEOF
7133#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7134_ACEOF
7135
7136
7137fi
7138
7139
Matthias Kloseb9621712010-04-24 17:59:49 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7141$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007142have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007144/* end confdefs.h. */
7145
7146int
7147main ()
7148{
7149_Bool x; x = (_Bool)0;
7150 ;
7151 return 0;
7152}
7153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007154if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007155
7156
Matthias Kloseb9621712010-04-24 17:59:49 +00007157$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007158
7159 have_c99_bool=yes
7160
Thomas Woutersb2137042007-02-01 18:02:27 +00007161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7164$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007165if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007166# The cast to long int works around a bug in the HP C Compiler
7167# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7168# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7169# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7171$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007172if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007174else
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 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 +00007176
Thomas Woutersb2137042007-02-01 18:02:27 +00007177else
Matthias Kloseb9621712010-04-24 17:59:49 +00007178 if test "$ac_cv_type__Bool" = yes; then
7179 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7180$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007181as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natali6613c182011-11-27 12:41:06 +01007182See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007183 else
7184 ac_cv_sizeof__Bool=0
7185 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007187
Thomas Woutersb2137042007-02-01 18:02:27 +00007188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7190$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007191
7192
7193
Thomas Woutersb2137042007-02-01 18:02:27 +00007194cat >>confdefs.h <<_ACEOF
7195#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7196_ACEOF
7197
7198
7199fi
7200
Matthias Kloseb9621712010-04-24 17:59:49 +00007201ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007202 #include <stdint.h>
7203 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007204 #ifdef HAVE_INTTYPES_H
7205 #include <inttypes.h>
7206 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007207"
Charles-François Natali6613c182011-11-27 12:41:06 +01007208if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007209
7210cat >>confdefs.h <<_ACEOF
7211#define HAVE_UINTPTR_T 1
7212_ACEOF
7213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007214# The cast to long int works around a bug in the HP C Compiler
7215# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7216# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7217# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7219$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007220if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007221 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007222else
Matthias Kloseb9621712010-04-24 17:59:49 +00007223 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 +00007224
Martin v. Löwis11437992002-04-12 09:54:03 +00007225else
Matthias Kloseb9621712010-04-24 17:59:49 +00007226 if test "$ac_cv_type_uintptr_t" = yes; then
7227 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007229as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01007230See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007231 else
7232 ac_cv_sizeof_uintptr_t=0
7233 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007235
Martin v. Löwis11437992002-04-12 09:54:03 +00007236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7238$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007239
7240
7241
Martin v. Löwis11437992002-04-12 09:54:03 +00007242cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007243#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007244_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007245
Michael W. Hudson54241132001-12-07 15:38:26 +00007246
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007247fi
7248
Thomas Wouters89f507f2006-12-13 04:49:30 +00007249
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250# The cast to long int works around a bug in the HP C Compiler
7251# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7252# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7253# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7255$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007256if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007257 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007258else
Matthias Kloseb9621712010-04-24 17:59:49 +00007259 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260#ifdef HAVE_SYS_TYPES_H
7261#include <sys/types.h>
7262#endif
7263
Matthias Kloseb9621712010-04-24 17:59:49 +00007264"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266else
Matthias Kloseb9621712010-04-24 17:59:49 +00007267 if test "$ac_cv_type_off_t" = yes; then
7268 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007270as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01007271See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007272 else
7273 ac_cv_sizeof_off_t=0
7274 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007276
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7279$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007280
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007281
7282
Martin v. Löwis11437992002-04-12 09:54:03 +00007283cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007284#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007285_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007286
Michael W. Hudson54241132001-12-07 15:38:26 +00007287
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007288
Matthias Kloseb9621712010-04-24 17:59:49 +00007289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7290$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007291if test "$have_long_long" = yes
7292then
7293if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007294 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007295
Matthias Kloseb9621712010-04-24 17:59:49 +00007296$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007297
Matthias Kloseb9621712010-04-24 17:59:49 +00007298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7299$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007300else
Matthias Kloseb9621712010-04-24 17:59:49 +00007301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7302$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007303fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007304else
Matthias Kloseb9621712010-04-24 17:59:49 +00007305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7306$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007307fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007308
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007309# The cast to long int works around a bug in the HP C Compiler
7310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7312# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7314$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007315if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007317else
Matthias Kloseb9621712010-04-24 17:59:49 +00007318 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007319#ifdef HAVE_SYS_TYPES_H
7320#include <sys/types.h>
7321#endif
7322#ifdef HAVE_TIME_H
7323#include <time.h>
7324#endif
7325
Matthias Kloseb9621712010-04-24 17:59:49 +00007326"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007328else
Matthias Kloseb9621712010-04-24 17:59:49 +00007329 if test "$ac_cv_type_time_t" = yes; then
7330 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007332as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01007333See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007334 else
7335 ac_cv_sizeof_time_t=0
7336 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007338
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7341$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007342
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007343
7344
Martin v. Löwis11437992002-04-12 09:54:03 +00007345cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007346#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007347_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007348
Michael W. Hudson54241132001-12-07 15:38:26 +00007349
7350
Trent Mick635f6fb2000-08-23 21:33:05 +00007351# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007352ac_save_cc="$CC"
7353if test "$ac_cv_kpthread" = "yes"
7354then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007355elif test "$ac_cv_kthread" = "yes"
7356then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007357elif test "$ac_cv_pthread" = "yes"
7358then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007359fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007360
Matthias Kloseb9621712010-04-24 17:59:49 +00007361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7362$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007363have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007365/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007366
7367 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007368int
7369main ()
7370{
Guido van Rossum12580492000-09-24 16:47:19 +00007371pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007372 ;
7373 return 0;
7374}
Matthias Kloseb159a552010-04-25 21:00:44 +00007375
Martin v. Löwis11437992002-04-12 09:54:03 +00007376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007377if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007378 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7382$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007383if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007384 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7387# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7389$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007390if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007391 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007392else
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007394#ifdef HAVE_PTHREAD_H
7395#include <pthread.h>
7396#endif
7397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007399
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007400else
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 if test "$ac_cv_type_pthread_t" = yes; then
7402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007404as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01007405See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007406 else
7407 ac_cv_sizeof_pthread_t=0
7408 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007410
Trent Mick635f6fb2000-08-23 21:33:05 +00007411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7413$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007414
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007415
7416
Martin v. Löwis11437992002-04-12 09:54:03 +00007417cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007418#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007419_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007420
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007421
Trent Mick635f6fb2000-08-23 21:33:05 +00007422fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007423CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007424
Michael W. Hudson54241132001-12-07 15:38:26 +00007425
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007426case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007427 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007428 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7429 ;;
7430 Darwin/*)
7431 OTHER_LIBTOOL_OPT=""
7432 ;;
7433esac
7434
7435
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007436ARCH_RUN_32BIT=""
7437
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007438case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007439 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007440 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7441 if test "${enable_universalsdk}"; then
7442 :
7443 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007444 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007445 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007446 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007447 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007448 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007449 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007450 if test ${gcc_version} '<' 4.0
7451 then
7452 LIBTOOL_CRUFT="-lcc_dynamic"
7453 else
7454 LIBTOOL_CRUFT=""
7455 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007457 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007458else
Matthias Kloseb9621712010-04-24 17:59:49 +00007459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007460/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007461
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007462 #include <unistd.h>
7463 int main(int argc, char*argv[])
7464 {
7465 if (sizeof(long) == 4) {
7466 return 0;
7467 } else {
7468 return 1;
7469 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007470 }
7471
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007473if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007474 ac_osx_32bit=yes
7475else
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7479 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007480fi
7481
7482
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007483 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007484 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007485 i386)
7486 MACOSX_DEFAULT_ARCH="i386"
7487 ;;
7488 ppc)
7489 MACOSX_DEFAULT_ARCH="ppc"
7490 ;;
7491 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007492 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007493 ;;
7494 esac
7495 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007496 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007497 i386)
7498 MACOSX_DEFAULT_ARCH="x86_64"
7499 ;;
7500 ppc)
7501 MACOSX_DEFAULT_ARCH="ppc64"
7502 ;;
7503 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007504 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007505 ;;
7506 esac
7507
7508 #ARCH_RUN_32BIT="true"
7509 fi
7510
7511 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007512 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007513 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007514esac
7515
Matthias Kloseb9621712010-04-24 17:59:49 +00007516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7517$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007518if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007519then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007520 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007521 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007522 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007523
Matthias Kloseb9621712010-04-24 17:59:49 +00007524$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007525
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7527$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007528 if test $enable_shared = "yes"
7529 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007530 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 +00007531 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007532else
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007535fi
7536
Matthias Kloseb9621712010-04-24 17:59:49 +00007537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7538$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007539case $ac_sys_system/$ac_sys_release in
7540 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007541
Matthias Kloseb9621712010-04-24 17:59:49 +00007542$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007543
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7545$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007546 ;;
7547 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007550 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007551esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007552
Guido van Rossum0a516c91994-09-12 10:58:40 +00007553# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554
Michael W. Hudson54241132001-12-07 15:38:26 +00007555
7556
7557
7558
Benjamin Peterson99f03762010-04-11 22:15:28 +00007559
Thomas Wouters477c8d52006-05-27 19:21:47 +00007560
Georg Brandlb1441c72009-01-03 22:33:39 +00007561
Thomas Wouters477c8d52006-05-27 19:21:47 +00007562cat >>confdefs.h <<_ACEOF
7563#define SHLIB_EXT "$SO"
7564_ACEOF
7565
Guido van Rossum0a516c91994-09-12 10:58:40 +00007566# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007567# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007568# (Shared libraries in this instance are shared modules to be loaded into
7569# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7571$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007572if test -z "$LDSHARED"
7573then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007574 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007575 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007576 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007577 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007578 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007579 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007580 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007582 if test "$GCC" = "yes" ; then
7583 LDSHARED='$(CC) -shared'
7584 LDCXXSHARED='$(CXX) -shared'
7585 else
7586 LDSHARED='$(CC) -G'
7587 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007588 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007589 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007590 if test "$GCC" = "yes" ; then
7591 LDSHARED='$(CC) -shared'
7592 LDCXXSHARED='$(CXX) -shared'
7593 else
7594 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007595 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007596 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007597 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007598 LDSHARED='$(CC) -bundle'
7599 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007600 if test "$enable_framework" ; then
7601 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007602 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7603 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007604 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007605 else
7606 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007607 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007608 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007609 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007610 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007611 LDSHARED='$(CC) -bundle'
7612 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007613 if test "$enable_framework" ; then
7614 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007615 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7616 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007617 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007618 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007619 # No framework, use the Python app as bundle-loader
7620 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007621 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007622 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007623 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007624 Darwin/*)
7625 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7626 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007627
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007628 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007629 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007630 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007631 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007632 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007633 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7634 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007635 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007636 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007637 LDSHARED='$(CC) -bundle'
7638 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007639 if test "$enable_framework" ; then
7640 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007641 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7642 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007643 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007644 else
7645 # No framework, use the Python app as bundle-loader
7646 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7647 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007648 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007649 fi
7650 fi
7651 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007652 Linux*|GNU*|QNX*)
7653 LDSHARED='$(CC) -shared'
7654 LDCXXSHARED='$(CXX) -shared';;
7655 BSD/OS*/4*)
7656 LDSHARED="gcc -shared"
7657 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007658 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007659 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007660 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007661 LDSHARED='$(CC) -shared'
7662 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007663 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007664 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007665 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007666 OpenBSD*)
7667 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7668 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007669 LDSHARED='$(CC) -shared $(CCSHARED)'
7670 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007671 else
7672 case `uname -r` in
7673 [01].* | 2.[0-7] | 2.[0-7].*)
7674 LDSHARED="ld -Bshareable ${LDFLAGS}"
7675 ;;
7676 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007677 LDSHARED='$(CC) -shared $(CCSHARED)'
7678 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007679 ;;
7680 esac
7681 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007682 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007683 LDSHARED='$(CC) -shared'
7684 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007685 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007686 if test "$GCC" = "yes" ; then
7687 LDSHARED='$(CC) -shared'
7688 LDCXXSHARED='$(CXX) -shared'
7689 else
7690 LDSHARED='$(CC) -G'
7691 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007692 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007693 SCO_SV*)
7694 LDSHARED='$(CC) -Wl,-G,-Bexport'
7695 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7696 CYGWIN*)
7697 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7698 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007699 *) LDSHARED="ld";;
7700 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7703$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007704LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007705BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007706# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007707# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7709$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007710if test -z "$CCSHARED"
7711then
Guido van Rossum07397971997-04-29 21:49:50 +00007712 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007713 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007714 then CCSHARED="-fPIC";
7715 elif test `uname -p` = sparc;
7716 then CCSHARED="-xcode=pic32";
7717 else CCSHARED="-Kpic";
7718 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007719 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007720 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007721 else CCSHARED="+z";
7722 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007723 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007724 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007725 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007726 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007727 if test "$GCC" = "yes"
7728 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007729 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007730 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007731 SCO_SV*)
7732 if test "$GCC" = "yes"
7733 then CCSHARED="-fPIC"
7734 else CCSHARED="-Kpic -belf"
7735 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007736 IRIX*/6*) case $CC in
7737 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007738 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007739 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007740 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7743$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007744# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007745# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7747$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007748if test -z "$LINKFORSHARED"
7749then
Guido van Rossum07397971997-04-29 21:49:50 +00007750 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007751 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007752 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007753 LINKFORSHARED="-Wl,-E -Wl,+s";;
7754# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007755 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007756 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007757 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007759 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007760 if test "$enable_framework"
7761 then
Jack Jansenda49e192005-01-07 13:08:22 +00007762 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007763 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007764 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007765 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007766 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007767 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007768 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007769 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7770 then
7771 LINKFORSHARED="-Wl,--export-dynamic"
7772 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007773 SunOS/5*) case $CC in
7774 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007775 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007776 then
7777 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007778 fi;;
7779 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007780 CYGWIN*)
7781 if test $enable_shared = "no"
7782 then
7783 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7784 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007785 QNX*)
7786 # -Wl,-E causes the symbols to be added to the dynamic
7787 # symbol table so that they can be found when a module
7788 # is loaded. -N 2048K causes the stack size to be set
7789 # to 2048 kilobytes so that the stack doesn't overflow
7790 # when running test_compile.py.
7791 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007792 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7795$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007796
Michael W. Hudson54241132001-12-07 15:38:26 +00007797
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007798
Matthias Kloseb9621712010-04-24 17:59:49 +00007799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7800$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007801if test ! "$LIBRARY" = "$LDLIBRARY"
7802then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007803 case $ac_sys_system in
7804 CYGWIN*)
7805 # Cygwin needs CCSHARED when building extension DLLs
7806 # but not when building the interpreter DLL.
7807 CFLAGSFORSHARED='';;
7808 *)
7809 CFLAGSFORSHARED='$(CCSHARED)'
7810 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7813$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007814
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007815# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7816# library (with --enable-shared).
7817# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007818# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7819# if it is not required, since it creates a dependency of the shared library
7820# to LIBS. This, in turn, means that applications linking the shared libpython
7821# don't need to link LIBS explicitly. The default should be only changed
7822# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007823
Matthias Kloseb9621712010-04-24 17:59:49 +00007824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7825$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007826case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007827 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007828 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007829esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7831$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007832
7833
Guido van Rossum627b2d71993-12-24 10:39:16 +00007834# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7836$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007837if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007839else
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007841LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845/* Override any GCC internal prototype to avoid an error.
7846 Use char because int might match the return type of a GCC
7847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007848#ifdef __cplusplus
7849extern "C"
7850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007851char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007852int
7853main ()
7854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 ;
7857 return 0;
7858}
7859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007860if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007862else
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865rm -f core conftest.err conftest.$ac_objext \
7866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007867LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7870$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007871if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 cat >>confdefs.h <<_ACEOF
7873#define HAVE_LIBDL 1
7874_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007875
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007876 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007878fi
7879 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7881$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007882if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007884else
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007886LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890/* Override any GCC internal prototype to avoid an error.
7891 Use char because int might match the return type of a GCC
7892 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007893#ifdef __cplusplus
7894extern "C"
7895#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007896char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007897int
7898main ()
7899{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 ;
7902 return 0;
7903}
7904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007905if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007906 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007907else
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007910rm -f core conftest.err conftest.$ac_objext \
7911 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007912LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7915$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007916if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007917 cat >>confdefs.h <<_ACEOF
7918#define HAVE_LIBDLD 1
7919_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007920
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007921 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007922
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007923fi
7924 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007925
Georg Brandlb1441c72009-01-03 22:33:39 +00007926# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007927if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7929$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007930if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007932else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007933 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937/* Override any GCC internal prototype to avoid an error.
7938 Use char because int might match the return type of a GCC
7939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007940#ifdef __cplusplus
7941extern "C"
7942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007943char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007944int
7945main ()
7946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ;
7949 return 0;
7950}
7951_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952for ac_lib in '' pthread rt posix4; do
7953 if test -z "$ac_lib"; then
7954 ac_res="none required"
7955 else
7956 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007957 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962rm -f core conftest.err conftest.$ac_objext \
7963 conftest$ac_exeext
Charles-François Natali6613c182011-11-27 12:41:06 +01007964 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967done
Charles-François Natali6613c182011-11-27 12:41:06 +01007968if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970else
7971 ac_cv_search_sem_init=no
7972fi
7973rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007974LIBS=$ac_func_search_save_LIBS
7975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7977$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007979if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007981
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007982fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007983 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007984 # posix4 on Solaris 2.6
7985 # pthread (first!) on Linux
7986fi
7987
Martin v. Löwis19d17342003-06-14 21:03:05 +00007988# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7990$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007991if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007993else
7994 ac_check_lib_save_LIBS=$LIBS
7995LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007997/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999/* Override any GCC internal prototype to avoid an error.
8000 Use char because int might match the return type of a GCC
8001 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008002#ifdef __cplusplus
8003extern "C"
8004#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008006int
8007main ()
8008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008010 ;
8011 return 0;
8012}
8013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008015 ac_cv_lib_intl_textdomain=yes
8016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019rm -f core conftest.err conftest.$ac_objext \
8020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008021LIBS=$ac_check_lib_save_LIBS
8022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8024$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008025if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008026
Matthias Kloseb9621712010-04-24 17:59:49 +00008027$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008028
Brett Cannonc6d936e2009-06-07 20:09:53 +00008029 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008030fi
8031
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008032
8033# checks for system dependent C++ extensions support
8034case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8036$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008038/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008039
Georg Brandl59e87bd2011-02-15 19:48:59 +00008040 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008041int
8042main ()
8043{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008044loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 ;
8046 return 0;
8047}
Matthias Kloseb159a552010-04-25 21:00:44 +00008048
Martin v. Löwis11437992002-04-12 09:54:03 +00008049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008050if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008051
Matthias Kloseb159a552010-04-25 21:00:44 +00008052
Matthias Kloseb9621712010-04-24 17:59:49 +00008053$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008054
Matthias Kloseb159a552010-04-25 21:00:44 +00008055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008056$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008057
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008058else
Matthias Kloseb159a552010-04-25 21:00:44 +00008059
8060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008061$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008062
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008064rm -f core conftest.err conftest.$ac_objext \
8065 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008066 *) ;;
8067esac
8068
Guido van Rossum70c7f481998-03-26 18:44:10 +00008069# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8071$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008072if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008074else
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008076LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080/* Override any GCC internal prototype to avoid an error.
8081 Use char because int might match the return type of a GCC
8082 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008083#ifdef __cplusplus
8084extern "C"
8085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008086char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008087int
8088main ()
8089{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008090return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008091 ;
8092 return 0;
8093}
8094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008095if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008097else
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100rm -f core conftest.err conftest.$ac_objext \
8101 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008102LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8105$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008106if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008107 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008108fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008109 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8111$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008112if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008114else
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008116LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008120/* Override any GCC internal prototype to avoid an error.
8121 Use char because int might match the return type of a GCC
8122 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008123#ifdef __cplusplus
8124extern "C"
8125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008126char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008127int
8128main ()
8129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008131 ;
8132 return 0;
8133}
8134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008135if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008136 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008137else
Matthias Kloseb9621712010-04-24 17:59:49 +00008138 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008140rm -f core conftest.err conftest.$ac_objext \
8141 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008142LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8145$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008146if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008147 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008148fi
8149 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008150
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8152$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008155if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8158$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008159LIBS="$withval $LIBS"
8160
8161else
Matthias Kloseb9621712010-04-24 17:59:49 +00008162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164fi
8165
Guido van Rossum7f43da71994-08-01 12:15:30 +00008166
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008167if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008168 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8169set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8171$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008172if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008173 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008174else
8175 case $PKG_CONFIG in
8176 [\\/]* | ?:[\\/]*)
8177 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8178 ;;
8179 *)
8180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8181for as_dir in $PATH
8182do
8183 IFS=$as_save_IFS
8184 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008186 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8187 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008189 break 2
8190 fi
8191done
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008193IFS=$as_save_IFS
8194
8195 ;;
8196esac
8197fi
8198PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8199if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8201$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008202else
Matthias Kloseb9621712010-04-24 17:59:49 +00008203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8204$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008205fi
8206
8207
8208fi
8209if test -z "$ac_cv_path_PKG_CONFIG"; then
8210 ac_pt_PKG_CONFIG=$PKG_CONFIG
8211 # Extract the first word of "pkg-config", so it can be a program name with args.
8212set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008215if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008217else
8218 case $ac_pt_PKG_CONFIG in
8219 [\\/]* | ?:[\\/]*)
8220 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8221 ;;
8222 *)
8223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226 IFS=$as_save_IFS
8227 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008229 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8230 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008232 break 2
8233 fi
8234done
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008236IFS=$as_save_IFS
8237
8238 ;;
8239esac
8240fi
8241ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8242if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8244$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008245else
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8247$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008248fi
8249
8250 if test "x$ac_pt_PKG_CONFIG" = x; then
8251 PKG_CONFIG=""
8252 else
8253 case $cross_compiling:$ac_tool_warned in
8254yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8256$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008257ac_tool_warned=yes ;;
8258esac
8259 PKG_CONFIG=$ac_pt_PKG_CONFIG
8260 fi
8261else
8262 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8263fi
8264
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008265
8266# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8268$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008269
8270# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008271if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008272 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008273else
8274 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008275fi
8276
8277
Matthias Kloseb9621712010-04-24 17:59:49 +00008278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8279$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008280
8281# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8283$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008284
8285# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008286if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008287 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008288else
8289 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008290fi
8291
8292
8293if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008294 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8295else
8296 LIBFFI_INCLUDEDIR=""
8297fi
8298
8299
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8301$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008302
Benjamin Peterson076ed002010-10-31 17:11:02 +00008303# Check for support for loadable sqlite extensions
8304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8305$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8306# Check whether --enable-loadable-sqlite-extensions was given.
8307if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8308 enableval=$enable_loadable_sqlite_extensions;
8309else
8310 enable_loadable_sqlite_extensions="no"
8311fi
8312
8313
8314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8315$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8316
Matthias Klose55708cc2009-04-30 08:06:49 +00008317# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8319$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008320
8321# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008322if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008323 withval=$with_dbmliborder;
8324if test x$with_dbmliborder = xyes
8325then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008326as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008327else
8328 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8329 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8330 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008331 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008332 fi
8333 done
8334fi
8335fi
8336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8338$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008339
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008340# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008341
8342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8344$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008347if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008348 withval=$with_signal_module;
8349fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008350
8351
8352if test -z "$with_signal_module"
8353then with_signal_module="yes"
8354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8356$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008357
8358if test "${with_signal_module}" = "yes"; then
8359 USE_SIGNAL_MODULE=""
8360 SIGNAL_OBJS=""
8361else
8362 USE_SIGNAL_MODULE="#"
8363 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8364fi
8365
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008366# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008367
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008368USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8371$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008372
Guido van Rossumec2f0731997-01-22 20:54:01 +00008373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008375if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8378$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008379LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008380if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008381 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008382fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008383else
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8385$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386fi
8387
Martin v. Löwis11437992002-04-12 09:54:03 +00008388
8389# Templates for things AC_DEFINEd more than once.
8390# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008391
8392
Martin v. Löwis11437992002-04-12 09:54:03 +00008393
8394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8396$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008399if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400 withval=$with_threads;
8401fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008402
8403
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008404# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008405
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008407if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408 withval=$with_thread; with_threads=$with_thread
8409fi
8410
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008411
8412if test -z "$with_threads"
8413then with_threads="yes"
8414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8416$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008417
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008418
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008419if test "$with_threads" = "no"
8420then
8421 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008422elif test "$ac_cv_pthread_is_default" = yes
8423then
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008425
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008426 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008428
8429 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008431elif test "$ac_cv_kpthread" = "yes"
8432then
8433 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008434 if test "$ac_cv_cxx_thread" = "yes"; then
8435 CXX="$CXX -Kpthread"
8436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008438
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008439 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008440 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008441elif test "$ac_cv_kthread" = "yes"
8442then
8443 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008444 if test "$ac_cv_cxx_thread" = "yes"; then
8445 CXX="$CXX -Kthread"
8446 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008448
8449 posix_threads=yes
8450 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008451elif test "$ac_cv_pthread" = "yes"
8452then
8453 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008454 if test "$ac_cv_cxx_thread" = "yes"; then
8455 CXX="$CXX -pthread"
8456 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008458
8459 posix_threads=yes
8460 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008461else
8462 if test ! -z "$with_threads" -a -d "$with_threads"
8463 then LDFLAGS="$LDFLAGS -L$with_threads"
8464 fi
8465 if test ! -z "$withval" -a -d "$withval"
8466 then LDFLAGS="$LDFLAGS -L$withval"
8467 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008468
8469 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008470 # define _POSIX_THREADS in unistd.h. Some apparently don't
8471 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8473$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008475/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008476
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008477#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008478#ifdef _POSIX_THREADS
8479yes
8480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008481
8482_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008485 unistd_defines_pthreads=yes
8486else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008487 unistd_defines_pthreads=no
8488fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008489rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008490
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8492$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008495
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01008497if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008499
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008501
Martin v. Löwis11437992002-04-12 09:54:03 +00008502
Matthias Kloseb9621712010-04-24 17:59:49 +00008503$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008504
8505 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008506 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008507else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01008510if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008512
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008514
Martin v. Löwis11437992002-04-12 09:54:03 +00008515
Matthias Kloseb9621712010-04-24 17:59:49 +00008516$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008517
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008518 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008519else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008520
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008521 # Just looking for pthread_create in libpthread is not enough:
8522 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8523 # So we really have to include pthread.h, and then link.
8524 _libs=$LIBS
8525 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8527$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008529/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008530#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008531
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008532void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008533int
8534main ()
8535{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008536
8537pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 ;
8539 return 0;
8540}
8541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008542if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008543
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8545$as_echo "yes" >&6; }
8546 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008547
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008548 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008549 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008550else
Martin v. Löwis11437992002-04-12 09:54:03 +00008551
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008552 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natali6613c182011-11-27 12:41:06 +01008554if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008556
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008557 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008558 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008559else
Guido van Rossumad678af1998-10-02 14:42:15 +00008560
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8562$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008563if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008565else
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008567LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571/* Override any GCC internal prototype to avoid an error.
8572 Use char because int might match the return type of a GCC
8573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008574#ifdef __cplusplus
8575extern "C"
8576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008577char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008578int
8579main ()
8580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 ;
8583 return 0;
8584}
8585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008586if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591rm -f core conftest.err conftest.$ac_objext \
8592 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008593LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8596$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008597if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008599
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008600 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008601 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008602 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008603else
Greg Steinadf63d62000-07-05 10:38:09 +00008604
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8606$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008607if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008609else
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008611LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615/* Override any GCC internal prototype to avoid an error.
8616 Use char because int might match the return type of a GCC
8617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008618#ifdef __cplusplus
8619extern "C"
8620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008621char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008622int
8623main ()
8624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 ;
8627 return 0;
8628}
8629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008630if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635rm -f core conftest.err conftest.$ac_objext \
8636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008637LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8640$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008641if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008643
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008644 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008645 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008646 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008647else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008648
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8650$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008651if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008653else
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008655LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659/* Override any GCC internal prototype to avoid an error.
8660 Use char because int might match the return type of a GCC
8661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008662#ifdef __cplusplus
8663extern "C"
8664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008665char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008666int
8667main ()
8668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ;
8671 return 0;
8672}
8673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008676else
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679rm -f core conftest.err conftest.$ac_objext \
8680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008681LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8684$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008685if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008687
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008688 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008689 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008690 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008691else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008692
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8694$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008695if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008697else
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008699LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703/* Override any GCC internal prototype to avoid an error.
8704 Use char because int might match the return type of a GCC
8705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008706#ifdef __cplusplus
8707extern "C"
8708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008709char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008710int
8711main ()
8712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ;
8715 return 0;
8716}
8717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723rm -f core conftest.err conftest.$ac_objext \
8724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008725LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8728$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008729if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008731
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008732 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008733 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008734 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008735else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008736
Martin v. Löwis130fb172001-07-19 11:00:41 +00008737 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008738fi
8739
Guido van Rossum627b2d71993-12-24 10:39:16 +00008740
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008741fi
8742
Guido van Rossum0be3e491997-05-22 20:33:33 +00008743fi
8744
Guido van Rossum49545951997-12-02 19:28:29 +00008745fi
8746
Guido van Rossumb93a8621998-05-07 13:27:32 +00008747fi
8748
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008750rm -f core conftest.err conftest.$ac_objext \
8751 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752fi
8753
Martin v. Löwis11437992002-04-12 09:54:03 +00008754
8755fi
8756
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008757
Michael W. Hudson54241132001-12-07 15:38:26 +00008758
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8760$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008761if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008763else
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008765LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769/* Override any GCC internal prototype to avoid an error.
8770 Use char because int might match the return type of a GCC
8771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772#ifdef __cplusplus
8773extern "C"
8774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008775char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008776int
8777main ()
8778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 ;
8781 return 0;
8782}
8783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008784if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008786else
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008789rm -f core conftest.err conftest.$ac_objext \
8790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008791LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8794$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008795if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008797
Martin v. Löwis130fb172001-07-19 11:00:41 +00008798 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008799 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008800 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008801fi
8802
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008803
Neal Norwitza978ab02002-11-02 16:58:05 +00008804 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8806$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008807if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008809else
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008811LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815/* Override any GCC internal prototype to avoid an error.
8816 Use char because int might match the return type of a GCC
8817 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008818#ifdef __cplusplus
8819extern "C"
8820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008821char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008822int
8823main ()
8824{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ;
8827 return 0;
8828}
8829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008830if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008832else
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008835rm -f core conftest.err conftest.$ac_objext \
8836 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008837LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8840$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008841if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008843
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008844 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008845 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008846 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008847fi
8848
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008849 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008850
Martin v. Löwis130fb172001-07-19 11:00:41 +00008851 if test "$USE_THREAD_MODULE" != "#"
8852 then
8853 # If the above checks didn't disable threads, (at least) OSF1
8854 # needs this '-threads' argument during linking.
8855 case $ac_sys_system in
8856 OSF1) LDLAST=-threads;;
8857 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008858 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008859fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008860
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008861if test "$posix_threads" = "yes"; then
8862 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008863
Matthias Kloseb9621712010-04-24 17:59:49 +00008864$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008865
8866 fi
8867
8868 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8869 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008870 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008871$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008872
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008873 ;;
8874 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008875$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008876
8877 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008878 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008879$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008880
8881 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008882 esac
8883
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8885$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008886 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008888else
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008890 ac_cv_pthread_system_supported=no
8891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008893/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008894#include <pthread.h>
8895 void *foo(void *parm) {
8896 return NULL;
8897 }
8898 main() {
8899 pthread_attr_t attr;
8900 pthread_t id;
8901 if (pthread_attr_init(&attr)) exit(-1);
8902 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8903 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8904 exit(0);
8905 }
8906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008907if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008908 ac_cv_pthread_system_supported=yes
8909else
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008914fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916
Guido van Rossum627b2d71993-12-24 10:39:16 +00008917fi
8918
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8920$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008921 if test "$ac_cv_pthread_system_supported" = "yes"; then
8922
Matthias Kloseb9621712010-04-24 17:59:49 +00008923$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008924
8925 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 for ac_func in pthread_sigmask
8927do :
8928 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natali6613c182011-11-27 12:41:06 +01008929if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008930 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008931#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008932_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008933 case $ac_sys_system in
8934 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008935
Matthias Kloseb9621712010-04-24 17:59:49 +00008936$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008937
8938 ;;
8939 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008940fi
8941done
8942
8943fi
8944
8945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008947
Matthias Kloseb9621712010-04-24 17:59:49 +00008948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8949$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008951if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008952 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008953 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956 ipv6=no
8957 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8959$as_echo "yes" >&6; }
8960 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961
8962 ipv6=yes
8963 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965else
Martin v. Löwis11437992002-04-12 09:54:03 +00008966
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008968
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8970$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971 ipv6=no
8972
8973else
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öwisa2ac6022001-08-09 11:40:14 +00008976 /* AF_INET6 available check */
8977#include <sys/types.h>
8978#include <sys/socket.h>
8979main()
8980{
8981 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8982 exit(1);
8983 else
8984 exit(0);
8985}
8986
Martin v. Löwis11437992002-04-12 09:54:03 +00008987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008988if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008989
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8991$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008993
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994else
Matthias Kloseb159a552010-04-25 21:00:44 +00008995
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8997$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008999
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9002 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003fi
9004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009005
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009006if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9008$as_echo_n "checking if RFC2553 API is available... " >&6; }
9009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009010/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009011
9012 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009013#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009014int
9015main ()
9016{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009017struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009018 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 ;
9020 return 0;
9021}
Matthias Kloseb159a552010-04-25 21:00:44 +00009022
Martin v. Löwis11437992002-04-12 09:54:03 +00009023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009024if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009025
9026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009027$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009028 ipv6=yes
9029
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009030else
Matthias Kloseb159a552010-04-25 21:00:44 +00009031
9032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009033$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009034 ipv6=no
9035
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009038fi
9039
9040if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009042
9043fi
9044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009045fi
9046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047
9048ipv6type=unknown
9049ipv6lib=none
9050ipv6trylibc=no
9051
9052if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9054$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009055 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9056 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057 case $i in
9058 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009060/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009061
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062#include <netinet/in.h>
9063#ifdef IPV6_INRIA_VERSION
9064yes
9065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009066_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009069 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009071rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072
9073 ;;
9074 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009076/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009077
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078#include <netinet/in.h>
9079#ifdef __KAME__
9080yes
9081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009082_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085 ipv6type=$i;
9086 ipv6lib=inet6
9087 ipv6libdir=/usr/local/v6/lib
9088 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009090rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091
9092 ;;
9093 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009095/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009096
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097#include <features.h>
9098#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9099yes
9100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009101_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104 ipv6type=$i;
9105 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009107rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108
9109 ;;
9110 linux-inet6)
9111 if test -d /usr/inet6; then
9112 ipv6type=$i
9113 ipv6lib=inet6
9114 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009115 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009116 fi
9117 ;;
9118 solaris)
9119 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009120 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009121 ipv6type=$i
9122 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123 fi
9124 fi
9125 ;;
9126 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009128/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009129
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130#include <sys/param.h>
9131#ifdef _TOSHIBA_INET6
9132yes
9133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009134_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009137 ipv6type=$i;
9138 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009139 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009140fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009141rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009142
9143 ;;
9144 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009146/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009147
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009148#include </usr/local/v6/include/sys/v6config.h>
9149#ifdef __V6D__
9150yes
9151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009152_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009154 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009155 ipv6type=$i;
9156 ipv6lib=v6;
9157 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009158 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009159fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009160rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009161
9162 ;;
9163 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009165/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009166
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009167#include <sys/param.h>
9168#ifdef _ZETA_MINAMI_INET6
9169yes
9170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009171_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009173 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009174 ipv6type=$i;
9175 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009176 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009177fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009178rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009179
9180 ;;
9181 esac
9182 if test "$ipv6type" != "unknown"; then
9183 break
9184 fi
9185 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9187$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009188fi
9189
9190if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9191 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9192 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9193 echo "using lib$ipv6lib"
9194 else
9195 if test $ipv6trylibc = "yes"; then
9196 echo "using libc"
9197 else
9198 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9199 echo "You need to fetch lib$ipv6lib.a from appropriate"
9200 echo 'ipv6 kit and compile beforehand.'
9201 exit 1
9202 fi
9203 fi
9204fi
9205
Matthias Kloseb9621712010-04-24 17:59:49 +00009206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9207$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009209/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009210
9211 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009212int
9213main ()
9214{
9215FSIORefNum fRef = 0
9216 ;
9217 return 0;
9218}
Matthias Kloseb159a552010-04-25 21:00:44 +00009219
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009221if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009222
Matthias Kloseb159a552010-04-25 21:00:44 +00009223
Matthias Kloseb9621712010-04-24 17:59:49 +00009224$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9227$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009228
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009229else
Matthias Kloseb159a552010-04-25 21:00:44 +00009230
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9232$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009233
9234fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9236
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009237# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9239$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009242if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009243 withval=$with_doc_strings;
9244fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009245
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009246
9247if test -z "$with_doc_strings"
9248then with_doc_strings="yes"
9249fi
9250if test "$with_doc_strings" != "no"
9251then
9252
Matthias Kloseb9621712010-04-24 17:59:49 +00009253$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009254
9255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9257$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009258
Antoine Pitrou042b1282010-08-13 21:15:58 +00009259# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9261$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009264if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009266if test "$withval" != no
9267then
9268
Matthias Kloseb9621712010-04-24 17:59:49 +00009269$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009270
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9272$as_echo "yes" >&6; }
9273else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9274$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009275fi
9276else
Matthias Kloseb9621712010-04-24 17:59:49 +00009277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9278$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009279fi
9280
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009281
9282# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9284$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009286# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009287if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288 withval=$with_pymalloc;
9289fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009290
Neil Schemenauera35c6882001-02-27 04:45:05 +00009291
Neil Schemenauer16c22972002-03-22 15:34:49 +00009292if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009293then
9294 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009295 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009296fi
9297if test "$with_pymalloc" != "no"
9298then
Martin v. Löwis11437992002-04-12 09:54:03 +00009299
Matthias Kloseb9621712010-04-24 17:59:49 +00009300$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009301
9302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9304$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009305
Benjamin Peterson05159c42009-12-03 03:01:27 +00009306# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9308$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009309
9310# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009311if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009312 withval=$with_valgrind;
9313else
9314 with_valgrind=no
9315fi
9316
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9318$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009319if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009320 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01009321if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009322
Matthias Kloseb9621712010-04-24 17:59:49 +00009323$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009324
9325else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009326 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009327
9328fi
9329
9330
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009331 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009332fi
9333
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009334# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009335
Guido van Rossum98935bf2001-09-05 19:13:16 +00009336DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009337
Guido van Rossume97ee181999-12-20 21:27:22 +00009338# the dlopen() function means we might want to use dynload_shlib.o. some
9339# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009340for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009341do :
9342 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natali6613c182011-11-27 12:41:06 +01009343if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009345#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009346_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009347
Guido van Rossume97ee181999-12-20 21:27:22 +00009348fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009349done
Guido van Rossume97ee181999-12-20 21:27:22 +00009350
Michael W. Hudson54241132001-12-07 15:38:26 +00009351
Guido van Rossume97ee181999-12-20 21:27:22 +00009352# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9353# loading of modules.
9354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9356$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009357if test -z "$DYNLOADFILE"
9358then
9359 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009360 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9361 if test "$ac_cv_func_dlopen" = yes
9362 then DYNLOADFILE="dynload_shlib.o"
9363 else DYNLOADFILE="dynload_aix.o"
9364 fi
9365 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009366 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009367 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9368 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009369 *)
9370 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9371 # out any dynamic loading
9372 if test "$ac_cv_func_dlopen" = yes
9373 then DYNLOADFILE="dynload_shlib.o"
9374 else DYNLOADFILE="dynload_stub.o"
9375 fi
9376 ;;
9377 esac
9378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9380$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009381if test "$DYNLOADFILE" != "dynload_stub.o"
9382then
Martin v. Löwis11437992002-04-12 09:54:03 +00009383
Matthias Kloseb9621712010-04-24 17:59:49 +00009384$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009385
9386fi
9387
Neil Schemenauer4e425612001-06-19 15:44:15 +00009388# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9389
Michael W. Hudson54241132001-12-07 15:38:26 +00009390
Matthias Kloseb9621712010-04-24 17:59:49 +00009391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9392$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009393if test -z "$MACHDEP_OBJS"
9394then
Jack Jansene578a632001-08-15 01:27:14 +00009395 MACHDEP_OBJS=$extra_machdep_objs
9396else
9397 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9400$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009401
Guido van Rossum627b2d71993-12-24 10:39:16 +00009402# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009403for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009404 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009405 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009406 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009407 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009408 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009409 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009410 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9411 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009412 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009413 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009414 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009415 truncate uname unsetenv utimes waitpid wait3 wait4 \
9416 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009417do :
9418 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9419ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009420if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009422#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009423_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009424
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009425fi
9426done
9427
Michael W. Hudson54241132001-12-07 15:38:26 +00009428
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009429# For some functions, having a definition is not sufficient, since
9430# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9432$as_echo_n "checking for chroot... " >&6; }
9433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009434/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009435#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009436int
9437main ()
9438{
9439void *x=chroot
9440 ;
9441 return 0;
9442}
9443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009445
Matthias Kloseb9621712010-04-24 17:59:49 +00009446$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009447
Matthias Kloseb159a552010-04-25 21:00:44 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009449$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009450else
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9452$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009453
9454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9457$as_echo_n "checking for link... " >&6; }
9458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009459/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009460#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009461int
9462main ()
9463{
9464void *x=link
9465 ;
9466 return 0;
9467}
9468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009469if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009470
Matthias Kloseb9621712010-04-24 17:59:49 +00009471$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009472
Matthias Kloseb159a552010-04-25 21:00:44 +00009473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009474$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009475else
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009478
9479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9482$as_echo_n "checking for symlink... " >&6; }
9483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009484/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009485#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009486int
9487main ()
9488{
9489void *x=symlink
9490 ;
9491 return 0;
9492}
9493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009495
Matthias Kloseb9621712010-04-24 17:59:49 +00009496$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009497
Matthias Kloseb159a552010-04-25 21:00:44 +00009498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009499$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009500else
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009503
9504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9507$as_echo_n "checking for fchdir... " >&6; }
9508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009509/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009510#include <unistd.h>
9511int
9512main ()
9513{
9514void *x=fchdir
9515 ;
9516 return 0;
9517}
9518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009520
Matthias Kloseb9621712010-04-24 17:59:49 +00009521$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009522
Matthias Kloseb159a552010-04-25 21:00:44 +00009523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009524$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009525else
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009528
9529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9532$as_echo_n "checking for fsync... " >&6; }
9533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009534/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009535#include <unistd.h>
9536int
9537main ()
9538{
9539void *x=fsync
9540 ;
9541 return 0;
9542}
9543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009544if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009545
Matthias Kloseb9621712010-04-24 17:59:49 +00009546$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009547
Matthias Kloseb159a552010-04-25 21:00:44 +00009548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009549$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009550else
Matthias Kloseb9621712010-04-24 17:59:49 +00009551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009553
9554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9557$as_echo_n "checking for fdatasync... " >&6; }
9558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009559/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009560#include <unistd.h>
9561int
9562main ()
9563{
9564void *x=fdatasync
9565 ;
9566 return 0;
9567}
9568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009569if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009570
Matthias Kloseb9621712010-04-24 17:59:49 +00009571$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009572
Matthias Kloseb159a552010-04-25 21:00:44 +00009573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009574$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009575else
Matthias Kloseb9621712010-04-24 17:59:49 +00009576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9577$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009578
9579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9582$as_echo_n "checking for epoll... " >&6; }
9583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009584/* end confdefs.h. */
9585#include <sys/epoll.h>
9586int
9587main ()
9588{
9589void *x=epoll_create
9590 ;
9591 return 0;
9592}
9593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009595
Matthias Kloseb9621712010-04-24 17:59:49 +00009596$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009597
Matthias Kloseb159a552010-04-25 21:00:44 +00009598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009599$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009600else
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9602$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009603
9604fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9607$as_echo_n "checking for kqueue... " >&6; }
9608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009609/* end confdefs.h. */
9610
9611#include <sys/types.h>
9612#include <sys/event.h>
9613
9614int
9615main ()
9616{
9617int x=kqueue()
9618 ;
9619 return 0;
9620}
9621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009622if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009623
Matthias Kloseb9621712010-04-24 17:59:49 +00009624$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009625
Matthias Kloseb159a552010-04-25 21:00:44 +00009626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009627$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009628else
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9630$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009631
9632fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009634# On some systems (eg. FreeBSD 5), we would find a definition of the
9635# functions ctermid_r, setgroups in the library, but no prototype
9636# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9637# address to avoid compiler warnings and potential miscompilations
9638# because of the missing prototypes.
9639
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9641$as_echo_n "checking for ctermid_r... " >&6; }
9642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009644
Martin v. Löwisd5843682002-11-21 20:41:28 +00009645#include <stdio.h>
9646
Martin v. Löwisd5843682002-11-21 20:41:28 +00009647int
9648main ()
9649{
9650void* p = ctermid_r
9651 ;
9652 return 0;
9653}
9654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009656
Matthias Kloseb9621712010-04-24 17:59:49 +00009657$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009658
Matthias Kloseb159a552010-04-25 21:00:44 +00009659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009660$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009661else
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9663$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009664
9665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9667
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9669$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009670if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009671 $as_echo_n "(cached) " >&6
9672else
9673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009675#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009676int
9677main ()
9678{
9679void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009680
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009681 ;
9682 return 0;
9683}
9684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009685if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009686 ac_cv_flock_decl=yes
9687else
9688 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009689
9690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009692
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009693fi
9694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9695$as_echo "$ac_cv_flock_decl" >&6; }
9696if test "x${ac_cv_flock_decl}" = xyes; then
9697 for ac_func in flock
9698do :
9699 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natali6613c182011-11-27 12:41:06 +01009700if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009701 cat >>confdefs.h <<_ACEOF
9702#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009703_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009704
Antoine Pitroua3000072010-09-07 14:52:42 +00009705else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009707$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009708if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009709 $as_echo_n "(cached) " >&6
9710else
9711 ac_check_lib_save_LIBS=$LIBS
9712LIBS="-lbsd $LIBS"
9713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9714/* end confdefs.h. */
9715
9716/* Override any GCC internal prototype to avoid an error.
9717 Use char because int might match the return type of a GCC
9718 builtin and then its argument prototype would still apply. */
9719#ifdef __cplusplus
9720extern "C"
9721#endif
9722char flock ();
9723int
9724main ()
9725{
9726return flock ();
9727 ;
9728 return 0;
9729}
9730_ACEOF
9731if ac_fn_c_try_link "$LINENO"; then :
9732 ac_cv_lib_bsd_flock=yes
9733else
9734 ac_cv_lib_bsd_flock=no
9735fi
9736rm -f core conftest.err conftest.$ac_objext \
9737 conftest$ac_exeext conftest.$ac_ext
9738LIBS=$ac_check_lib_save_LIBS
9739fi
9740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9741$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009742if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009743 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009744
9745
9746$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9747
9748
9749fi
9750
9751
9752fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009753done
9754
Antoine Pitroua3000072010-09-07 14:52:42 +00009755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009756
Matthias Kloseb9621712010-04-24 17:59:49 +00009757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9758$as_echo_n "checking for getpagesize... " >&6; }
9759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009760/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009761
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009762#include <unistd.h>
9763
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009764int
9765main ()
9766{
9767void* p = getpagesize
9768 ;
9769 return 0;
9770}
9771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009773
Matthias Kloseb9621712010-04-24 17:59:49 +00009774$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009775
Matthias Kloseb159a552010-04-25 21:00:44 +00009776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009777$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009778else
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9780$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009781
9782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009784
Charles-François Natali6613c182011-11-27 12:41:06 +01009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9786$as_echo_n "checking for broken unsetenv... " >&6; }
9787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9788/* end confdefs.h. */
9789
9790#include <stdlib.h>
9791
9792int
9793main ()
9794{
9795int res = unsetenv("DUMMY")
9796 ;
9797 return 0;
9798}
9799_ACEOF
9800if ac_fn_c_try_compile "$LINENO"; then :
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803else
9804
9805$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9806
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9808$as_echo "yes" >&6; }
9809
9810fi
9811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9812
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009813for ac_prog in true
9814do
9815 # Extract the first word of "$ac_prog", so it can be a program name with args.
9816set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9818$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009819if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009821else
9822 if test -n "$TRUE"; then
9823 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9824else
9825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9826for as_dir in $PATH
9827do
9828 IFS=$as_save_IFS
9829 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831 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 +00009832 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 $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 +00009834 break 2
9835 fi
9836done
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009839
9840fi
9841fi
9842TRUE=$ac_cv_prog_TRUE
9843if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9845$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009846else
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9848$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009849fi
9850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009852 test -n "$TRUE" && break
9853done
9854test -n "$TRUE" || TRUE="/bin/true"
9855
9856
Matthias Kloseb9621712010-04-24 17:59:49 +00009857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9858$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009859if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009861else
9862 ac_check_lib_save_LIBS=$LIBS
9863LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009865/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867/* Override any GCC internal prototype to avoid an error.
9868 Use char because int might match the return type of a GCC
9869 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009870#ifdef __cplusplus
9871extern "C"
9872#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009873char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009874int
9875main ()
9876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009878 ;
9879 return 0;
9880}
9881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009883 ac_cv_lib_c_inet_aton=yes
9884else
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009887rm -f core conftest.err conftest.$ac_objext \
9888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009889LIBS=$ac_check_lib_save_LIBS
9890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9892$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009893if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009894 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009895else
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9897$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009898if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009900else
9901 ac_check_lib_save_LIBS=$LIBS
9902LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009904/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906/* Override any GCC internal prototype to avoid an error.
9907 Use char because int might match the return type of a GCC
9908 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009909#ifdef __cplusplus
9910extern "C"
9911#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009912char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009913int
9914main ()
9915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009917 ;
9918 return 0;
9919}
9920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009922 ac_cv_lib_resolv_inet_aton=yes
9923else
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009926rm -f core conftest.err conftest.$ac_objext \
9927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009928LIBS=$ac_check_lib_save_LIBS
9929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9931$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009932if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009933 cat >>confdefs.h <<_ACEOF
9934#define HAVE_LIBRESOLV 1
9935_ACEOF
9936
9937 LIBS="-lresolv $LIBS"
9938
9939fi
9940
9941
9942fi
9943
9944
Christian Heimesd0764e22007-12-04 15:00:33 +00009945# On Tru64, chflags seems to be present, but calling it will
9946# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9948$as_echo_n "checking for chflags... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009949if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009950 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009951else
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009953 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009954else
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009956/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009957
Christian Heimesd0764e22007-12-04 15:00:33 +00009958#include <sys/stat.h>
9959#include <unistd.h>
9960int main(int argc, char*argv[])
9961{
9962 if(chflags(argv[0], 0) != 0)
9963 return 1;
9964 return 0;
9965}
Ned Deily3eb67d52011-06-28 00:00:28 -07009966
Christian Heimesd0764e22007-12-04 15:00:33 +00009967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009968if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009969 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009970else
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9974 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009975fi
9976
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009977
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9980$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009981if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natali6613c182011-11-27 12:41:06 +01009983if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009984 ac_cv_have_chflags="yes"
9985else
9986 ac_cv_have_chflags="no"
9987fi
9988
9989fi
9990if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009991
Matthias Kloseb9621712010-04-24 17:59:49 +00009992$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009993
9994fi
9995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9997$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009998if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010000else
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010002 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010003else
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010005/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010006
Christian Heimesd0764e22007-12-04 15:00:33 +000010007#include <sys/stat.h>
10008#include <unistd.h>
10009int main(int argc, char*argv[])
10010{
10011 if(lchflags(argv[0], 0) != 0)
10012 return 1;
10013 return 0;
10014}
Ned Deily3eb67d52011-06-28 00:00:28 -070010015
Christian Heimesd0764e22007-12-04 15:00:33 +000010016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010017if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010018 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010019else
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10023 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010024fi
10025
10026
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10029$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010030if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natali6613c182011-11-27 12:41:06 +010010032if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010033 ac_cv_have_lchflags="yes"
10034else
10035 ac_cv_have_lchflags="no"
10036fi
10037
10038fi
10039if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010040
Matthias Kloseb9621712010-04-24 17:59:49 +000010041$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010042
10043fi
10044
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010045case $ac_sys_system/$ac_sys_release in
10046Darwin/*)
10047 _CUR_CFLAGS="${CFLAGS}"
10048 _CUR_LDFLAGS="${LDFLAGS}"
10049 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10050 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10051 ;;
10052esac
10053
Matthias Kloseb9621712010-04-24 17:59:49 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10055$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010056if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010057 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010058else
10059 ac_check_lib_save_LIBS=$LIBS
10060LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010062/* end confdefs.h. */
10063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064/* Override any GCC internal prototype to avoid an error.
10065 Use char because int might match the return type of a GCC
10066 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010067#ifdef __cplusplus
10068extern "C"
10069#endif
10070char inflateCopy ();
10071int
10072main ()
10073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010075 ;
10076 return 0;
10077}
10078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010079if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010080 ac_cv_lib_z_inflateCopy=yes
10081else
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010084rm -f core conftest.err conftest.$ac_objext \
10085 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010086LIBS=$ac_check_lib_save_LIBS
10087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10089$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010090if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010091
Matthias Kloseb9621712010-04-24 17:59:49 +000010092$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010093
10094fi
10095
10096
10097case $ac_sys_system/$ac_sys_release in
10098Darwin/*)
10099 CFLAGS="${_CUR_CFLAGS}"
10100 LDFLAGS="${_CUR_LDFLAGS}"
10101 ;;
10102esac
10103
Matthias Kloseb9621712010-04-24 17:59:49 +000010104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10105$as_echo_n "checking for hstrerror... " >&6; }
10106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010107/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010108
Martin v. Löwise9416172003-05-03 10:12:45 +000010109#include <netdb.h>
10110
Martin v. Löwise9416172003-05-03 10:12:45 +000010111int
10112main ()
10113{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010114void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010115 ;
10116 return 0;
10117}
10118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010120
Matthias Kloseb9621712010-04-24 17:59:49 +000010121$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010122
Matthias Kloseb159a552010-04-25 21:00:44 +000010123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010124$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010125else
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10127$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010128
10129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130rm -f core conftest.err conftest.$ac_objext \
10131 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10134$as_echo_n "checking for inet_aton... " >&6; }
10135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010136/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010137
Martin v. Löwis86d66262006-02-17 08:40:11 +000010138#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010139#include <sys/socket.h>
10140#include <netinet/in.h>
10141#include <arpa/inet.h>
10142
Martin v. Löwise9416172003-05-03 10:12:45 +000010143int
10144main ()
10145{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010146void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010147 ;
10148 return 0;
10149}
10150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010152
Matthias Kloseb9621712010-04-24 17:59:49 +000010153$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010154
Matthias Kloseb159a552010-04-25 21:00:44 +000010155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010156$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010157else
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010160
10161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010162rm -f core conftest.err conftest.$ac_objext \
10163 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10166$as_echo_n "checking for inet_pton... " >&6; }
10167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010168/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010169
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010170#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010171#include <sys/socket.h>
10172#include <netinet/in.h>
10173#include <arpa/inet.h>
10174
Martin v. Löwise9416172003-05-03 10:12:45 +000010175int
10176main ()
10177{
10178void* p = inet_pton
10179 ;
10180 return 0;
10181}
10182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010183if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010184
Matthias Kloseb9621712010-04-24 17:59:49 +000010185$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010186
Matthias Kloseb159a552010-04-25 21:00:44 +000010187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010188$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010189else
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010192
10193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010195
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010196# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10198$as_echo_n "checking for setgroups... " >&6; }
10199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010200/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010201
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010202#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010203#ifdef HAVE_GRP_H
10204#include <grp.h>
10205#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010206
Martin v. Löwisd5843682002-11-21 20:41:28 +000010207int
10208main ()
10209{
10210void* p = setgroups
10211 ;
10212 return 0;
10213}
10214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010215if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010216
Matthias Kloseb9621712010-04-24 17:59:49 +000010217$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010218
Matthias Kloseb159a552010-04-25 21:00:44 +000010219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010220$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010221else
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010224
10225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010227
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010228# check for openpty and forkpty
10229
10230for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010231do :
10232 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natali6613c182011-11-27 12:41:06 +010010233if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010235#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010236_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010237
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010238else
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10240$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010241if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010243else
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010245LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249/* Override any GCC internal prototype to avoid an error.
10250 Use char because int might match the return type of a GCC
10251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252#ifdef __cplusplus
10253extern "C"
10254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010255char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010256int
10257main ()
10258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 ;
10261 return 0;
10262}
10263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010266else
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010269rm -f core conftest.err conftest.$ac_objext \
10270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010271LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10274$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010275if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010277 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010278else
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10280$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010281if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010283else
10284 ac_check_lib_save_LIBS=$LIBS
10285LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010287/* end confdefs.h. */
10288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289/* Override any GCC internal prototype to avoid an error.
10290 Use char because int might match the return type of a GCC
10291 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010292#ifdef __cplusplus
10293extern "C"
10294#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010295char openpty ();
10296int
10297main ()
10298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010300 ;
10301 return 0;
10302}
10303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010304if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010305 ac_cv_lib_bsd_openpty=yes
10306else
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010309rm -f core conftest.err conftest.$ac_objext \
10310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010311LIBS=$ac_check_lib_save_LIBS
10312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10314$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010315if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010316 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010317 LIBS="$LIBS -lbsd"
10318fi
10319
10320
10321fi
10322
Fred Drake8cef4cf2000-06-28 16:40:38 +000010323
10324fi
10325done
10326
10327for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010328do :
10329 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natali6613c182011-11-27 12:41:06 +010010330if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010333_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010334
Fred Drake8cef4cf2000-06-28 16:40:38 +000010335else
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10337$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010338if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010339 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010340else
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010342LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346/* Override any GCC internal prototype to avoid an error.
10347 Use char because int might match the return type of a GCC
10348 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010349#ifdef __cplusplus
10350extern "C"
10351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010352char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010353int
10354main ()
10355{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010356return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ;
10358 return 0;
10359}
10360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010363else
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010366rm -f core conftest.err conftest.$ac_objext \
10367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010368LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10371$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010372if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010373 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010374 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010375else
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10377$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010378if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010380else
10381 ac_check_lib_save_LIBS=$LIBS
10382LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010384/* end confdefs.h. */
10385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010386/* Override any GCC internal prototype to avoid an error.
10387 Use char because int might match the return type of a GCC
10388 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010389#ifdef __cplusplus
10390extern "C"
10391#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010392char forkpty ();
10393int
10394main ()
10395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010397 ;
10398 return 0;
10399}
10400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010402 ac_cv_lib_bsd_forkpty=yes
10403else
Matthias Kloseb9621712010-04-24 17:59:49 +000010404 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010406rm -f core conftest.err conftest.$ac_objext \
10407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010408LIBS=$ac_check_lib_save_LIBS
10409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10411$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010412if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010413 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010414 LIBS="$LIBS -lbsd"
10415fi
10416
10417
10418fi
10419
Fred Drake8cef4cf2000-06-28 16:40:38 +000010420
10421fi
10422done
10423
Jack Jansendd19cf82001-12-06 22:36:17 +000010424
Christian Heimesb186d002008-03-18 15:15:01 +000010425# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010426for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010427do :
10428 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natali6613c182011-11-27 12:41:06 +010010429if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010430 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010431#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010432_ACEOF
10433
10434fi
10435done
10436
10437
Michael W. Hudson54241132001-12-07 15:38:26 +000010438# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010439for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010440do :
10441 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10442ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010443if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010445#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010446_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010447
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010448fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449done
10450
Michael W. Hudson54241132001-12-07 15:38:26 +000010451
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010452ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natali6613c182011-11-27 12:41:06 +010010453if test "x$ac_cv_func_dup2" = x""yes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010454 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010455
Martin v. Löwis1142de32002-03-29 16:28:31 +000010456else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010458 *" dup2.$ac_objext "* ) ;;
10459 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010460 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010461esac
10462
Martin v. Löwis1142de32002-03-29 16:28:31 +000010463fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010464
10465ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natali6613c182011-11-27 12:41:06 +010010466if test "x$ac_cv_func_getcwd" = x""yes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010467 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10468
10469else
10470 case " $LIBOBJS " in
10471 *" getcwd.$ac_objext "* ) ;;
10472 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10473 ;;
10474esac
10475
10476fi
10477
10478ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natali6613c182011-11-27 12:41:06 +010010479if test "x$ac_cv_func_strdup" = x""yes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010480 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10481
10482else
10483 case " $LIBOBJS " in
10484 *" strdup.$ac_objext "* ) ;;
10485 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10486 ;;
10487esac
10488
10489fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010490
10491
10492for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010493do :
10494 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natali6613c182011-11-27 12:41:06 +010010495if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010497#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010500/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010501#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010502int
10503main ()
10504{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010505getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 ;
10507 return 0;
10508}
10509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010510if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010511
Matthias Kloseb9621712010-04-24 17:59:49 +000010512$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010513
Guido van Rossum627b2d71993-12-24 10:39:16 +000010514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010516
Guido van Rossum627b2d71993-12-24 10:39:16 +000010517fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010518done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010519
Jack Jansen150753c2003-03-29 22:07:47 +000010520for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010521do :
10522 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natali6613c182011-11-27 12:41:06 +010010523if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010524 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010525#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010528/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010529#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010530int
10531main ()
10532{
10533setpgrp(0,0);
10534 ;
10535 return 0;
10536}
10537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010539
Matthias Kloseb9621712010-04-24 17:59:49 +000010540$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010541
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010544
10545fi
10546done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010547
Thomas Wouters3a584202000-08-05 23:28:51 +000010548for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010549do :
10550 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natali6613c182011-11-27 12:41:06 +010010551if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010552 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010553#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010556/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010557#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010558int
10559main ()
10560{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010561gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010562 ;
10563 return 0;
10564}
10565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010566if ac_fn_c_try_compile "$LINENO"; then :
10567
Guido van Rossum627b2d71993-12-24 10:39:16 +000010568else
Skip Montanaro6dead952003-09-25 14:50:04 +000010569
Matthias Kloseb9621712010-04-24 17:59:49 +000010570$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010571
Martin v. Löwis11437992002-04-12 09:54:03 +000010572
Guido van Rossum627b2d71993-12-24 10:39:16 +000010573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010575
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010576fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010577done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010578
Michael W. Hudson54241132001-12-07 15:38:26 +000010579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10581$as_echo_n "checking for major... " >&6; }
10582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010583/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010584
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010585#if defined(MAJOR_IN_MKDEV)
10586#include <sys/mkdev.h>
10587#elif defined(MAJOR_IN_SYSMACROS)
10588#include <sys/sysmacros.h>
10589#else
10590#include <sys/types.h>
10591#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010592
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010593int
10594main ()
10595{
10596
10597 makedev(major(0),minor(0));
10598
10599 ;
10600 return 0;
10601}
10602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010603if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010604
10605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010607
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10609$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010610
10611else
Skip Montanaro6dead952003-09-25 14:50:04 +000010612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10614$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010615
10616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010617rm -f core conftest.err conftest.$ac_objext \
10618 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010619
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010620# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010621# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10623$as_echo_n "checking for getaddrinfo... " >&6; }
10624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010625/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010626
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010627#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010628#include <sys/socket.h>
10629#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010630#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010631
Martin v. Löwis11437992002-04-12 09:54:03 +000010632int
10633main ()
10634{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010635getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 ;
10637 return 0;
10638}
10639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010640if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010641 have_getaddrinfo=yes
10642else
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010645rm -f core conftest.err conftest.$ac_objext \
10646 conftest$ac_exeext conftest.$ac_ext
10647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10648$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010649if test $have_getaddrinfo = yes
10650then
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10652$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010653 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010655else
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010657 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010658else
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010660/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010661
10662#include <sys/types.h>
10663#include <netdb.h>
10664#include <string.h>
10665#include <sys/socket.h>
10666#include <netinet/in.h>
10667
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010668int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010669{
10670 int passive, gaierr, inet4 = 0, inet6 = 0;
10671 struct addrinfo hints, *ai, *aitop;
10672 char straddr[INET6_ADDRSTRLEN], strport[16];
10673
10674 for (passive = 0; passive <= 1; passive++) {
10675 memset(&hints, 0, sizeof(hints));
10676 hints.ai_family = AF_UNSPEC;
10677 hints.ai_flags = passive ? AI_PASSIVE : 0;
10678 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010679 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010680 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10681 (void)gai_strerror(gaierr);
10682 goto bad;
10683 }
10684 for (ai = aitop; ai; ai = ai->ai_next) {
10685 if (ai->ai_addr == NULL ||
10686 ai->ai_addrlen == 0 ||
10687 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10688 straddr, sizeof(straddr), strport, sizeof(strport),
10689 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10690 goto bad;
10691 }
10692 switch (ai->ai_family) {
10693 case AF_INET:
10694 if (strcmp(strport, "54321") != 0) {
10695 goto bad;
10696 }
10697 if (passive) {
10698 if (strcmp(straddr, "0.0.0.0") != 0) {
10699 goto bad;
10700 }
10701 } else {
10702 if (strcmp(straddr, "127.0.0.1") != 0) {
10703 goto bad;
10704 }
10705 }
10706 inet4++;
10707 break;
10708 case AF_INET6:
10709 if (strcmp(strport, "54321") != 0) {
10710 goto bad;
10711 }
10712 if (passive) {
10713 if (strcmp(straddr, "::") != 0) {
10714 goto bad;
10715 }
10716 } else {
10717 if (strcmp(straddr, "::1") != 0) {
10718 goto bad;
10719 }
10720 }
10721 inet6++;
10722 break;
10723 case AF_UNSPEC:
10724 goto bad;
10725 break;
10726 default:
10727 /* another family support? */
10728 break;
10729 }
10730 }
10731 }
10732
10733 if (!(inet4 == 0 || inet4 == 2))
10734 goto bad;
10735 if (!(inet6 == 0 || inet6 == 2))
10736 goto bad;
10737
10738 if (aitop)
10739 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010740 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010741
10742 bad:
10743 if (aitop)
10744 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010745 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010746}
10747
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010749if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010750 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010751else
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010758fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010759
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010761
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10763$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10764
Mark Dickinson2df5d282009-12-31 21:22:50 +000010765if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010766then
10767 if test $ipv6 = yes
10768 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010769 echo 'Fatal: You must get working getaddrinfo() function.'
10770 echo ' or you can specify "--disable-ipv6"'.
10771 exit 1
10772 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010773else
Martin v. Löwis11437992002-04-12 09:54:03 +000010774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010776
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010777fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010778
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010779for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010780do :
10781 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natali6613c182011-11-27 12:41:06 +010010782if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010784#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010785_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010786
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010787fi
10788done
10789
Michael W. Hudson54241132001-12-07 15:38:26 +000010790
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10793$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010794if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010796else
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010799#include <sys/types.h>
10800#include <sys/time.h>
10801#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
Martin v. Löwis11437992002-04-12 09:54:03 +000010803int
10804main ()
10805{
10806if ((struct tm *) 0)
10807return 0;
10808 ;
10809 return 0;
10810}
10811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010812if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010813 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010814else
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10820$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010821if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010824
10825fi
10826
Matthias Kloseb9621712010-04-24 17:59:49 +000010827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10828$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010829if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010831else
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010833/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010834#include <sys/types.h>
10835#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010836
Martin v. Löwis11437992002-04-12 09:54:03 +000010837int
10838main ()
10839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840struct tm tm;
10841 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010843 ;
10844 return 0;
10845}
10846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010847if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010848 ac_cv_struct_tm=time.h
10849else
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10855$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010856if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010859
10860fi
10861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862ac_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 +000010863#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010864
Matthias Kloseb9621712010-04-24 17:59:49 +000010865"
Charles-François Natali6613c182011-11-27 12:41:06 +010010866if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010867
10868cat >>confdefs.h <<_ACEOF
10869#define HAVE_STRUCT_TM_TM_ZONE 1
10870_ACEOF
10871
10872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010873fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010874
Martin v. Löwis11437992002-04-12 09:54:03 +000010875if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878
10879else
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10881"
Charles-François Natali6613c182011-11-27 12:41:06 +010010882if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010884else
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010886fi
10887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010888cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010889#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010890_ACEOF
10891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10893$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010894if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896else
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010898/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010899#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010900#if !HAVE_DECL_TZNAME
10901extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010903
Martin v. Löwis11437992002-04-12 09:54:03 +000010904int
10905main ()
10906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010907return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010908 ;
10909 return 0;
10910}
10911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010912if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010913 ac_cv_var_tzname=yes
10914else
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010917rm -f core conftest.err conftest.$ac_objext \
10918 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10921$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010922 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010925
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010926 fi
10927fi
10928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +010010930if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010931
10932cat >>confdefs.h <<_ACEOF
10933#define HAVE_STRUCT_STAT_ST_RDEV 1
10934_ACEOF
10935
10936
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010937fi
10938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +010010940if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010941
Martin v. Löwis11437992002-04-12 09:54:03 +000010942cat >>confdefs.h <<_ACEOF
10943#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10944_ACEOF
10945
10946
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010947fi
10948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +010010950if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010951
10952cat >>confdefs.h <<_ACEOF
10953#define HAVE_STRUCT_STAT_ST_FLAGS 1
10954_ACEOF
10955
10956
10957fi
10958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +010010960if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010961
10962cat >>confdefs.h <<_ACEOF
10963#define HAVE_STRUCT_STAT_ST_GEN 1
10964_ACEOF
10965
10966
10967fi
10968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +010010970if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010971
10972cat >>confdefs.h <<_ACEOF
10973#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10974_ACEOF
10975
10976
10977fi
10978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +010010980if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982cat >>confdefs.h <<_ACEOF
10983#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10984_ACEOF
10985
10986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010988
10989else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010991 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10993 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010994esac
10995
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010996fi
10997
Michael W. Hudson54241132001-12-07 15:38:26 +000010998
Martin v. Löwis11437992002-04-12 09:54:03 +000010999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11001$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011002if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011004else
Matthias Kloseb159a552010-04-25 21:00:44 +000011005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011007/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011008#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011009int
11010main ()
11011{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011012return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 ;
11014 return 0;
11015}
11016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011017if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011018 ac_cv_header_time_altzone=yes
11019else
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024fi
11025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11027$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011028if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011029
Matthias Kloseb9621712010-04-24 17:59:49 +000011030$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011031
11032fi
11033
Guido van Rossumda88dad1995-01-26 00:46:29 +000011034was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11036$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011038/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011039
11040#include <sys/types.h>
11041#include <sys/select.h>
11042#include <sys/time.h>
11043
Martin v. Löwis11437992002-04-12 09:54:03 +000011044int
11045main ()
11046{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011047;
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 ;
11049 return 0;
11050}
11051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011053
11054
Matthias Kloseb9621712010-04-24 17:59:49 +000011055$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011056
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011057 was_it_defined=yes
11058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11062$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11065$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011066if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011068else
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011070/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011071#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011072int
11073main ()
11074{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011075struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011076 ;
11077 return 0;
11078}
11079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011080if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011081 ac_cv_struct_addrinfo=yes
11082else
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11086fi
11087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11089$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011090if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011091
Matthias Kloseb9621712010-04-24 17:59:49 +000011092$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011093
11094fi
11095
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11097$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011098if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011100else
Matthias Kloseb9621712010-04-24 17:59:49 +000011101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011103
11104# include <sys/types.h>
11105# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011106int
11107main ()
11108{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011109struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011110 ;
11111 return 0;
11112}
11113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011115 ac_cv_struct_sockaddr_storage=yes
11116else
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11120fi
11121
Matthias Kloseb9621712010-04-24 17:59:49 +000011122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11123$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011124if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
Matthias Kloseb9621712010-04-24 17:59:49 +000011126$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011127
11128fi
11129
Guido van Rossum627b2d71993-12-24 10:39:16 +000011130# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011131
Matthias Kloseb9621712010-04-24 17:59:49 +000011132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11133$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011134if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011136else
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011139$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011140int
11141main ()
11142{
11143static int test_array [1 - 2 * !(((char) -1) < 0)];
11144test_array [0] = 0
11145
11146 ;
11147 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011148}
Martin v. Löwis11437992002-04-12 09:54:03 +000011149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011150if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011151 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011152else
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11158$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011159if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161
11162fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011163
Matthias Kloseb9621712010-04-24 17:59:49 +000011164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11165$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011166if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011168else
Matthias Kloseb9621712010-04-24 17:59:49 +000011169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011170/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011171
Martin v. Löwis11437992002-04-12 09:54:03 +000011172int
11173main ()
11174{
11175/* FIXME: Include the comments suggested by Paul. */
11176#ifndef __cplusplus
11177 /* Ultrix mips cc rejects this. */
11178 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011179 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011181 char const *const *pcpcc;
11182 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 /* NEC SVR4.0.2 mips cc rejects this. */
11184 struct point {int x, y;};
11185 static struct point const zero = {0,0};
11186 /* AIX XL C 1.02.0.0 rejects this.
11187 It does not let you subtract one const X* pointer from another in
11188 an arm of an if-expression whose if-part is not a constant
11189 expression */
11190 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011192 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193 ++pcpcc;
11194 ppc = (char**) pcpcc;
11195 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011196 { /* SCO 3.2v4 cc rejects this. */
11197 char *t;
11198 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011199
Martin v. Löwis11437992002-04-12 09:54:03 +000011200 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 }
11203 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11204 int x[] = {25, 17};
11205 const int *foo = &x[0];
11206 ++foo;
11207 }
11208 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11209 typedef const int *iptr;
11210 iptr p = 0;
11211 ++p;
11212 }
11213 { /* AIX XL C 1.02.0.0 rejects this saying
11214 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11215 struct s { int j; const int *ap[3]; };
11216 struct s *b; b->j = 5;
11217 }
11218 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11219 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011221 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011222 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011223#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011224
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ;
11226 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011227}
Martin v. Löwis11437992002-04-12 09:54:03 +000011228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011229if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230 ac_cv_c_const=yes
11231else
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11237$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011238if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011241
11242fi
11243
Michael W. Hudson54241132001-12-07 15:38:26 +000011244
Guido van Rossumda88dad1995-01-26 00:46:29 +000011245works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11247$as_echo_n "checking for working volatile... " >&6; }
11248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011250
Martin v. Löwis11437992002-04-12 09:54:03 +000011251int
11252main ()
11253{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011254volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 ;
11256 return 0;
11257}
11258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011259if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011260 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011261else
Skip Montanaro6dead952003-09-25 14:50:04 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011264
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011265
Guido van Rossum627b2d71993-12-24 10:39:16 +000011266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11269$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011270
Guido van Rossumda88dad1995-01-26 00:46:29 +000011271works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11273$as_echo_n "checking for working signed char... " >&6; }
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011276
Martin v. Löwis11437992002-04-12 09:54:03 +000011277int
11278main ()
11279{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011280signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011286 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011287else
Skip Montanaro6dead952003-09-25 14:50:04 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011290
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011291
Guido van Rossum7f43da71994-08-01 12:15:30 +000011292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11295$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011296
Guido van Rossumda88dad1995-01-26 00:46:29 +000011297have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11299$as_echo_n "checking for prototypes... " >&6; }
11300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011301/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011302int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011303int
11304main ()
11305{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011306return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 ;
11308 return 0;
11309}
11310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011312
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011314
Matthias Kloseb159a552010-04-25 21:00:44 +000011315 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11319$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011320
Guido van Rossumda88dad1995-01-26 00:46:29 +000011321works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11323$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011326
11327#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011328int foo(int x, ...) {
11329 va_list va;
11330 va_start(va, x);
11331 va_arg(va, int);
11332 va_arg(va, char *);
11333 va_arg(va, double);
11334 return 0;
11335}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011336
Martin v. Löwis11437992002-04-12 09:54:03 +000011337int
11338main ()
11339{
Guido van Rossum90eea071996-08-30 20:58:57 +000011340return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011341 ;
11342 return 0;
11343}
11344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
11347
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011349
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011350 works=yes
11351
Guido van Rossum627b2d71993-12-24 10:39:16 +000011352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11355$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011356
Martin v. Löwisd6320502004-08-12 13:45:08 +000011357# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11359$as_echo_n "checking for socketpair... " >&6; }
11360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011361/* end confdefs.h. */
11362
11363#include <sys/types.h>
11364#include <sys/socket.h>
11365
11366int
11367main ()
11368{
11369void *x=socketpair
11370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011377
Matthias Kloseb159a552010-04-25 21:00:44 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011380else
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011383
11384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011386
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011387# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11389$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011391/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011392#include <sys/types.h>
11393#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011394int
11395main ()
11396{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011397struct sockaddr x;
11398x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11405$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011408
11409else
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011412
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011415
Guido van Rossumda88dad1995-01-26 00:46:29 +000011416va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11418$as_echo_n "checking whether va_list is an array... " >&6; }
11419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011420/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011421
11422#ifdef HAVE_STDARG_PROTOTYPES
11423#include <stdarg.h>
11424#else
11425#include <varargs.h>
11426#endif
11427
Martin v. Löwis11437992002-04-12 09:54:03 +000011428int
11429main ()
11430{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ;
11433 return 0;
11434}
11435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011436if ac_fn_c_try_compile "$LINENO"; then :
11437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438else
Skip Montanaro6dead952003-09-25 14:50:04 +000011439
Martin v. Löwis11437992002-04-12 09:54:03 +000011440
Matthias Kloseb9621712010-04-24 17:59:49 +000011441$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Guido van Rossumda88dad1995-01-26 00:46:29 +000011443 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011444
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11448$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011449
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011450# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
11452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natali6613c182011-11-27 12:41:06 +010011454if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11459$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011460 OLD_CFLAGS=$CFLAGS
11461 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011463/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011464
11465# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011466
Martin v. Löwis11437992002-04-12 09:54:03 +000011467int
11468main ()
11469{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011470
11471 char *name;
11472 struct hostent *he, *res;
11473 char buffer[2048];
11474 int buflen = 2048;
11475 int h_errnop;
11476
11477 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011478
11479 ;
11480 return 0;
11481}
11482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011483if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011484
Matthias Kloseb9621712010-04-24 17:59:49 +000011485 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011486
Martin v. Löwis11437992002-04-12 09:54:03 +000011487
Matthias Kloseb9621712010-04-24 17:59:49 +000011488$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011489
Matthias Kloseb9621712010-04-24 17:59:49 +000011490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11491$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011492
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011493else
Skip Montanaro6dead952003-09-25 14:50:04 +000011494
Matthias Kloseb9621712010-04-24 17:59:49 +000011495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11498$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011500/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011501
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011502# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011503
Martin v. Löwis11437992002-04-12 09:54:03 +000011504int
11505main ()
11506{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011507
11508 char *name;
11509 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011510 char buffer[2048];
11511 int buflen = 2048;
11512 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011513
Matthias Kloseb159a552010-04-25 21:00:44 +000011514 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011515
11516 ;
11517 return 0;
11518}
11519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011520if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011521
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011523
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
Matthias Kloseb159a552010-04-25 21:00:44 +000011525$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011526
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11528$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011529
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011530else
Skip Montanaro6dead952003-09-25 14:50:04 +000011531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11533$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11535$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11537/* end confdefs.h. */
11538
11539# include <netdb.h>
11540
11541int
11542main ()
11543{
11544
11545 char *name;
11546 struct hostent *he;
11547 struct hostent_data data;
11548
11549 (void) gethostbyname_r(name, he, &data);
11550
11551 ;
11552 return 0;
11553}
11554_ACEOF
11555if ac_fn_c_try_compile "$LINENO"; then :
11556
11557 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11558
11559
11560$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11561
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11563$as_echo "yes" >&6; }
11564
11565else
11566
11567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11568$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011569
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011572
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011575
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011578 CFLAGS=$OLD_CFLAGS
11579
11580else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011581
Matthias Kloseb9621712010-04-24 17:59:49 +000011582 for ac_func in gethostbyname
11583do :
11584 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natali6613c182011-11-27 12:41:06 +010011585if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011587#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011588_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011589
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011590fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011591done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011592
Michael W. Hudson54241132001-12-07 15:38:26 +000011593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011594fi
11595
Michael W. Hudson54241132001-12-07 15:38:26 +000011596
11597
11598
11599
11600
11601
Guido van Rossum627b2d71993-12-24 10:39:16 +000011602# checks for system services
11603# (none yet)
11604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011605# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011606ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natali6613c182011-11-27 12:41:06 +010011607if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011608
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11611$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011612if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011614else
Martin v. Löwis11437992002-04-12 09:54:03 +000011615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011616LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011620/* Override any GCC internal prototype to avoid an error.
11621 Use char because int might match the return type of a GCC
11622 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011623#ifdef __cplusplus
11624extern "C"
11625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011626char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011627int
11628main ()
11629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011631 ;
11632 return 0;
11633}
11634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011636 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011640rm -f core conftest.err conftest.$ac_objext \
11641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011642LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11645$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011646if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 cat >>confdefs.h <<_ACEOF
11648#define HAVE_LIBIEEE 1
11649_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011650
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011651 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011652
Guido van Rossum627b2d71993-12-24 10:39:16 +000011653fi
11654
Michael W. Hudson54241132001-12-07 15:38:26 +000011655
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011656fi
11657
Michael W. Hudson54241132001-12-07 15:38:26 +000011658
Guido van Rossum7f253911997-05-09 02:42:48 +000011659# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11661$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011664if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011666if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011667then
11668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011670
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11672$as_echo "yes" >&6; }
11673else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11674$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011675fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011676else
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11678$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679fi
11680
Guido van Rossum7f253911997-05-09 02:42:48 +000011681
Guido van Rossum7f43da71994-08-01 12:15:30 +000011682# check for --with-libm=...
11683
Guido van Rossum563e7081996-09-10 18:20:48 +000011684case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011685Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011686*) LIBM=-lm
11687esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11689$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011691# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011692if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011693 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011694if test "$withval" = no
11695then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11697$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011698elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011699then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11701$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011702else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011703fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011704else
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11706$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011707fi
11708
Guido van Rossum7f43da71994-08-01 12:15:30 +000011709
11710# check for --with-libc=...
11711
Matthias Kloseb9621712010-04-24 17:59:49 +000011712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11713$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011715# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011716if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011717 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011718if test "$withval" = no
11719then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11721$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011722elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011723then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11725$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011726else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011727fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011728else
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11730$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011731fi
11732
Guido van Rossum7f43da71994-08-01 12:15:30 +000011733
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734# **************************************************
11735# * Check for various properties of floating point *
11736# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11739$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011740if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742else
11743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011745 ac_cv_little_endian_double=no
11746else
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011748/* end confdefs.h. */
11749
11750#include <string.h>
11751int main() {
11752 double x = 9006104071832581.0;
11753 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11754 return 0;
11755 else
11756 return 1;
11757}
11758
11759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761 ac_cv_little_endian_double=yes
11762else
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767fi
11768
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769fi
11770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11772$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011773if test "$ac_cv_little_endian_double" = yes
11774then
11775
Matthias Kloseb9621712010-04-24 17:59:49 +000011776$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011777
11778fi
11779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11781$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011782if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011784else
11785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787 ac_cv_big_endian_double=no
11788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011790/* end confdefs.h. */
11791
11792#include <string.h>
11793int main() {
11794 double x = 9006104071832581.0;
11795 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11796 return 0;
11797 else
11798 return 1;
11799}
11800
11801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011802if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011803 ac_cv_big_endian_double=yes
11804else
Matthias Kloseb9621712010-04-24 17:59:49 +000011805 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011809fi
11810
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011811fi
11812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11814$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011815if test "$ac_cv_big_endian_double" = yes
11816then
11817
Matthias Kloseb9621712010-04-24 17:59:49 +000011818$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011819
11820fi
11821
11822# Some ARM platforms use a mixed-endian representation for doubles.
11823# While Python doesn't currently have full support for these platforms
11824# (see e.g., issue 1762561), we can at least make sure that float <-> string
11825# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11827$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011828if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830else
11831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011833 ac_cv_mixed_endian_double=no
11834else
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011836/* end confdefs.h. */
11837
11838#include <string.h>
11839int main() {
11840 double x = 9006104071832581.0;
11841 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11842 return 0;
11843 else
11844 return 1;
11845}
11846
11847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011849 ac_cv_mixed_endian_double=yes
11850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011855fi
11856
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011857fi
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11860$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011861if test "$ac_cv_mixed_endian_double" = yes
11862then
11863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011865
11866fi
11867
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011868# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011869# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011870# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011871# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011872# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011873# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011874
11875# This inline assembler syntax may also work for suncc and icc,
11876# so we try it on all platforms.
11877
Matthias Kloseb9621712010-04-24 17:59:49 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11879$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011881/* end confdefs.h. */
11882
11883int
11884main ()
11885{
11886
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011887 unsigned short cw;
11888 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11889 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011890
11891 ;
11892 return 0;
11893}
11894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011895if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011896 have_gcc_asm_for_x87=yes
11897else
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011899fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11902$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011903if test "$have_gcc_asm_for_x87" = yes
11904then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011907
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011908fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011909
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011910# Detect whether system arithmetic is subject to x87-style double
11911# rounding issues. The result of this test has little meaning on non
11912# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11913# mode is round-to-nearest and double rounding issues are present, and
11914# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11916$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011917# $BASECFLAGS may affect the result
11918ac_save_cc="$CC"
11919CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011920if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011921 ac_cv_x87_double_rounding=no
11922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011924/* end confdefs.h. */
11925
11926#include <stdlib.h>
11927#include <math.h>
11928int main() {
11929 volatile double x, y, z;
11930 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11931 x = 0.99999999999999989; /* 1-2**-53 */
11932 y = 1./x;
11933 if (y != 1.)
11934 exit(0);
11935 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11936 x = 1e16;
11937 y = 2.99999;
11938 z = x + y;
11939 if (z != 1e16+4.)
11940 exit(0);
11941 /* both tests show evidence of double rounding */
11942 exit(1);
11943}
11944
11945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011946if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011947 ac_cv_x87_double_rounding=no
11948else
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11952 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011953fi
11954
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011955CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11957$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011958if test "$ac_cv_x87_double_rounding" = yes
11959then
11960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011962
11963fi
11964
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011965# ************************************
11966# * Check for mathematical functions *
11967# ************************************
11968
11969LIBS_SAVE=$LIBS
11970LIBS="$LIBS $LIBM"
11971
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011972for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11973do :
11974 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11975ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011976if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011977 cat >>confdefs.h <<_ACEOF
11978#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11979_ACEOF
11980
11981fi
11982done
11983
11984for ac_func in hypot lgamma log1p round tgamma
11985do :
11986 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11987ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011988if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011989 cat >>confdefs.h <<_ACEOF
11990#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11991_ACEOF
11992
11993fi
11994done
11995
11996ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11997"
Charles-François Natali6613c182011-11-27 12:41:06 +010011998if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011999 ac_have_decl=1
12000else
12001 ac_have_decl=0
12002fi
12003
12004cat >>confdefs.h <<_ACEOF
12005#define HAVE_DECL_ISINF $ac_have_decl
12006_ACEOF
12007ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12008"
Charles-François Natali6613c182011-11-27 12:41:06 +010012009if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012010 ac_have_decl=1
12011else
12012 ac_have_decl=0
12013fi
12014
12015cat >>confdefs.h <<_ACEOF
12016#define HAVE_DECL_ISNAN $ac_have_decl
12017_ACEOF
12018ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12019"
Charles-François Natali6613c182011-11-27 12:41:06 +010012020if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012021 ac_have_decl=1
12022else
12023 ac_have_decl=0
12024fi
12025
12026cat >>confdefs.h <<_ACEOF
12027#define HAVE_DECL_ISFINITE $ac_have_decl
12028_ACEOF
12029
12030
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012031# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12032# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12034$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012035if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012037else
12038
Matthias Kloseb9621712010-04-24 17:59:49 +000012039if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012040 ac_cv_tanh_preserves_zero_sign=no
12041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012043/* end confdefs.h. */
12044
12045#include <math.h>
12046#include <stdlib.h>
12047int main() {
12048 /* return 0 if either negative zeros don't exist
12049 on this platform or if negative zeros exist
12050 and tanh(-0.) == -0. */
12051 if (atan2(0., -1.) == atan2(-0., -1.) ||
12052 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12053 else exit(1);
12054}
12055
12056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012058 ac_cv_tanh_preserves_zero_sign=yes
12059else
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012064fi
12065
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012066fi
12067
Matthias Kloseb9621712010-04-24 17:59:49 +000012068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12069$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012070if test "$ac_cv_tanh_preserves_zero_sign" = yes
12071then
12072
Matthias Kloseb9621712010-04-24 17:59:49 +000012073$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012074
12075fi
12076
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012077if test "$ac_cv_func_log1p" = yes
12078then
12079 # On some versions of AIX, log1p(-0.) returns 0. instead of
12080 # -0. See issue #9920.
12081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12082$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012083 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012084 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012085else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012086
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012087 if test "$cross_compiling" = yes; then :
12088 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012089else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12091/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012092
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012093 #include <math.h>
12094 #include <stdlib.h>
12095 int main() {
12096 /* Fail if the signs of log1p(-0.) and -0. can be
12097 distinguished. */
12098 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12099 return 0;
12100 else
12101 return 1;
12102 }
12103
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012104_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012105if ac_fn_c_try_run "$LINENO"; then :
12106 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012107else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012108 ac_cv_log1p_drops_zero_sign=yes
12109fi
12110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12111 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012112fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012113
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012114fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012115
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12117$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12118fi
12119if test "$ac_cv_log1p_drops_zero_sign" = yes
12120then
12121
12122$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12123
12124fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012125
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012126LIBS=$LIBS_SAVE
12127
Mark Dickinsona614f042009-11-28 12:48:43 +000012128# For multiprocessing module, check that sem_open
12129# actually works. For FreeBSD versions <= 7.2,
12130# the kernel module that provides POSIX semaphores
12131# isn't loaded by default, so an attempt to call
12132# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12134$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012135if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012139 ac_cv_posix_semaphores_enabled=yes
12140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012142/* end confdefs.h. */
12143
12144#include <unistd.h>
12145#include <fcntl.h>
12146#include <stdio.h>
12147#include <semaphore.h>
12148#include <sys/stat.h>
12149
12150int main(void) {
12151 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12152 if (a == SEM_FAILED) {
12153 perror("sem_open");
12154 return 1;
12155 }
12156 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012157 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012158 return 0;
12159}
12160
12161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012162if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012163 ac_cv_posix_semaphores_enabled=yes
12164else
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12168 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012169fi
12170
12171
Mark Dickinsona614f042009-11-28 12:48:43 +000012172fi
12173
Matthias Kloseb9621712010-04-24 17:59:49 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12175$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012176if test $ac_cv_posix_semaphores_enabled = no
12177then
12178
Matthias Kloseb9621712010-04-24 17:59:49 +000012179$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012180
12181fi
12182
Mark Dickinson10683072009-04-18 21:18:19 +000012183# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12185$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012186if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012188else
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012190 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012191else
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012193/* end confdefs.h. */
12194
12195#include <unistd.h>
12196#include <fcntl.h>
12197#include <stdio.h>
12198#include <semaphore.h>
12199#include <sys/stat.h>
12200
12201int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012202 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012203 int count;
12204 int res;
12205 if(a==SEM_FAILED){
12206 perror("sem_open");
12207 return 1;
12208
12209 }
12210 res = sem_getvalue(a, &count);
12211 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012212 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012213 return res==-1 ? 1 : 0;
12214}
12215
Mark Dickinson10683072009-04-18 21:18:19 +000012216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012217if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012218 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012219else
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12223 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012224fi
12225
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012227fi
12228
Matthias Kloseb9621712010-04-24 17:59:49 +000012229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12230$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012231if test $ac_cv_broken_sem_getvalue = yes
12232then
12233
Matthias Kloseb9621712010-04-24 17:59:49 +000012234$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012235
12236fi
12237
Mark Dickinsonbd792642009-03-18 20:06:12 +000012238# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12240$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012241# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012242if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012243 enableval=$enable_big_digits; case $enable_big_digits in
12244yes)
12245 enable_big_digits=30 ;;
12246no)
12247 enable_big_digits=15 ;;
1224815|30)
12249 ;;
12250*)
Charles-François Natali6613c182011-11-27 12:41:06 +010012251 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 +000012252esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12254$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012255
12256cat >>confdefs.h <<_ACEOF
12257#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12258_ACEOF
12259
12260
12261else
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12263$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012264fi
12265
12266
Guido van Rossumef2255b2000-03-10 22:30:29 +000012267# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012268ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +010012269if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012270
12271
Matthias Kloseb9621712010-04-24 17:59:49 +000012272$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012273
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012274 wchar_h="yes"
12275
Guido van Rossumef2255b2000-03-10 22:30:29 +000012276else
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012278
12279fi
12280
Michael W. Hudson54241132001-12-07 15:38:26 +000012281
Martin v. Löwis11437992002-04-12 09:54:03 +000012282
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012283# determine wchar_t size
12284if test "$wchar_h" = yes
12285then
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12288# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12289# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12291$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012292if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12296"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012297
Martin v. Löwis11437992002-04-12 09:54:03 +000012298else
Matthias Kloseb9621712010-04-24 17:59:49 +000012299 if test "$ac_cv_type_wchar_t" = yes; then
12300 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012302as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natali6613c182011-11-27 12:41:06 +010012303See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304 else
12305 ac_cv_sizeof_wchar_t=0
12306 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012308
Martin v. Löwis11437992002-04-12 09:54:03 +000012309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12311$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312
12313
12314
Martin v. Löwis11437992002-04-12 09:54:03 +000012315cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012316#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012317_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012318
Michael W. Hudson54241132001-12-07 15:38:26 +000012319
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012320fi
12321
Matthias Kloseb9621712010-04-24 17:59:49 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12323$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012324have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012326/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012327
12328#include <tcl.h>
12329#if TCL_UTF_MAX != 6
12330# error "NOT UCS4_TCL"
12331#endif
12332int
12333main ()
12334{
12335
12336 ;
12337 return 0;
12338}
12339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012341
12342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012344
12345 have_ucs4_tcl=yes
12346
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12350$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012351
Skip Montanaro6dead952003-09-25 14:50:04 +000012352# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012353if test "$wchar_h" = yes
12354then
12355 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12357$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012358 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012360else
12361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012363 ac_cv_wchar_t_signed=yes
12364else
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012366/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012367
12368 #include <wchar.h>
12369 int main()
12370 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012371 /* Success: exit code 0 */
12372 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012373 }
12374
12375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012376if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012377 ac_cv_wchar_t_signed=yes
12378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12382 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012383fi
12384
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012385fi
12386
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12388$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389fi
12390
Matthias Kloseb9621712010-04-24 17:59:49 +000012391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12392$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012393
12394# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012395if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012396 withval=$with_wide_unicode;
12397if test "$withval" != no
12398then unicode_size="4"
12399else unicode_size="2"
12400fi
12401
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012402else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403
Georg Brandl52d168a2008-01-07 18:10:24 +000012404case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012405 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012406 *) unicode_size="2" ;;
12407esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012408
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012409fi
12410
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012411
12412
Georg Brandl52d168a2008-01-07 18:10:24 +000012413case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012414 4)
12415 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12416
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012417 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012418 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012419 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012420 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012421esac
12422
Michael W. Hudson54241132001-12-07 15:38:26 +000012423
Martin v. Löwis11437992002-04-12 09:54:03 +000012424
Georg Brandl52d168a2008-01-07 18:10:24 +000012425# wchar_t is only usable if it maps to an unsigned type
12426if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012427 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012428then
12429 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012430
Matthias Kloseb9621712010-04-24 17:59:49 +000012431$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012434
Georg Brandl52d168a2008-01-07 18:10:24 +000012435elif test "$ac_cv_sizeof_short" = "$unicode_size"
12436then
12437 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012439
Georg Brandl52d168a2008-01-07 18:10:24 +000012440elif test "$ac_cv_sizeof_long" = "$unicode_size"
12441then
12442 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012444
Georg Brandl52d168a2008-01-07 18:10:24 +000012445else
12446 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12449$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012450
12451# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12453$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012454if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012456else
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 ac_cv_c_bigendian=unknown
12458 # See if we're dealing with a universal compiler.
12459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12460/* end confdefs.h. */
12461#ifndef __APPLE_CC__
12462 not a universal capable compiler
12463 #endif
12464 typedef int dummy;
12465
Skip Montanaro6dead952003-09-25 14:50:04 +000012466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467if ac_fn_c_try_compile "$LINENO"; then :
12468
12469 # Check for potential -arch flags. It is not universal unless
12470 # there are at least two -arch flags with different values.
12471 ac_arch=
12472 ac_prev=
12473 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12474 if test -n "$ac_prev"; then
12475 case $ac_word in
12476 i?86 | x86_64 | ppc | ppc64)
12477 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12478 ac_arch=$ac_word
12479 else
12480 ac_cv_c_bigendian=universal
12481 break
12482 fi
12483 ;;
12484 esac
12485 ac_prev=
12486 elif test "x$ac_word" = "x-arch"; then
12487 ac_prev=arch
12488 fi
12489 done
12490fi
12491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12492 if test $ac_cv_c_bigendian = unknown; then
12493 # See if sys/param.h defines the BYTE_ORDER macro.
12494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012495/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012496#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012497 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012498
Martin v. Löwis11437992002-04-12 09:54:03 +000012499int
12500main ()
12501{
Matthias Kloseb9621712010-04-24 17:59:49 +000012502#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12503 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12504 && LITTLE_ENDIAN)
12505 bogus endian macros
12506 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012507
12508 ;
12509 return 0;
12510}
12511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012512if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012513 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012515/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012516#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012518
Martin v. Löwis11437992002-04-12 09:54:03 +000012519int
12520main ()
12521{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012522#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 not big endian
12524 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
12526 ;
12527 return 0;
12528}
12529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012531 ac_cv_c_bigendian=yes
12532else
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012536fi
12537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12538 fi
12539 if test $ac_cv_c_bigendian = unknown; then
12540 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012543#include <limits.h>
12544
Martin v. Löwis11437992002-04-12 09:54:03 +000012545int
12546main ()
12547{
Matthias Kloseb9621712010-04-24 17:59:49 +000012548#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12549 bogus endian macros
12550 #endif
12551
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 ;
12553 return 0;
12554}
12555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012556if ac_fn_c_try_compile "$LINENO"; then :
12557 # It does; now see whether it defined to _BIG_ENDIAN or not.
12558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12559/* end confdefs.h. */
12560#include <limits.h>
12561
12562int
12563main ()
12564{
12565#ifndef _BIG_ENDIAN
12566 not big endian
12567 #endif
12568
12569 ;
12570 return 0;
12571}
12572_ACEOF
12573if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012574 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012575else
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12579fi
12580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12581 fi
12582 if test $ac_cv_c_bigendian = unknown; then
12583 # Compile a test program.
12584 if test "$cross_compiling" = yes; then :
12585 # Try to guess by grepping values from an object file.
12586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12587/* end confdefs.h. */
12588short int ascii_mm[] =
12589 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12590 short int ascii_ii[] =
12591 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12592 int use_ascii (int i) {
12593 return ascii_mm[i] + ascii_ii[i];
12594 }
12595 short int ebcdic_ii[] =
12596 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12597 short int ebcdic_mm[] =
12598 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12599 int use_ebcdic (int i) {
12600 return ebcdic_mm[i] + ebcdic_ii[i];
12601 }
12602 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604int
12605main ()
12606{
12607return use_ascii (foo) == use_ebcdic (foo);
12608 ;
12609 return 0;
12610}
12611_ACEOF
12612if ac_fn_c_try_compile "$LINENO"; then :
12613 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12614 ac_cv_c_bigendian=yes
12615 fi
12616 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12617 if test "$ac_cv_c_bigendian" = unknown; then
12618 ac_cv_c_bigendian=no
12619 else
12620 # finding both strings is unlikely to happen, but who knows?
12621 ac_cv_c_bigendian=unknown
12622 fi
12623 fi
12624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012626else
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012628/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012630int
12631main ()
12632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 /* Are we little or big endian? From Harbison&Steele. */
12635 union
12636 {
12637 long int l;
12638 char c[sizeof (long int)];
12639 } u;
12640 u.l = 1;
12641 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642
12643 ;
12644 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012645}
Martin v. Löwis11437992002-04-12 09:54:03 +000012646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012647if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012648 ac_cv_c_bigendian=no
12649else
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12653 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12659$as_echo "$ac_cv_c_bigendian" >&6; }
12660 case $ac_cv_c_bigendian in #(
12661 yes)
12662 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12663;; #(
12664 no)
12665 ;; #(
12666 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012669
Matthias Kloseb9621712010-04-24 17:59:49 +000012670 ;; #(
12671 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012672 as_fn_error $? "unknown endianness
Charles-François Natali6613c182011-11-27 12:41:06 +010012673 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012675
Michael W. Hudson54241132001-12-07 15:38:26 +000012676
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012677# ABI version string for Python extension modules. This appears between the
12678# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12679# from the following attributes which affect the ABI of this Python build (in
12680# this order):
12681#
12682# * The Python implementation (always 'cpython-' for us)
12683# * The major and minor version numbers
12684# * --with-pydebug (adds a 'd')
12685# * --with-pymalloc (adds a 'm')
12686# * --with-wide-unicode (adds a 'u')
12687#
12688# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012689# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12690# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012691
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12693$as_echo_n "checking ABIFLAGS... " >&6; }
12694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12695$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12697$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012698SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12700$as_echo "$SOABI" >&6; }
12701
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12703$as_echo_n "checking LDVERSION... " >&6; }
12704LDVERSION='$(VERSION)$(ABIFLAGS)'
12705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12706$as_echo "$LDVERSION" >&6; }
12707
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012708# SO is the extension of shared libraries `(including the dot!)
12709# -- usually .so, .sl on HP-UX, .dll on Cygwin
12710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12711$as_echo_n "checking SO... " >&6; }
12712if test -z "$SO"
12713then
12714 case $ac_sys_system in
12715 hp*|HP*)
12716 case `uname -m` in
12717 ia64) SO=.so;;
12718 *) SO=.sl;;
12719 esac
12720 ;;
12721 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012722 Linux*|GNU*)
12723 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012724 *) SO=.so;;
12725 esac
12726else
12727 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012728 echo
12729 echo '====================================================================='
12730 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012731 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012732 echo '+ Do you really mean to change the extension for shared libraries? +'
12733 echo '+ Continuing in 10 seconds to let you to ponder. +'
12734 echo '+ +'
12735 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012736 sleep 10
12737fi
12738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12739$as_echo "$SO" >&6; }
12740
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012741# Check whether right shifting a negative integer extends the sign bit
12742# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12744$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012745if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012747else
Martin v. Löwis11437992002-04-12 09:54:03 +000012748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012750 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012751else
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012753/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012754
12755int main()
12756{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012757 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012758}
12759
Martin v. Löwis11437992002-04-12 09:54:03 +000012760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012761if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012762 ac_cv_rshift_extends_sign=yes
12763else
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012768fi
12769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770fi
12771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12773$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012774if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012775then
Martin v. Löwis11437992002-04-12 09:54:03 +000012776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012778
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012779fi
12780
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012781# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12783$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012784if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012786else
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
Matthias Kloseb9621712010-04-24 17:59:49 +000012788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012789/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012790#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012791int
12792main ()
12793{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012794
12795 FILE *f = fopen("/dev/null", "r");
12796 flockfile(f);
12797 getc_unlocked(f);
12798 funlockfile(f);
12799
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ;
12801 return 0;
12802}
12803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012804if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012805 ac_cv_have_getc_unlocked=yes
12806else
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 ac_cv_have_getc_unlocked=no
12808fi
12809rm -f core conftest.err conftest.$ac_objext \
12810 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12814$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012815if test "$ac_cv_have_getc_unlocked" = yes
12816then
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012819
12820fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012821
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012822# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012823# save the value of LIBS so we don't actually link Python with readline
12824LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012825
Gregory P. Smith18820942008-09-07 06:24:49 +000012826# On some systems we need to link readline to a termcap compatible
12827# library. NOTE: Keep the precedence of listed libraries synchronised
12828# with setup.py.
12829py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12831$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012832for py_libtermcap in "" ncursesw ncurses curses termcap; do
12833 if test -z "$py_libtermcap"; then
12834 READLINE_LIBS="-lreadline"
12835 else
12836 READLINE_LIBS="-lreadline -l$py_libtermcap"
12837 fi
12838 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012840/* end confdefs.h. */
12841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842/* Override any GCC internal prototype to avoid an error.
12843 Use char because int might match the return type of a GCC
12844 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012845#ifdef __cplusplus
12846extern "C"
12847#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012848char readline ();
12849int
12850main ()
12851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012853 ;
12854 return 0;
12855}
12856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012857if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012858 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012860rm -f core conftest.err conftest.$ac_objext \
12861 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012862 if test $py_cv_lib_readline = yes; then
12863 break
12864 fi
12865done
12866# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12867#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012868if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12870$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012871else
Matthias Kloseb9621712010-04-24 17:59:49 +000012872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12873$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012876
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012877fi
12878
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012879# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12881$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012882if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012884else
12885 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012886LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012888/* end confdefs.h. */
12889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890/* Override any GCC internal prototype to avoid an error.
12891 Use char because int might match the return type of a GCC
12892 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012893#ifdef __cplusplus
12894extern "C"
12895#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012896char rl_callback_handler_install ();
12897int
12898main ()
12899{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012901 ;
12902 return 0;
12903}
12904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012905if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012906 ac_cv_lib_readline_rl_callback_handler_install=yes
12907else
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012910rm -f core conftest.err conftest.$ac_objext \
12911 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012912LIBS=$ac_check_lib_save_LIBS
12913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12915$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012916if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012919
12920fi
12921
12922
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012923# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012925/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012926#include <readline/readline.h>
12927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012928if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012929 have_readline=yes
12930else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012931 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012932
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012933fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012934rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012935if test $have_readline = yes
12936then
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012938/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012939#include <readline/readline.h>
12940
12941_ACEOF
12942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012944
Matthias Kloseb9621712010-04-24 17:59:49 +000012945$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012946
12947fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012948rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012951/* end confdefs.h. */
12952#include <readline/readline.h>
12953
12954_ACEOF
12955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012956 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012959
12960fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012961rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012962
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012963fi
12964
Martin v. Löwis0daad592001-09-30 21:09:59 +000012965# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12967$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012968if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012970else
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012972LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976/* Override any GCC internal prototype to avoid an error.
12977 Use char because int might match the return type of a GCC
12978 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012979#ifdef __cplusplus
12980extern "C"
12981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012982char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012983int
12984main ()
12985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 ;
12988 return 0;
12989}
12990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012991if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012996rm -f core conftest.err conftest.$ac_objext \
12997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012998LIBS=$ac_check_lib_save_LIBS
12999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13001$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013002if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013005
Martin v. Löwis0daad592001-09-30 21:09:59 +000013006fi
13007
Michael W. Hudson54241132001-12-07 15:38:26 +000013008
Thomas Wouters89d996e2007-09-08 17:39:28 +000013009# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13011$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013012if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013014else
13015 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013016LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013018/* end confdefs.h. */
13019
13020/* Override any GCC internal prototype to avoid an error.
13021 Use char because int might match the return type of a GCC
13022 builtin and then its argument prototype would still apply. */
13023#ifdef __cplusplus
13024extern "C"
13025#endif
13026char rl_completion_display_matches_hook ();
13027int
13028main ()
13029{
13030return rl_completion_display_matches_hook ();
13031 ;
13032 return 0;
13033}
13034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013035if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013036 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13037else
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013040rm -f core conftest.err conftest.$ac_objext \
13041 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013042LIBS=$ac_check_lib_save_LIBS
13043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13045$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013046if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013049
13050fi
13051
13052
Martin v. Löwis0daad592001-09-30 21:09:59 +000013053# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13055$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013056if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013058else
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013060LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013064/* Override any GCC internal prototype to avoid an error.
13065 Use char because int might match the return type of a GCC
13066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013067#ifdef __cplusplus
13068extern "C"
13069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013070char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013071int
13072main ()
13073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013075 ;
13076 return 0;
13077}
13078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013081else
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013084rm -f core conftest.err conftest.$ac_objext \
13085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013086LIBS=$ac_check_lib_save_LIBS
13087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13089$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013090if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013093
Guido van Rossum353ae582001-07-10 16:45:32 +000013094fi
13095
Jack Jansendd19cf82001-12-06 22:36:17 +000013096
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013097# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013099/* end confdefs.h. */
13100#include <readline/readline.h>
13101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013102if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013103 have_readline=yes
13104else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013105 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013106
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013107fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013108rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013109if test $have_readline = yes
13110then
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013112/* end confdefs.h. */
13113#include <readline/readline.h>
13114
13115_ACEOF
13116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013120
13121fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013122rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013123
13124fi
13125
Martin v. Löwis82bca632006-02-10 20:49:30 +000013126# End of readline checks: restore LIBS
13127LIBS=$LIBS_no_readline
13128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13130$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013131if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013133else
Martin v. Löwis11437992002-04-12 09:54:03 +000013134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013136 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013137else
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013139/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013140
13141int main()
13142{
13143 int val1 = nice(1);
13144 if (val1 != -1 && val1 == nice(2))
13145 exit(0);
13146 exit(1);
13147}
13148
Martin v. Löwis11437992002-04-12 09:54:03 +000013149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013150if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013151 ac_cv_broken_nice=yes
13152else
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13156 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013157fi
13158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013159fi
13160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13162$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013163if test "$ac_cv_broken_nice" = yes
13164then
Martin v. Löwis11437992002-04-12 09:54:03 +000013165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013167
13168fi
13169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13171$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013172if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013174else
Matthias Kloseb9621712010-04-24 17:59:49 +000013175 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013176 ac_cv_broken_poll=no
13177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013179/* end confdefs.h. */
13180
13181#include <poll.h>
13182
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013183int main()
13184{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013185 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013186 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013187
13188 close (42);
13189
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013190 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013191 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013192 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013193 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013194 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013195 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013196 return 1;
13197}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013198
13199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013200if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013201 ac_cv_broken_poll=yes
13202else
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013209fi
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13212$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013213if test "$ac_cv_broken_poll" = yes
13214then
13215
Matthias Kloseb9621712010-04-24 17:59:49 +000013216$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013217
13218fi
13219
Brett Cannon43802422005-02-10 20:48:03 +000013220# 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 +000013221# (which is not required by ISO C or UNIX spec) and/or if we support
13222# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013223ac_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 +000013224#include <$ac_cv_struct_tm>
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226"
Charles-François Natali6613c182011-11-27 12:41:06 +010013227if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013228
13229cat >>confdefs.h <<_ACEOF
13230#define HAVE_STRUCT_TM_TM_ZONE 1
13231_ACEOF
13232
13233
13234fi
13235
13236if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013239
13240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13242"
Charles-François Natali6613c182011-11-27 12:41:06 +010013243if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247fi
13248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013250#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013251_ACEOF
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13254$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013255if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013259/* end confdefs.h. */
13260#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013261#if !HAVE_DECL_TZNAME
13262extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013263#endif
13264
13265int
13266main ()
13267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013269 ;
13270 return 0;
13271}
13272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013273if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013274 ac_cv_var_tzname=yes
13275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013278rm -f core conftest.err conftest.$ac_objext \
13279 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13282$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013283 if test $ac_cv_var_tzname = yes; then
13284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013286
13287 fi
13288fi
13289
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013290
Martin v. Löwis1d459062005-03-14 21:23:33 +000013291# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13293$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013294if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013296else
13297
Matthias Kloseb9621712010-04-24 17:59:49 +000013298if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013299 ac_cv_working_tzset=no
13300else
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013302/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013303
13304#include <stdlib.h>
13305#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013306#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013307
13308#if HAVE_TZNAME
13309extern char *tzname[];
13310#endif
13311
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013312int main()
13313{
Brett Cannon18367812003-09-19 00:59:16 +000013314 /* Note that we need to ensure that not only does tzset(3)
13315 do 'something' with localtime, but it works as documented
13316 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013317 This includes making sure that tzname is set properly if
13318 tm->tm_zone does not exist since it is the alternative way
13319 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013320
13321 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013322 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013323 */
13324
Martin v. Löwis1d459062005-03-14 21:23:33 +000013325 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013326 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13327
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013328 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013329 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013330 if (localtime(&groundhogday)->tm_hour != 0)
13331 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013332#if HAVE_TZNAME
13333 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13334 if (strcmp(tzname[0], "UTC") ||
13335 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13336 exit(1);
13337#endif
Brett Cannon18367812003-09-19 00:59:16 +000013338
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013339 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013340 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013341 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013342 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013343#if HAVE_TZNAME
13344 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13345 exit(1);
13346#endif
Brett Cannon18367812003-09-19 00:59:16 +000013347
13348 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13349 tzset();
13350 if (localtime(&groundhogday)->tm_hour != 11)
13351 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013352#if HAVE_TZNAME
13353 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13354 exit(1);
13355#endif
13356
13357#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013358 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13359 exit(1);
13360 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13361 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013362#endif
Brett Cannon18367812003-09-19 00:59:16 +000013363
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013364 exit(0);
13365}
13366
13367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013368if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013369 ac_cv_working_tzset=yes
13370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13374 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013375fi
13376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377fi
13378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13380$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013381if test "$ac_cv_working_tzset" = yes
13382then
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013385
13386fi
13387
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013388# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13390$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013391if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013395/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013396#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013397int
13398main ()
13399{
13400
13401struct stat st;
13402st.st_mtim.tv_nsec = 1;
13403
13404 ;
13405 return 0;
13406}
13407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013409 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013410else
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13414fi
13415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13417$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013418if test "$ac_cv_stat_tv_nsec" = yes
13419then
13420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013422
13423fi
13424
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013425# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13427$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013428if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013430else
Matthias Kloseb9621712010-04-24 17:59:49 +000013431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013432/* end confdefs.h. */
13433#include <sys/stat.h>
13434int
13435main ()
13436{
13437
13438struct stat st;
13439st.st_mtimespec.tv_nsec = 1;
13440
13441 ;
13442 return 0;
13443}
13444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013446 ac_cv_stat_tv_nsec2=yes
13447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13451fi
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13454$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013455if test "$ac_cv_stat_tv_nsec2" = yes
13456then
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013459
13460fi
13461
Jack Jansen666b1e72001-10-31 12:11:48 +000013462# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13464$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013465if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013467else
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013469/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013470#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013471int
13472main ()
13473{
Jack Jansen666b1e72001-10-31 12:11:48 +000013474
13475 int rtn;
13476 rtn = mvwdelch(0,0,0);
13477
Martin v. Löwis11437992002-04-12 09:54:03 +000013478 ;
13479 return 0;
13480}
13481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013482if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013483 ac_cv_mvwdelch_is_expression=yes
13484else
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13488fi
13489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13491$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013492
13493if test "$ac_cv_mvwdelch_is_expression" = yes
13494then
Martin v. Löwis11437992002-04-12 09:54:03 +000013495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013497
13498fi
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13501$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013502if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013504else
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013506/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013507#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013508int
13509main ()
13510{
Jack Jansen666b1e72001-10-31 12:11:48 +000013511
13512 WINDOW *w;
13513 w->_flags = 0;
13514
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 ;
13516 return 0;
13517}
13518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013519if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013520 ac_cv_window_has_flags=yes
13521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13525fi
13526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13528$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013529
Jack Jansen666b1e72001-10-31 12:11:48 +000013530
13531if test "$ac_cv_window_has_flags" = yes
13532then
Martin v. Löwis11437992002-04-12 09:54:03 +000013533
Matthias Kloseb9621712010-04-24 17:59:49 +000013534$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013535
13536fi
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13539$as_echo_n "checking for is_term_resized... " >&6; }
13540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013541/* end confdefs.h. */
13542#include <curses.h>
13543int
13544main ()
13545{
13546void *x=is_term_resized
13547 ;
13548 return 0;
13549}
13550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013554
Matthias Kloseb159a552010-04-25 21:00:44 +000013555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013557else
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13559$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013560
13561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13565$as_echo_n "checking for resize_term... " >&6; }
13566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013567/* end confdefs.h. */
13568#include <curses.h>
13569int
13570main ()
13571{
13572void *x=resize_term
13573 ;
13574 return 0;
13575}
13576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013577if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013580
Matthias Kloseb159a552010-04-25 21:00:44 +000013581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013583else
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13585$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013586
13587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13591$as_echo_n "checking for resizeterm... " >&6; }
13592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013593/* end confdefs.h. */
13594#include <curses.h>
13595int
13596main ()
13597{
13598void *x=resizeterm
13599 ;
13600 return 0;
13601}
13602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013603if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013606
Matthias Kloseb159a552010-04-25 21:00:44 +000013607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013608$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13611$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013612
13613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13617$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013618
13619if test -r /dev/ptmx
13620then
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13622$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013625
Thomas Wouters89f507f2006-12-13 04:49:30 +000013626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13628$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013629fi
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13632$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013633
13634if test -r /dev/ptc
13635then
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13637$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013638
Matthias Kloseb9621712010-04-24 17:59:49 +000013639$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013640
Thomas Wouters89f507f2006-12-13 04:49:30 +000013641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13643$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013644fi
13645
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013646if test "$have_long_long" = yes
13647then
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13649$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013650 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013652else
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013654 ac_cv_have_long_long_format=no
13655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013657/* end confdefs.h. */
13658
13659 #include <stdio.h>
13660 #include <stddef.h>
13661 #include <string.h>
13662
13663 #ifdef HAVE_SYS_TYPES_H
13664 #include <sys/types.h>
13665 #endif
13666
13667 int main()
13668 {
13669 char buffer[256];
13670
13671 if (sprintf(buffer, "%lld", (long long)123) < 0)
13672 return 1;
13673 if (strcmp(buffer, "123"))
13674 return 1;
13675
13676 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13677 return 1;
13678 if (strcmp(buffer, "-123"))
13679 return 1;
13680
13681 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13682 return 1;
13683 if (strcmp(buffer, "123"))
13684 return 1;
13685
13686 return 0;
13687 }
13688
13689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013690if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013691 ac_cv_have_long_long_format=yes
13692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13696 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013697fi
13698
13699
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013700fi
13701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13703$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013704fi
13705
Mark Dickinson89d7d412009-12-31 20:50:59 +000013706if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013707then
13708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013710
13711fi
13712
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013713if test $ac_sys_system = Darwin
13714then
13715 LIBS="$LIBS -framework CoreFoundation"
13716fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13719$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013720if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013722else
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013724 ac_cv_have_size_t_format="cross -- assuming yes"
13725
Thomas Wouters477c8d52006-05-27 19:21:47 +000013726else
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013728/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013729
Thomas Wouters477c8d52006-05-27 19:21:47 +000013730#include <stdio.h>
13731#include <stddef.h>
13732#include <string.h>
13733
Christian Heimes2c181612007-12-17 20:04:13 +000013734#ifdef HAVE_SYS_TYPES_H
13735#include <sys/types.h>
13736#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013737
13738#ifdef HAVE_SSIZE_T
13739typedef ssize_t Py_ssize_t;
13740#elif SIZEOF_VOID_P == SIZEOF_LONG
13741typedef long Py_ssize_t;
13742#else
13743typedef int Py_ssize_t;
13744#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013745
Christian Heimes2c181612007-12-17 20:04:13 +000013746int main()
13747{
13748 char buffer[256];
13749
Thomas Wouters477c8d52006-05-27 19:21:47 +000013750 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13751 return 1;
13752
Thomas Wouters89f507f2006-12-13 04:49:30 +000013753 if (strcmp(buffer, "123"))
13754 return 1;
13755
13756 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13757 return 1;
13758
13759 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013760 return 1;
13761
13762 return 0;
13763}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013764
Thomas Wouters477c8d52006-05-27 19:21:47 +000013765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013766if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013767 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013768else
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013773fi
13774
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13777$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013778if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013781
13782fi
13783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013785#ifdef HAVE_SYS_TYPES_H
13786#include <sys/types.h>
13787#endif
13788#ifdef HAVE_SYS_SOCKET_H
13789#include <sys/socket.h>
13790#endif
13791
Matthias Kloseb9621712010-04-24 17:59:49 +000013792"
Charles-François Natali6613c182011-11-27 12:41:06 +010013793if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013794
Martin v. Löwis11437992002-04-12 09:54:03 +000013795else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013796
Matthias Kloseb9621712010-04-24 17:59:49 +000013797$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013798
13799fi
13800
Michael W. Hudson54241132001-12-07 15:38:26 +000013801
Matthias Kloseb9621712010-04-24 17:59:49 +000013802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13803$as_echo_n "checking for broken mbstowcs... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013804if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013808 ac_cv_broken_mbstowcs=no
13809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013811/* end confdefs.h. */
13812
13813#include<stdlib.h>
13814int main() {
13815 size_t len = -1;
13816 const char *str = "text";
13817 len = mbstowcs(NULL, str, 0);
13818 return (len != 4);
13819}
13820
13821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013823 ac_cv_broken_mbstowcs=no
13824else
Matthias Kloseb9621712010-04-24 17:59:49 +000013825 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013829fi
13830
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013831fi
13832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13834$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013835if test "$ac_cv_broken_mbstowcs" = yes
13836then
13837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013839
13840fi
13841
Antoine Pitrou042b1282010-08-13 21:15:58 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13843$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013844if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013845 $as_echo_n "(cached) " >&6
13846else
13847 if test "$cross_compiling" = yes; then :
13848 ac_cv_computed_gotos=no
13849else
13850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13851/* end confdefs.h. */
13852
13853int main(int argc, char **argv)
13854{
13855 static void *targets[1] = { &&LABEL1 };
13856 goto LABEL2;
13857LABEL1:
13858 return 0;
13859LABEL2:
13860 goto *targets[0];
13861 return 1;
13862}
13863
13864_ACEOF
13865if ac_fn_c_try_run "$LINENO"; then :
13866 ac_cv_computed_gotos=yes
13867else
13868 ac_cv_computed_gotos=no
13869fi
13870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13871 conftest.$ac_objext conftest.beam conftest.$ac_ext
13872fi
13873
13874fi
13875
13876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13877$as_echo "$ac_cv_computed_gotos" >&6; }
13878if test "$ac_cv_computed_gotos" = yes
13879then
13880
13881$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13882
13883fi
13884
Antoine Pitroub52ec782009-01-25 16:34:23 +000013885# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13887$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013888
13889# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013890if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013891 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013892if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013893then
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13898$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013899fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013900if test "$withval" = no
13901then
13902
13903$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13906$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013907fi
13908
Antoine Pitrou042b1282010-08-13 21:15:58 +000013909else
13910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13911$as_echo "no value specified" >&6; }
13912fi
13913
Antoine Pitroub52ec782009-01-25 16:34:23 +000013914
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013915case $ac_sys_system in
13916AIX*)
13917
13918$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13919 ;;
13920esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013921
Michael W. Hudson54241132001-12-07 15:38:26 +000013922
Jesus Cea6a792292010-05-03 21:18:48 +000013923case $ac_sys_system in
Charles-François Natali6613c182011-11-27 12:41:06 +010013924 OSF*) as_fn_error $? "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
Jesus Cea6a792292010-05-03 21:18:48 +000013925esac
13926
Gregory P. Smith138fa432010-12-13 08:00:52 +000013927ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Charles-François Natali6613c182011-11-27 12:41:06 +010013928if test "x$ac_cv_func_pipe2" = x""yes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013929
13930$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13931
13932fi
Jesus Cea6a792292010-05-03 21:18:48 +000013933
13934
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013935
13936
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013937for h in `(cd $srcdir;echo Python/thread_*.h)`
13938do
13939 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13940done
13941
Michael W. Hudson54241132001-12-07 15:38:26 +000013942
Neal Norwitzd24499d2005-12-18 21:36:39 +000013943SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13945$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013946for dir in $SRCDIRS; do
13947 if test ! -d $dir; then
13948 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013949 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013950done
Matthias Kloseb9621712010-04-24 17:59:49 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13952$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013953
Guido van Rossum627b2d71993-12-24 10:39:16 +000013954# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013955ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013956
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013957ac_config_files="$ac_config_files Modules/ld_so_aix"
13958
Martin v. Löwis11437992002-04-12 09:54:03 +000013959cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013960# This file is a shell script that caches the results of configure
13961# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013962# scripts and configure runs, see configure's option --config-cache.
13963# It is not useful on other systems. If it contains results you don't
13964# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013965#
Martin v. Löwis11437992002-04-12 09:54:03 +000013966# config.status only pays attention to the cache file if you give it
13967# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013968#
Skip Montanaro6dead952003-09-25 14:50:04 +000013969# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013970# loading this file, other *unset* `ac_cv_foo' will be assigned the
13971# following values.
13972
13973_ACEOF
13974
Guido van Rossumf78abae1997-01-21 22:02:36 +000013975# The following way of writing the cache mishandles newlines in values,
13976# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013978# Ultrix sh set writes to stderr and can't be redirected directly,
13979# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980(
13981 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13982 eval ac_val=\$$ac_var
13983 case $ac_val in #(
13984 *${as_nl}*)
13985 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13987$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988 esac
13989 case $ac_var in #(
13990 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13992 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993 esac ;;
13994 esac
13995 done
13996
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13999 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 # `set' does not quote correctly, so add quotes: double-quote
14001 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014003 "s/'/'\\\\''/g;
14004 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014005 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014006 *)
14007 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014008 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014009 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010 esac |
14011 sort
14012) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014015 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14018 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14020 :end' >>confcache
14021if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14022 if test -w "$cache_file"; then
Charles-François Natali6613c182011-11-27 12:41:06 +010014023 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14025$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natali6613c182011-11-27 12:41:06 +010014026 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014027 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14029$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014030 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014031fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014032rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014033
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014034test "x$prefix" = xNONE && prefix=$ac_default_prefix
14035# Let make expand exec_prefix.
14036test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014037
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014038DEFS=-DHAVE_CONFIG_H
14039
Skip Montanaro6dead952003-09-25 14:50:04 +000014040ac_libobjs=
14041ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014042U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014043for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14044 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014047 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14048 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14050 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014051done
14052LIBOBJS=$ac_libobjs
14053
14054LTLIBOBJS=$ac_ltlibobjs
14055
14056
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
Matthias Kloseb9621712010-04-24 17:59:49 +000014058
Charles-François Natali6613c182011-11-27 12:41:06 +010014059: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000014060ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014061ac_clean_files_save=$ac_clean_files
14062ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014063{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14064$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14065as_write_fail=0
14066cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014067#! $SHELL
14068# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014069# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014070# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014071# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014072
Martin v. Löwis11437992002-04-12 09:54:03 +000014073debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014074ac_cs_recheck=false
14075ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077SHELL=\${CONFIG_SHELL-$SHELL}
14078export SHELL
14079_ASEOF
14080cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14081## -------------------- ##
14082## M4sh Initialization. ##
14083## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085# Be more Bourne compatible
14086DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014087if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014088 emulate sh
14089 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014091 # is contrary to our usage. Disable this feature.
14092 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014094else
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 case `(set -o) 2>/dev/null` in #(
14096 *posix*) :
14097 set -o posix ;; #(
14098 *) :
14099 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014101fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014102
14103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104as_nl='
14105'
14106export as_nl
14107# Printing a long string crashes Solaris 7 /usr/bin/printf.
14108as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14109as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14110as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14111# Prefer a ksh shell builtin over an external printf program on Solaris,
14112# but without wasting forks for bash or zsh.
14113if test -z "$BASH_VERSION$ZSH_VERSION" \
14114 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14115 as_echo='print -r --'
14116 as_echo_n='print -rn --'
14117elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14118 as_echo='printf %s\n'
14119 as_echo_n='printf %s'
14120else
14121 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14122 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14123 as_echo_n='/usr/ucb/echo -n'
14124 else
14125 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14126 as_echo_n_body='eval
14127 arg=$1;
14128 case $arg in #(
14129 *"$as_nl"*)
14130 expr "X$arg" : "X\\(.*\\)$as_nl";
14131 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14132 esac;
14133 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14134 '
14135 export as_echo_n_body
14136 as_echo_n='sh -c $as_echo_n_body as_echo'
14137 fi
14138 export as_echo_body
14139 as_echo='sh -c $as_echo_body as_echo'
14140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014141
14142# The user is always right.
14143if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 PATH_SEPARATOR=:
14145 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14146 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14147 PATH_SEPARATOR=';'
14148 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151
14152# IFS
14153# We need space, tab and new line, in precisely that order. Quoting is
14154# there to prevent editors from complaining about space-tab.
14155# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14156# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157IFS=" "" $as_nl"
14158
14159# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014160case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014161 *[\\/]* ) as_myself=$0 ;;
14162 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014163for as_dir in $PATH
14164do
14165 IFS=$as_save_IFS
14166 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14168 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014169IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171 ;;
14172esac
14173# We did not find ourselves, most probably we were run as `sh COMMAND'
14174# in which case we are not to be found in the path.
14175if test "x$as_myself" = x; then
14176 as_myself=$0
14177fi
14178if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14180 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181fi
14182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183# Unset variables that we do not need and which cause bugs (e.g. in
14184# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14185# suppresses any "Segmentation fault" message there. '((' could
14186# trigger a bug in pdksh 5.2.14.
14187for as_var in BASH_ENV ENV MAIL MAILPATH
14188do eval test x\${$as_var+set} = xset \
14189 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190done
14191PS1='$ '
14192PS2='> '
14193PS4='+ '
14194
14195# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014196LC_ALL=C
14197export LC_ALL
14198LANGUAGE=C
14199export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200
Matthias Kloseb9621712010-04-24 17:59:49 +000014201# CDPATH.
14202(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14203
14204
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014205# as_fn_error STATUS ERROR [LINENO LOG_FD]
14206# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014207# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14208# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014209# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014210as_fn_error ()
14211{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014212 as_status=$1; test $as_status -eq 0 && as_status=1
14213 if test "$4"; then
14214 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14215 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014217 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 as_fn_exit $as_status
14219} # as_fn_error
14220
14221
14222# as_fn_set_status STATUS
14223# -----------------------
14224# Set $? to STATUS, without forking.
14225as_fn_set_status ()
14226{
14227 return $1
14228} # as_fn_set_status
14229
14230# as_fn_exit STATUS
14231# -----------------
14232# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14233as_fn_exit ()
14234{
14235 set +e
14236 as_fn_set_status $1
14237 exit $1
14238} # as_fn_exit
14239
14240# as_fn_unset VAR
14241# ---------------
14242# Portably unset VAR.
14243as_fn_unset ()
14244{
14245 { eval $1=; unset $1;}
14246}
14247as_unset=as_fn_unset
14248# as_fn_append VAR VALUE
14249# ----------------------
14250# Append the text in VALUE to the end of the definition contained in VAR. Take
14251# advantage of any shell optimizations that allow amortized linear growth over
14252# repeated appends, instead of the typical quadratic growth present in naive
14253# implementations.
14254if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14255 eval 'as_fn_append ()
14256 {
14257 eval $1+=\$2
14258 }'
14259else
14260 as_fn_append ()
14261 {
14262 eval $1=\$$1\$2
14263 }
14264fi # as_fn_append
14265
14266# as_fn_arith ARG...
14267# ------------------
14268# Perform arithmetic evaluation on the ARGs, and store the result in the
14269# global $as_val. Take advantage of shells that can avoid forks. The arguments
14270# must be portable across $(()) and expr.
14271if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14272 eval 'as_fn_arith ()
14273 {
14274 as_val=$(( $* ))
14275 }'
14276else
14277 as_fn_arith ()
14278 {
14279 as_val=`expr "$@" || test $? -eq 1`
14280 }
14281fi # as_fn_arith
14282
14283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014284if expr a : '\(a\)' >/dev/null 2>&1 &&
14285 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14286 as_expr=expr
14287else
14288 as_expr=false
14289fi
14290
14291if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14292 as_basename=basename
14293else
14294 as_basename=false
14295fi
14296
Matthias Kloseb9621712010-04-24 17:59:49 +000014297if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14298 as_dirname=dirname
14299else
14300 as_dirname=false
14301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014303as_me=`$as_basename -- "$0" ||
14304$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14305 X"$0" : 'X\(//\)$' \| \
14306 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014307$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308 sed '/^.*\/\([^/][^/]*\)\/*$/{
14309 s//\1/
14310 q
14311 }
14312 /^X\/\(\/\/\)$/{
14313 s//\1/
14314 q
14315 }
14316 /^X\/\(\/\).*/{
14317 s//\1/
14318 q
14319 }
14320 s/.*/./; q'`
14321
Matthias Kloseb9621712010-04-24 17:59:49 +000014322# Avoid depending upon Character Ranges.
14323as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14324as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14325as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14326as_cr_digits='0123456789'
14327as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328
14329ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014330case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014331-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014334 xy) ECHO_C='\c';;
14335 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14336 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337 esac;;
14338*)
14339 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014341
Martin v. Löwis11437992002-04-12 09:54:03 +000014342rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343if test -d conf$$.dir; then
14344 rm -f conf$$.dir/conf$$.file
14345else
14346 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014349if (echo >conf$$.file) 2>/dev/null; then
14350 if ln -s conf$$.file conf$$ 2>/dev/null; then
14351 as_ln_s='ln -s'
14352 # ... but there are two gotchas:
14353 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14354 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14355 # In both cases, we have to default to `cp -p'.
14356 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14357 as_ln_s='cp -p'
14358 elif ln conf$$.file conf$$ 2>/dev/null; then
14359 as_ln_s=ln
14360 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014361 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014363else
14364 as_ln_s='cp -p'
14365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14367rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369
14370# as_fn_mkdir_p
14371# -------------
14372# Create "$as_dir" as a directory, including parents if necessary.
14373as_fn_mkdir_p ()
14374{
14375
14376 case $as_dir in #(
14377 -*) as_dir=./$as_dir;;
14378 esac
14379 test -d "$as_dir" || eval $as_mkdir_p || {
14380 as_dirs=
14381 while :; do
14382 case $as_dir in #(
14383 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14384 *) as_qdir=$as_dir;;
14385 esac
14386 as_dirs="'$as_qdir' $as_dirs"
14387 as_dir=`$as_dirname -- "$as_dir" ||
14388$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14389 X"$as_dir" : 'X\(//\)[^/]' \| \
14390 X"$as_dir" : 'X\(//\)$' \| \
14391 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14392$as_echo X"$as_dir" |
14393 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14394 s//\1/
14395 q
14396 }
14397 /^X\(\/\/\)[^/].*/{
14398 s//\1/
14399 q
14400 }
14401 /^X\(\/\/\)$/{
14402 s//\1/
14403 q
14404 }
14405 /^X\(\/\).*/{
14406 s//\1/
14407 q
14408 }
14409 s/.*/./; q'`
14410 test -d "$as_dir" && break
14411 done
14412 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014413 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014414
14415
14416} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014417if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014419else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014420 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014421 as_mkdir_p=false
14422fi
14423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424if test -x / >/dev/null 2>&1; then
14425 as_test_x='test -x'
14426else
14427 if ls -dL / >/dev/null 2>&1; then
14428 as_ls_L_option=L
14429 else
14430 as_ls_L_option=
14431 fi
14432 as_test_x='
14433 eval sh -c '\''
14434 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014437 case $1 in #(
14438 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441 ???[sx]*):;;*)false;;esac;fi
14442 '\'' sh
14443 '
14444fi
14445as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
14447# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014448as_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 +000014449
14450# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014451as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014452
14453
Martin v. Löwis11437992002-04-12 09:54:03 +000014454exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014455## ----------------------------------- ##
14456## Main body of $CONFIG_STATUS script. ##
14457## ----------------------------------- ##
14458_ASEOF
14459test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14462# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014463# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464# values after options handling.
14465ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014466This file was extended by python $as_me 3.2, which was
Charles-François Natali6613c182011-11-27 12:41:06 +010014467generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014468
14469 CONFIG_FILES = $CONFIG_FILES
14470 CONFIG_HEADERS = $CONFIG_HEADERS
14471 CONFIG_LINKS = $CONFIG_LINKS
14472 CONFIG_COMMANDS = $CONFIG_COMMANDS
14473 $ $0 $@
14474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475on `(hostname || uname -n) 2>/dev/null | sed 1q`
14476"
14477
Martin v. Löwis11437992002-04-12 09:54:03 +000014478_ACEOF
14479
Matthias Kloseb9621712010-04-24 17:59:49 +000014480case $ac_config_files in *"
14481"*) set x $ac_config_files; shift; ac_config_files=$*;;
14482esac
14483
14484case $ac_config_headers in *"
14485"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14486esac
14487
14488
14489cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014490# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014491config_files="$ac_config_files"
14492config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014497ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014498\`$as_me' instantiates files and other configuration actions
14499from templates according to the current configuration. Unless the files
14500and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014501
Matthias Kloseb9621712010-04-24 17:59:49 +000014502Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014503
14504 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014506 --config print configuration, then exit
14507 -q, --quiet, --silent
14508 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 -d, --debug don't remove temporary files
14510 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 --file=FILE[:TEMPLATE]
14512 instantiate the configuration file FILE
14513 --header=FILE[:TEMPLATE]
14514 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014515
14516Configuration files:
14517$config_files
14518
14519Configuration headers:
14520$config_headers
14521
Matthias Kloseb9621712010-04-24 17:59:49 +000014522Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014525cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14526ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014527ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014528python config.status 3.2
Charles-François Natali6613c182011-11-27 12:41:06 +010014529configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014531
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014532Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014533This config.status script is free software; the Free Software Foundation
14534gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535
14536ac_pwd='$ac_pwd'
14537srcdir='$srcdir'
14538INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014539test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014540_ACEOF
14541
Matthias Kloseb9621712010-04-24 17:59:49 +000014542cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14543# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014544ac_need_defaults=:
14545while test $# != 0
14546do
14547 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014548 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014549 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14550 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014551 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014553 --*=)
14554 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14555 ac_optarg=
14556 ac_shift=:
14557 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014559 ac_option=$1
14560 ac_optarg=$2
14561 ac_shift=shift
14562 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 esac
14564
Skip Montanaro6dead952003-09-25 14:50:04 +000014565 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014566 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014567 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14568 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 $as_echo "$ac_cs_version"; exit ;;
14571 --config | --confi | --conf | --con | --co | --c )
14572 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 debug=: ;;
14575 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014576 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 case $ac_optarg in
14578 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014579 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 esac
14581 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 ac_need_defaults=false;;
14583 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014584 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 case $ac_optarg in
14586 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14587 esac
14588 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014589 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590 --he | --h)
14591 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014592 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014593Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014594 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014596 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14597 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14598 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014599
14600 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014601 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014602Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
14607 esac
14608 shift
14609done
14610
Skip Montanaro6dead952003-09-25 14:50:04 +000014611ac_configure_extra_args=
14612
14613if $ac_cs_silent; then
14614 exec 6>/dev/null
14615 ac_configure_extra_args="$ac_configure_extra_args --silent"
14616fi
14617
14618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014620if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14622 shift
14623 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14624 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014627fi
14628
Martin v. Löwis11437992002-04-12 09:54:03 +000014629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631exec 5>>config.log
14632{
14633 echo
14634 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14635## Running $as_me. ##
14636_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014641cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014643
Matthias Kloseb9621712010-04-24 17:59:49 +000014644cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645
14646# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014647for ac_config_target in $ac_config_targets
14648do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649 case $ac_config_target in
14650 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14651 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14652 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014653 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14654 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14656 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014657 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014658 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659
Charles-François Natali6613c182011-11-27 12:41:06 +010014660 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 esac
14662done
14663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664
Martin v. Löwis11437992002-04-12 09:54:03 +000014665# If the user did not use the arguments to specify the items to instantiate,
14666# then the envvar interface is used. Set only those that are not.
14667# We use the long form for the default assignment because of an extremely
14668# bizarre bug on SunOS 4.1.3.
14669if $ac_need_defaults; then
14670 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14671 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14672fi
14673
Skip Montanaro6dead952003-09-25 14:50:04 +000014674# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014675# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014676# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677# Hook for its removal unless debugging.
14678# Note that there is a small window in which the directory will not be cleaned:
14679# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014680$debug ||
14681{
Charles-François Natali6613c182011-11-27 12:41:06 +010014682 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683 trap 'exit_status=$?
Charles-François Natali6613c182011-11-27 12:41:06 +010014684 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014687}
Martin v. Löwis11437992002-04-12 09:54:03 +000014688# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014689
Martin v. Löwis11437992002-04-12 09:54:03 +000014690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natali6613c182011-11-27 12:41:06 +010014692 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014693} ||
14694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695 tmp=./conf$$-$RANDOM
14696 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014697} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014698
Matthias Kloseb9621712010-04-24 17:59:49 +000014699# Set up the scripts for CONFIG_FILES section.
14700# No need to generate them if there are no CONFIG_FILES.
14701# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014702if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014703
Matthias Kloseb9621712010-04-24 17:59:49 +000014704
14705ac_cr=`echo X | tr X '\015'`
14706# On cygwin, bash can eat \r inside `` if the user requested igncr.
14707# But we know of no other shell where ac_cr would be empty at this
14708# point, so we can use a bashism as a fallback.
14709if test "x$ac_cr" = x; then
14710 eval ac_cr=\$\'\\r\'
14711fi
14712ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14713if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014714 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014715else
14716 ac_cs_awk_cr=$ac_cr
14717fi
14718
Charles-François Natali6613c182011-11-27 12:41:06 +010014719echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014720_ACEOF
14721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723{
14724 echo "cat >conf$$subs.awk <<_ACEOF" &&
14725 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14726 echo "_ACEOF"
14727} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014728 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14729ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730ac_delim='%!_!# '
14731for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014733 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14736 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737 break
14738 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014739 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740 else
14741 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014742 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743done
Matthias Kloseb9621712010-04-24 17:59:49 +000014744rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745
Matthias Kloseb9621712010-04-24 17:59:49 +000014746cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natali6613c182011-11-27 12:41:06 +010014747cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014749sed -n '
14750h
14751s/^/S["/; s/!.*/"]=/
14752p
14753g
14754s/^[^!]*!//
14755:repl
14756t repl
14757s/'"$ac_delim"'$//
14758t delim
14759:nl
14760h
14761s/\(.\{148\}\)..*/\1/
14762t more1
14763s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14764p
14765n
14766b repl
14767:more1
14768s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14769p
14770g
14771s/.\{148\}//
14772t nl
14773:delim
14774h
14775s/\(.\{148\}\)..*/\1/
14776t more2
14777s/["\\]/\\&/g; s/^/"/; s/$/"/
14778p
14779b
14780:more2
14781s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14782p
14783g
14784s/.\{148\}//
14785t delim
14786' <conf$$subs.awk | sed '
14787/^[^""]/{
14788 N
14789 s/\n//
14790}
14791' >>$CONFIG_STATUS || ac_write_fail=1
14792rm -f conf$$subs.awk
14793cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14794_ACAWK
Charles-François Natali6613c182011-11-27 12:41:06 +010014795cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 for (key in S) S_is_set[key] = 1
14797 FS = ""
14798
14799}
14800{
14801 line = $ 0
14802 nfields = split(line, field, "@")
14803 substed = 0
14804 len = length(field[1])
14805 for (i = 2; i < nfields; i++) {
14806 key = field[i]
14807 keylen = length(key)
14808 if (S_is_set[key]) {
14809 value = S[key]
14810 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14811 len += length(value) + length(field[++i])
14812 substed = 1
14813 } else
14814 len += 1 + keylen
14815 }
14816
14817 print line
14818}
14819
14820_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014822cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14823if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14824 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14825else
14826 cat
Charles-François Natali6613c182011-11-27 12:41:06 +010014827fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014828 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014829_ACEOF
14830
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014831# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14832# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833# trailing colons and then remove the whole line if VPATH becomes empty
14834# (actually we leave an empty line to preserve line numbers).
14835if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014836 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14837h
14838s///
14839s/^/:/
14840s/[ ]*$/:/
14841s/:\$(srcdir):/:/g
14842s/:\${srcdir}:/:/g
14843s/:@srcdir@:/:/g
14844s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014846x
14847s/\(=[ ]*\).*/\1/
14848G
14849s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850s/^[^=]*=[ ]*$//
14851}'
14852fi
14853
Matthias Kloseb9621712010-04-24 17:59:49 +000014854cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014855fi # test -n "$CONFIG_FILES"
14856
Matthias Kloseb9621712010-04-24 17:59:49 +000014857# Set up the scripts for CONFIG_HEADERS section.
14858# No need to generate them if there are no CONFIG_HEADERS.
14859# This happens for instance with `./config.status Makefile'.
14860if test -n "$CONFIG_HEADERS"; then
Charles-François Natali6613c182011-11-27 12:41:06 +010014861cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014862BEGIN {
14863_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865# Transform confdefs.h into an awk script `defines.awk', embedded as
14866# here-document in config.status, that substitutes the proper values into
14867# config.h.in to produce config.h.
14868
14869# Create a delimiter string that does not exist in confdefs.h, to ease
14870# handling of long lines.
14871ac_delim='%!_!# '
14872for ac_last_try in false false :; do
Charles-François Natali6613c182011-11-27 12:41:06 +010014873 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14874 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 break
14876 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014877 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014878 else
14879 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14880 fi
14881done
14882
14883# For the awk script, D is an array of macro values keyed by name,
14884# likewise P contains macro parameters if any. Preserve backslash
14885# newline sequences.
14886
14887ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14888sed -n '
14889s/.\{148\}/&'"$ac_delim"'/g
14890t rset
14891:rset
14892s/^[ ]*#[ ]*define[ ][ ]*/ /
14893t def
14894d
14895:def
14896s/\\$//
14897t bsnl
14898s/["\\]/\\&/g
14899s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14900D["\1"]=" \3"/p
14901s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14902d
14903:bsnl
14904s/["\\]/\\&/g
14905s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14906D["\1"]=" \3\\\\\\n"\\/p
14907t cont
14908s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14909t cont
14910d
14911:cont
14912n
14913s/.\{148\}/&'"$ac_delim"'/g
14914t clear
14915:clear
14916s/\\$//
14917t bsnlc
14918s/["\\]/\\&/g; s/^/"/; s/$/"/p
14919d
14920:bsnlc
14921s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14922b cont
14923' <confdefs.h | sed '
14924s/'"$ac_delim"'/"\\\
14925"/g' >>$CONFIG_STATUS || ac_write_fail=1
14926
14927cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14928 for (key in D) D_is_set[key] = 1
14929 FS = ""
14930}
14931/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14932 line = \$ 0
14933 split(line, arg, " ")
14934 if (arg[1] == "#") {
14935 defundef = arg[2]
14936 mac1 = arg[3]
14937 } else {
14938 defundef = substr(arg[1], 2)
14939 mac1 = arg[2]
14940 }
14941 split(mac1, mac2, "(") #)
14942 macro = mac2[1]
14943 prefix = substr(line, 1, index(line, defundef) - 1)
14944 if (D_is_set[macro]) {
14945 # Preserve the white space surrounding the "#".
14946 print prefix "define", macro P[macro] D[macro]
14947 next
14948 } else {
14949 # Replace #undef with comments. This is necessary, for example,
14950 # in the case of _POSIX_SOURCE, which is predefined and required
14951 # on some systems where configure will not decide to define it.
14952 if (defundef == "undef") {
14953 print "/*", prefix defundef, macro, "*/"
14954 next
14955 }
14956 }
14957}
14958{ print }
14959_ACAWK
14960_ACEOF
14961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014962 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014963fi # test -n "$CONFIG_HEADERS"
14964
14965
14966eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14967shift
14968for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969do
14970 case $ac_tag in
14971 :[FHLC]) ac_mode=$ac_tag; continue;;
14972 esac
14973 case $ac_mode$ac_tag in
14974 :[FHL]*:*);;
Charles-François Natali6613c182011-11-27 12:41:06 +010014975 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976 :[FH]-) ac_tag=-:-;;
14977 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14978 esac
14979 ac_save_IFS=$IFS
14980 IFS=:
14981 set x $ac_tag
14982 IFS=$ac_save_IFS
14983 shift
14984 ac_file=$1
14985 shift
14986
14987 case $ac_mode in
14988 :L) ac_source=$1;;
14989 :[FH])
14990 ac_file_inputs=
14991 for ac_f
14992 do
14993 case $ac_f in
Charles-François Natali6613c182011-11-27 12:41:06 +010014994 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995 *) # Look for the file first in the build tree, then in the source tree
14996 # (if the path is not absolute). The absolute path cannot be DOS-style,
14997 # because $ac_f cannot contain `:'.
14998 test -f "$ac_f" ||
14999 case $ac_f in
15000 [\\/$]*) false;;
15001 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15002 esac ||
Charles-François Natali6613c182011-11-27 12:41:06 +010015003 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15006 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007 done
15008
15009 # Let's still pretend it is `configure' which instantiates (i.e., don't
15010 # use $as_me), people would be surprised to read:
15011 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 configure_input='Generated from '`
15013 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15014 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 if test x"$ac_file" != x-; then
15016 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15018$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015020 # Neutralize special characters interpreted by sed in replacement strings.
15021 case $configure_input in #(
15022 *\&* | *\|* | *\\* )
15023 ac_sed_conf_input=`$as_echo "$configure_input" |
15024 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15025 *) ac_sed_conf_input=$configure_input;;
15026 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027
15028 case $ac_tag in
Charles-François Natali6613c182011-11-27 12:41:06 +010015029 *:-:* | *:-) cat >"$tmp/stdin" \
15030 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031 esac
15032 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 esac
15034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015036$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015037 X"$ac_file" : 'X\(//\)[^/]' \| \
15038 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015040$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15042 s//\1/
15043 q
15044 }
15045 /^X\(\/\/\)[^/].*/{
15046 s//\1/
15047 q
15048 }
15049 /^X\(\/\/\)$/{
15050 s//\1/
15051 q
15052 }
15053 /^X\(\/\).*/{
15054 s//\1/
15055 q
15056 }
15057 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ac_builddir=.
15060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061case "$ac_dir" in
15062.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15063*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015066 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067 case $ac_top_builddir_sub in
15068 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15069 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15070 esac ;;
15071esac
15072ac_abs_top_builddir=$ac_pwd
15073ac_abs_builddir=$ac_pwd$ac_dir_suffix
15074# for backward compatibility:
15075ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015076
15077case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080 ac_top_srcdir=$ac_top_builddir_sub
15081 ac_abs_top_srcdir=$ac_pwd ;;
15082 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015083 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084 ac_top_srcdir=$srcdir
15085 ac_abs_top_srcdir=$srcdir ;;
15086 *) # Relative name.
15087 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15088 ac_top_srcdir=$ac_top_build_prefix$srcdir
15089 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015090esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015092
Martin v. Löwis11437992002-04-12 09:54:03 +000015093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094 case $ac_mode in
15095 :F)
15096 #
15097 # CONFIG_FILE
15098 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015099
15100 case $INSTALL in
15101 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015104_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105
Matthias Kloseb9621712010-04-24 17:59:49 +000015106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107# If the template does not know about datarootdir, expand it.
15108# FIXME: This hack should be removed a few years after 2.60.
15109ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015110ac_sed_dataroot='
15111/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112 p
15113 q
15114}
15115/@datadir@/p
15116/@docdir@/p
15117/@infodir@/p
15118/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015119/@mandir@/p'
15120case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121*datarootdir*) ac_datarootdir_seen=yes;;
15122*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15124$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015126cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127 ac_datarootdir_hack='
15128 s&@datadir@&$datadir&g
15129 s&@docdir@&$docdir&g
15130 s&@infodir@&$infodir&g
15131 s&@localedir@&$localedir&g
15132 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134esac
15135_ACEOF
15136
15137# Neutralize VPATH when `$srcdir' = `.'.
15138# Shell code in configure.ac might set extrasub.
15139# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015140cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15141ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015142$extrasub
15143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015144cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015145:t
15146/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015147s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015149s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150s&@srcdir@&$ac_srcdir&;t t
15151s&@abs_srcdir@&$ac_abs_srcdir&;t t
15152s&@top_srcdir@&$ac_top_srcdir&;t t
15153s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15154s&@builddir@&$ac_builddir&;t t
15155s&@abs_builddir@&$ac_abs_builddir&;t t
15156s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15157s&@INSTALL@&$ac_INSTALL&;t t
15158$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015159"
Charles-François Natali6613c182011-11-27 12:41:06 +010015160eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15161 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natali6613c182011-11-27 12:41:06 +010015164 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15165 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015167which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015168$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015169which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015170
Charles-François Natali6613c182011-11-27 12:41:06 +010015171 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 case $ac_file in
Charles-François Natali6613c182011-11-27 12:41:06 +010015173 -) cat "$tmp/out" && rm -f "$tmp/out";;
15174 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015176 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177 ;;
15178 :H)
15179 #
15180 # CONFIG_HEADER
15181 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 {
15184 $as_echo "/* $configure_input */" \
Charles-François Natali6613c182011-11-27 12:41:06 +010015185 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15186 } >"$tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015187 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natali6613c182011-11-27 12:41:06 +010015188 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15190$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015192 rm -f "$ac_file"
Charles-François Natali6613c182011-11-27 12:41:06 +010015193 mv "$tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015194 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 fi
15196 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015197 $as_echo "/* $configure_input */" \
Charles-François Natali6613c182011-11-27 12:41:06 +010015198 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015199 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015201 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203
15204 esac
15205
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015206
15207 case $ac_file$ac_mode in
15208 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15209
15210 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211done # for ac_tag
15212
Guido van Rossum627b2d71993-12-24 10:39:16 +000015213
Matthias Kloseb9621712010-04-24 17:59:49 +000015214as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015215_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015216ac_clean_files=$ac_clean_files_save
15217
Matthias Kloseb9621712010-04-24 17:59:49 +000015218test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015219 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015220
Martin v. Löwis11437992002-04-12 09:54:03 +000015221
15222# configure is writing to config.log, and then calls config.status.
15223# config.status does its own redirection, appending to config.log.
15224# Unfortunately, on DOS this fails, as config.log is still kept open
15225# by configure, so config.status won't be able to write to it; its
15226# output is simply discarded. So we exec the FD to /dev/null,
15227# effectively closing config.log, so it can be properly (re)opened and
15228# appended to by config.status. When coming back to configure, we
15229# need to make the FD available again.
15230if test "$no_create" != yes; then
15231 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015232 ac_config_status_args=
15233 test "$silent" = yes &&
15234 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015236 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 exec 5>>config.log
15238 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15239 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015240 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015241fi
15242if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15243 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15244$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015245fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015246
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015247
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015248echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015249if test ! -f Modules/Setup
15250then
15251 cp $srcdir/Modules/Setup.dist Modules/Setup
15252fi
15253
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015254echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015255if test ! -f Modules/Setup.local
15256then
15257 echo "# Edit this file for local setup changes" >Modules/Setup.local
15258fi
15259
15260echo "creating Makefile"
15261$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15262 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015263 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015264mv config.c Modules