blob: eb0ea7116e328d29bc4221a1f68d001d1790ddc1 [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
Stefan Krahaf04ff22011-12-08 22:20:31 +01005501 case $CC in
5502 *clang*) WRAP="-fwrapv"
5503 ;;
5504 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005505
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506 case $ac_cv_prog_cc_g in
5507 yes)
5508 if test "$Py_DEBUG" = 'true' ; then
5509 # Optimization messes up debuggers, so turn it off for
5510 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005511 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512 else
5513 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5514 fi
5515 ;;
5516 *)
5517 OPT="-O3 -Wall $STRICT_PROTO"
5518 ;;
5519 esac
5520 case $ac_sys_system in
5521 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5522 ;;
5523 esac
5524 ;;
5525
5526 *)
5527 OPT="-O"
5528 ;;
5529 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005530fi
5531
5532
5533
5534# The -arch flags for universal builds on OSX
5535UNIVERSAL_ARCH_FLAGS=
5536
5537
5538# tweak BASECFLAGS based on compiler and platform
5539case $GCC in
5540yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005541 # Python doesn't violate C99 aliasing rules, but older versions of
5542 # GCC produce warnings for legal Python code. Enable
5543 # -fno-strict-aliasing on versions of GCC that support but produce
5544 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5546$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547 ac_save_cc="$CC"
5548 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005549 save_CFLAGS="$CFLAGS"
Charles-François Natali6613c182011-11-27 12:41:06 +01005550 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005551 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005552else
Matthias Kloseb9621712010-04-24 17:59:49 +00005553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005555
Matthias Kloseb159a552010-04-25 21:00:44 +00005556
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005557int
5558main ()
5559{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005560
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005561 ;
5562 return 0;
5563}
Matthias Kloseb159a552010-04-25 21:00:44 +00005564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005566if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005567
5568 CC="$ac_save_cc -fstrict-aliasing"
5569 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005571/* end confdefs.h. */
5572
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005573 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005574int
5575main ()
5576{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005577double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005578 ;
5579 return 0;
5580}
Matthias Kloseb159a552010-04-25 21:00:44 +00005581
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005583if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005584
5585 ac_cv_no_strict_aliasing=no
5586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587else
Matthias Kloseb159a552010-04-25 21:00:44 +00005588
5589 ac_cv_no_strict_aliasing=yes
5590
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005591fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005593
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005594else
Matthias Kloseb159a552010-04-25 21:00:44 +00005595
5596 ac_cv_no_strict_aliasing=no
5597
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005600fi
5601
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005602 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5605$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005606 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 then
5608 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5609 fi
5610
5611 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5612 # support. Without this, treatment of subnormals doesn't follow
5613 # the standard.
5614 case $ac_sys_machine in
5615 alpha*)
5616 BASECFLAGS="$BASECFLAGS -mieee"
5617 ;;
5618 esac
5619
5620 case $ac_sys_system in
5621 SCO_SV*)
5622 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5623 ;;
5624 # is there any other compiler on Darwin besides gcc?
5625 Darwin*)
5626 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5627 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005628 if test "${CC}" = gcc
5629 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5631$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005632 case "${UNIVERSALSDK}" in
5633 */MacOSX10.4u.sdk)
5634 # Build using 10.4 SDK, force usage of gcc when the
5635 # compiler is gcc, otherwise the user will get very
5636 # confusing error messages when building on OSX 10.6
5637 CC=gcc-4.0
5638 CPP=cpp-4.0
5639 ;;
5640 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5642$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005643 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644
5645
5646 if test "${enable_universalsdk}"; then
5647 UNIVERSAL_ARCH_FLAGS=""
5648 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5649 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5650 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005651 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5653 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005654 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005655 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656
5657 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5658 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005659 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005660 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005662 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5663 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005664 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005665 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005666
5667 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5668 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005669 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005670 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005671
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005673 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 +00005674
5675 fi
5676
5677
Ronald Oussoren666028b2010-04-18 19:07:43 +00005678 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5679 if test "${UNIVERSALSDK}" != "/"
5680 then
5681 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5682 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005683 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 fi
5685 fi
5686
5687 # Calculate the right deployment target for this build.
5688 #
5689 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5690 if test ${cur_target} '>' 10.2; then
5691 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005692 if test ${enable_universalsdk}; then
5693 if test "${UNIVERSAL_ARCHS}" = "all"; then
5694 # Ensure that the default platform for a
5695 # 4-way universal build is OSX 10.5,
5696 # that's the first OS release where
5697 # 4-way builds make sense.
5698 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005699
5700 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5701 cur_target='10.5'
5702
5703 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5704 cur_target='10.5'
5705
5706 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5707 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005708 fi
5709 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005710 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005711 # On Intel macs default to a deployment
5712 # target of 10.4, that's the first OSX
5713 # release with Intel support.
5714 cur_target="10.4"
5715 fi
5716 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 fi
5718 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5719
5720 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5721 # environment with a value that is the same as what we'll use
5722 # in the Makefile to ensure that we'll get the same compiler
5723 # environment during configure and build time.
5724 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5725 export MACOSX_DEPLOYMENT_TARGET
5726 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5727
5728 ;;
5729 OSF*)
5730 BASECFLAGS="$BASECFLAGS -mieee"
5731 ;;
5732 esac
5733 ;;
5734
5735*)
5736 case $ac_sys_system in
5737 OpenUNIX*|UnixWare*)
5738 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5739 ;;
5740 OSF*)
5741 BASECFLAGS="$BASECFLAGS -ieee -std"
5742 ;;
5743 SCO_SV*)
5744 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5745 ;;
5746 esac
5747 ;;
5748esac
5749
5750if test "$Py_DEBUG" = 'true'; then
5751 :
5752else
5753 OPT="-DNDEBUG $OPT"
5754fi
5755
5756if test "$ac_arch_flags"
5757then
5758 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5759fi
5760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761# Check whether GCC supports PyArg_ParseTuple format
5762if test "$GCC" = "yes"
5763then
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5765$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 save_CFLAGS=$CFLAGS
5767 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769/* end confdefs.h. */
5770
5771 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772int
5773main ()
5774{
5775
5776 ;
5777 return 0;
5778}
Matthias Kloseb159a552010-04-25 21:00:44 +00005779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005781if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
Matthias Kloseb159a552010-04-25 21:00:44 +00005783
Matthias Kloseb9621712010-04-24 17:59:49 +00005784$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785
Matthias Kloseb159a552010-04-25 21:00:44 +00005786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005787$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789else
Matthias Kloseb159a552010-04-25 21:00:44 +00005790
5791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005792$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793
5794fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5796 CFLAGS=$save_CFLAGS
5797fi
5798
5799# On some compilers, pthreads are available without further options
5800# (e.g. MacOS X). On some of these systems, the compiler will not
5801# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5802# So we have to see first whether pthreads are available without
5803# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5805$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005806if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005807 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808else
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810 ac_cv_pthread_is_default=no
5811else
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813/* end confdefs.h. */
5814
5815#include <pthread.h>
5816
5817void* routine(void* p){return NULL;}
5818
5819int main(){
5820 pthread_t p;
5821 if(pthread_create(&p,NULL,routine,NULL)!=0)
5822 return 1;
5823 (void)pthread_detach(p);
5824 return 0;
5825}
5826
5827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005828if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
5830 ac_cv_pthread_is_default=yes
5831 ac_cv_kthread=no
5832 ac_cv_pthread=no
5833
5834else
Matthias Kloseb9621712010-04-24 17:59:49 +00005835 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839fi
5840
5841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842fi
5843
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5845$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
5847
5848if test $ac_cv_pthread_is_default = yes
5849then
5850 ac_cv_kpthread=no
5851else
5852# -Kpthread, if available, provides the right #defines
5853# and linker options to make pthread_create available
5854# Some compilers won't report that they do not support -Kpthread,
5855# so we need to run a program to see whether it really made the
5856# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5858$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005859if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005860 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861else
5862 ac_save_cc="$CC"
5863CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 ac_cv_kpthread=no
5866else
Matthias Kloseb9621712010-04-24 17:59:49 +00005867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868/* end confdefs.h. */
5869
5870#include <pthread.h>
5871
5872void* routine(void* p){return NULL;}
5873
5874int main(){
5875 pthread_t p;
5876 if(pthread_create(&p,NULL,routine,NULL)!=0)
5877 return 1;
5878 (void)pthread_detach(p);
5879 return 0;
5880}
5881
5882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005883if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ac_cv_kpthread=yes
5885else
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890fi
5891
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892CC="$ac_save_cc"
5893fi
5894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5896$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897fi
5898
5899if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5900then
5901# -Kthread, if available, provides the right #defines
5902# and linker options to make pthread_create available
5903# Some compilers won't report that they do not support -Kthread,
5904# so we need to run a program to see whether it really made the
5905# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5907$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005908if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005909 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910else
5911 ac_save_cc="$CC"
5912CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005913if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ac_cv_kthread=no
5915else
Matthias Kloseb9621712010-04-24 17:59:49 +00005916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917/* end confdefs.h. */
5918
5919#include <pthread.h>
5920
5921void* routine(void* p){return NULL;}
5922
5923int main(){
5924 pthread_t p;
5925 if(pthread_create(&p,NULL,routine,NULL)!=0)
5926 return 1;
5927 (void)pthread_detach(p);
5928 return 0;
5929}
5930
5931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005932if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ac_cv_kthread=yes
5934else
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939fi
5940
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941CC="$ac_save_cc"
5942fi
5943
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5945$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946fi
5947
5948if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5949then
5950# -pthread, if available, provides the right #defines
5951# and linker options to make pthread_create available
5952# Some compilers won't report that they do not support -pthread,
5953# so we need to run a program to see whether it really made the
5954# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5956$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01005957if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959else
5960 ac_save_cc="$CC"
5961CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005962if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ac_cv_pthread=no
5964else
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966/* end confdefs.h. */
5967
5968#include <pthread.h>
5969
5970void* routine(void* p){return NULL;}
5971
5972int main(){
5973 pthread_t p;
5974 if(pthread_create(&p,NULL,routine,NULL)!=0)
5975 return 1;
5976 (void)pthread_detach(p);
5977 return 0;
5978}
5979
5980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005981if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 ac_cv_pthread=yes
5983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988fi
5989
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990CC="$ac_save_cc"
5991fi
5992
Matthias Kloseb9621712010-04-24 17:59:49 +00005993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5994$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995fi
5996
5997# If we have set a CC compiler flag for thread support then
5998# check if it works for CXX, too.
5999ac_cv_cxx_thread=no
6000if test ! -z "$CXX"
6001then
Matthias Kloseb9621712010-04-24 17:59:49 +00006002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6003$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004ac_save_cxx="$CXX"
6005
6006if test "$ac_cv_kpthread" = "yes"
6007then
6008 CXX="$CXX -Kpthread"
6009 ac_cv_cxx_thread=yes
6010elif test "$ac_cv_kthread" = "yes"
6011then
6012 CXX="$CXX -Kthread"
6013 ac_cv_cxx_thread=yes
6014elif test "$ac_cv_pthread" = "yes"
6015then
6016 CXX="$CXX -pthread"
6017 ac_cv_cxx_thread=yes
6018fi
6019
6020if test $ac_cv_cxx_thread = yes
6021then
6022 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6023 $CXX -c conftest.$ac_ext 2>&5
6024 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6025 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6026 then
6027 ac_cv_cxx_thread=yes
6028 else
6029 ac_cv_cxx_thread=no
6030 fi
6031 rm -fr conftest*
6032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6034$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035fi
6036CXX="$ac_save_cxx"
6037
6038
6039# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6041$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006042if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044else
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046/* end confdefs.h. */
6047#include <stdlib.h>
6048#include <stdarg.h>
6049#include <string.h>
6050#include <float.h>
6051
6052int
6053main ()
6054{
6055
6056 ;
6057 return 0;
6058}
6059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006060if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061 ac_cv_header_stdc=yes
6062else
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006064fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6066
6067if test $ac_cv_header_stdc = yes; then
6068 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070/* end confdefs.h. */
6071#include <string.h>
6072
6073_ACEOF
6074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 $EGREP "memchr" >/dev/null 2>&1; then :
6076
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077else
6078 ac_cv_header_stdc=no
6079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006080rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081
6082fi
6083
6084if test $ac_cv_header_stdc = yes; then
6085 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087/* end confdefs.h. */
6088#include <stdlib.h>
6089
6090_ACEOF
6091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 $EGREP "free" >/dev/null 2>&1; then :
6093
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094else
6095 ac_cv_header_stdc=no
6096fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006097rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098
6099fi
6100
6101if test $ac_cv_header_stdc = yes; then
6102 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006103 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104 :
6105else
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107/* end confdefs.h. */
6108#include <ctype.h>
6109#include <stdlib.h>
6110#if ((' ' & 0x0FF) == 0x020)
6111# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6112# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6113#else
6114# define ISLOWER(c) \
6115 (('a' <= (c) && (c) <= 'i') \
6116 || ('j' <= (c) && (c) <= 'r') \
6117 || ('s' <= (c) && (c) <= 'z'))
6118# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6119#endif
6120
6121#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6122int
6123main ()
6124{
6125 int i;
6126 for (i = 0; i < 256; i++)
6127 if (XOR (islower (i), ISLOWER (i))
6128 || toupper (i) != TOUPPER (i))
6129 return 2;
6130 return 0;
6131}
6132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006133if ac_fn_c_try_run "$LINENO"; then :
6134
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135else
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006140fi
6141
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142fi
6143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6145$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146if test $ac_cv_header_stdc = yes; then
6147
Matthias Kloseb9621712010-04-24 17:59:49 +00006148$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149
6150fi
6151
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006152for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6153fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006154ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006155shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006156unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006157sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6158sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006159sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006160sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006161sys/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 +00006162sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006163bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006164do :
6165 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6166ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006167if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006168 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006169#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006170_ACEOF
6171
6172fi
6173
Guido van Rossum627b2d71993-12-24 10:39:16 +00006174done
6175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006177for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6180$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006181if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006183else
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006185/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006186#include <sys/types.h>
6187#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006188
Martin v. Löwis11437992002-04-12 09:54:03 +00006189int
6190main ()
6191{
6192if ((DIR *) 0)
6193return 0;
6194 ;
6195 return 0;
6196}
6197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006199 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006200else
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006205eval ac_res=\$$as_ac_Header
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6207$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006208if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006209 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006210#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006211_ACEOF
6212
6213ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006215
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006216done
6217# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6218if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6220$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006221if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006222 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006223else
Martin v. Löwis11437992002-04-12 09:54:03 +00006224 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228/* Override any GCC internal prototype to avoid an error.
6229 Use char because int might match the return type of a GCC
6230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006231#ifdef __cplusplus
6232extern "C"
6233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006234char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006235int
6236main ()
6237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006239 ;
6240 return 0;
6241}
6242_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006243for ac_lib in '' dir; do
6244 if test -z "$ac_lib"; then
6245 ac_res="none required"
6246 else
6247 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006248 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006250 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006253rm -f core conftest.err conftest.$ac_objext \
6254 conftest$ac_exeext
Charles-François Natali6613c182011-11-27 12:41:06 +01006255 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006256 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006258done
Charles-François Natali6613c182011-11-27 12:41:06 +01006259if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261else
6262 ac_cv_search_opendir=no
6263fi
6264rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006265LIBS=$ac_func_search_save_LIBS
6266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6268$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006269ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006270if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006271 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006272
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006273fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006274
Michael W. Hudson54241132001-12-07 15:38:26 +00006275else
Matthias Kloseb9621712010-04-24 17:59:49 +00006276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6277$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006278if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006280else
6281 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006284
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006285/* Override any GCC internal prototype to avoid an error.
6286 Use char because int might match the return type of a GCC
6287 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006288#ifdef __cplusplus
6289extern "C"
6290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006291char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006292int
6293main ()
6294{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006295return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006296 ;
6297 return 0;
6298}
6299_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006300for ac_lib in '' x; do
6301 if test -z "$ac_lib"; then
6302 ac_res="none required"
6303 else
6304 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006305 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006306 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006307 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006308 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006310rm -f core conftest.err conftest.$ac_objext \
6311 conftest$ac_exeext
Charles-François Natali6613c182011-11-27 12:41:06 +01006312 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006313 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006315done
Charles-François Natali6613c182011-11-27 12:41:06 +01006316if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006318else
6319 ac_cv_search_opendir=no
6320fi
6321rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006322LIBS=$ac_func_search_save_LIBS
6323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6325$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006326ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006327if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006328 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006329
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006330fi
6331
6332fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006333
Matthias Kloseb9621712010-04-24 17:59:49 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6335$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006336if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006337 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006338else
Matthias Kloseb9621712010-04-24 17:59:49 +00006339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006340/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006342int
6343main ()
6344{
6345return makedev(0, 0);
6346 ;
6347 return 0;
6348}
6349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006350if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006351 ac_cv_header_sys_types_h_makedev=yes
6352else
Matthias Kloseb9621712010-04-24 17:59:49 +00006353 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006355rm -f core conftest.err conftest.$ac_objext \
6356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357
6358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6360$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006361
6362if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006363ac_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 +01006364if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006365
Matthias Kloseb9621712010-04-24 17:59:49 +00006366$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006367
6368fi
6369
6370
6371
6372 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006373 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 +01006374if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006375
Matthias Kloseb9621712010-04-24 17:59:49 +00006376$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006377
6378fi
6379
6380
6381 fi
6382fi
6383
Michael W. Hudson54241132001-12-07 15:38:26 +00006384
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006385# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006386for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006387do :
6388 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006389#ifdef HAVE_CURSES_H
6390#include <curses.h>
6391#endif
6392
Matthias Kloseb9621712010-04-24 17:59:49 +00006393"
Charles-François Natali6613c182011-11-27 12:41:06 +01006394if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006395 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006396#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006397_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006398
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006399fi
6400
6401done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006402
6403
Martin v. Löwis11017b12006-01-14 18:12:57 +00006404# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006405for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006406do :
6407 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 +00006408#ifdef HAVE_ASM_TYPES_H
6409#include <asm/types.h>
6410#endif
6411#ifdef HAVE_SYS_SOCKET_H
6412#include <sys/socket.h>
6413#endif
6414
Matthias Kloseb9621712010-04-24 17:59:49 +00006415"
Charles-François Natali6613c182011-11-27 12:41:06 +01006416if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006417 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006418#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006419_ACEOF
6420
6421fi
6422
6423done
6424
6425
Guido van Rossum627b2d71993-12-24 10:39:16 +00006426# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006427was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6429$as_echo_n "checking for clock_t in time.h... " >&6; }
6430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006431/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006432#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006433
6434_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006436 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006437 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006438else
Martin v. Löwis11437992002-04-12 09:54:03 +00006439
6440
Matthias Kloseb9621712010-04-24 17:59:49 +00006441$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006442
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006443
Guido van Rossum627b2d71993-12-24 10:39:16 +00006444fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006445rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006446
Matthias Kloseb9621712010-04-24 17:59:49 +00006447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6448$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006449
Neal Norwitz11690112002-07-30 01:08:28 +00006450# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6452$as_echo_n "checking for makedev... " >&6; }
6453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006454/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006455
Jesus Cea740f53a2010-04-28 11:35:30 +00006456#if defined(MAJOR_IN_MKDEV)
6457#include <sys/mkdev.h>
6458#elif defined(MAJOR_IN_SYSMACROS)
6459#include <sys/sysmacros.h>
6460#else
6461#include <sys/types.h>
6462#endif
6463
Neal Norwitz11690112002-07-30 01:08:28 +00006464int
6465main ()
6466{
Jesus Cea740f53a2010-04-28 11:35:30 +00006467
6468 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006469 ;
6470 return 0;
6471}
Matthias Kloseb159a552010-04-25 21:00:44 +00006472
Neal Norwitz11690112002-07-30 01:08:28 +00006473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006474if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006475 ac_cv_has_makedev=yes
6476else
Matthias Kloseb9621712010-04-24 17:59:49 +00006477 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006479rm -f core conftest.err conftest.$ac_objext \
6480 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006481if test "$ac_cv_has_makedev" = "no"; then
6482 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006484/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006485
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006486#define _OSF_SOURCE 1
6487#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006488
Neal Norwitz11690112002-07-30 01:08:28 +00006489int
6490main ()
6491{
6492 makedev(0, 0)
6493 ;
6494 return 0;
6495}
6496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006497if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006498 ac_cv_has_makedev=yes
6499else
Matthias Kloseb9621712010-04-24 17:59:49 +00006500 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006502rm -f core conftest.err conftest.$ac_objext \
6503 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006504 if test "$ac_cv_has_makedev" = "yes"; then
6505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006507
6508 fi
6509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6511$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006512if test "$ac_cv_has_makedev" = "yes"; then
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006515
6516fi
6517
Martin v. Löwis399a6892002-10-04 10:22:02 +00006518# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6519# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6520# defined, but the compiler does not support pragma redefine_extname,
6521# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6522# structures (such as rlimit64) without declaring them. As a
6523# work-around, disable LFS on such configurations
6524
6525use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6527$as_echo_n "checking Solaris LFS bug... " >&6; }
6528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006529/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006530
6531#define _LARGEFILE_SOURCE 1
6532#define _FILE_OFFSET_BITS 64
6533#include <sys/resource.h>
6534
Martin v. Löwis399a6892002-10-04 10:22:02 +00006535int
6536main ()
6537{
6538struct rlimit foo;
6539 ;
6540 return 0;
6541}
6542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006544 sol_lfs_bug=no
6545else
Matthias Kloseb9621712010-04-24 17:59:49 +00006546 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6550$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006551if test "$sol_lfs_bug" = "yes"; then
6552 use_lfs=no
6553fi
6554
6555if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006556# Two defines needed to enable largefile support on various platforms
6557# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006558case $ac_sys_system/$ac_sys_release in
6559AIX*)
6560
6561$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6562
6563 ;;
6564esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006565
Matthias Kloseb9621712010-04-24 17:59:49 +00006566$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006567
6568
Matthias Kloseb9621712010-04-24 17:59:49 +00006569$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006570
Martin v. Löwis399a6892002-10-04 10:22:02 +00006571fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006572
Guido van Rossum84e7b241996-08-19 21:59:00 +00006573# Add some code to confdefs.h so that the test for off_t works on SCO
6574cat >> confdefs.h <<\EOF
6575#if defined(SCO_DS)
6576#undef _OFF_T
6577#endif
6578EOF
6579
Guido van Rossumef2255b2000-03-10 22:30:29 +00006580# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006581ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006582if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006584else
Martin v. Löwis11437992002-04-12 09:54:03 +00006585
6586cat >>confdefs.h <<_ACEOF
6587#define mode_t int
6588_ACEOF
6589
6590fi
6591
Matthias Kloseb9621712010-04-24 17:59:49 +00006592ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006593if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006594
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006595else
Martin v. Löwis11437992002-04-12 09:54:03 +00006596
6597cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006598#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006599_ACEOF
6600
6601fi
6602
Matthias Kloseb9621712010-04-24 17:59:49 +00006603ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006604if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006605
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006606else
Martin v. Löwis11437992002-04-12 09:54:03 +00006607
6608cat >>confdefs.h <<_ACEOF
6609#define pid_t int
6610_ACEOF
6611
6612fi
6613
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006614
Martin v. Löwis11437992002-04-12 09:54:03 +00006615cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006616#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006617_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006618
Matthias Kloseb9621712010-04-24 17:59:49 +00006619ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006620if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006621
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006622else
Martin v. Löwis11437992002-04-12 09:54:03 +00006623
6624cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006626_ACEOF
6627
6628fi
6629
Matthias Kloseb9621712010-04-24 17:59:49 +00006630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6631$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006632if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006634else
Matthias Kloseb9621712010-04-24 17:59:49 +00006635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006636/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006637#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006638
6639_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006642 ac_cv_type_uid_t=yes
6643else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006644 ac_cv_type_uid_t=no
6645fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006646rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6650$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006651if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006652
Matthias Kloseb9621712010-04-24 17:59:49 +00006653$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006654
6655
Matthias Kloseb9621712010-04-24 17:59:49 +00006656$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006657
6658fi
6659
Matthias Kloseb9621712010-04-24 17:59:49 +00006660ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6661case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006662 no|yes) ;; #(
6663 *)
6664
Matthias Kloseb9621712010-04-24 17:59:49 +00006665$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006666
6667
6668cat >>confdefs.h <<_ACEOF
6669#define uint32_t $ac_cv_c_uint32_t
6670_ACEOF
6671;;
6672 esac
6673
Matthias Kloseb9621712010-04-24 17:59:49 +00006674ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6675case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006676 no|yes) ;; #(
6677 *)
6678
Matthias Kloseb9621712010-04-24 17:59:49 +00006679$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006680
6681
6682cat >>confdefs.h <<_ACEOF
6683#define uint64_t $ac_cv_c_uint64_t
6684_ACEOF
6685;;
6686 esac
6687
Matthias Kloseb9621712010-04-24 17:59:49 +00006688ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6689case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006690 no|yes) ;; #(
6691 *)
6692
6693cat >>confdefs.h <<_ACEOF
6694#define int32_t $ac_cv_c_int32_t
6695_ACEOF
6696;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006697esac
6698
Matthias Kloseb9621712010-04-24 17:59:49 +00006699ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6700case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006701 no|yes) ;; #(
6702 *)
6703
6704cat >>confdefs.h <<_ACEOF
6705#define int64_t $ac_cv_c_int64_t
6706_ACEOF
6707;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006708esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006709
Matthias Kloseb9621712010-04-24 17:59:49 +00006710ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natali6613c182011-11-27 12:41:06 +01006711if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712
Matthias Kloseb9621712010-04-24 17:59:49 +00006713$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006714
6715fi
6716
Jack Jansendd19cf82001-12-06 22:36:17 +00006717
Michael W. Hudson54241132001-12-07 15:38:26 +00006718# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006719# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006720# The cast to long int works around a bug in the HP C Compiler
6721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6723# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6725$as_echo_n "checking size of int... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006726if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 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 +00006730
Martin v. Löwis11437992002-04-12 09:54:03 +00006731else
Matthias Kloseb9621712010-04-24 17:59:49 +00006732 if test "$ac_cv_type_int" = yes; then
6733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006735as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natali6613c182011-11-27 12:41:06 +01006736See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006737 else
6738 ac_cv_sizeof_int=0
6739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006741
Martin v. Löwis11437992002-04-12 09:54:03 +00006742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6744$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745
6746
6747
Martin v. Löwis11437992002-04-12 09:54:03 +00006748cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006749#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006750_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006751
6752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006753# The cast to long int works around a bug in the HP C Compiler
6754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6758$as_echo_n "checking size of long... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006759if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Kloseb9621712010-04-24 17:59:49 +00006762 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 +00006763
Martin v. Löwis11437992002-04-12 09:54:03 +00006764else
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 if test "$ac_cv_type_long" = yes; then
6766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006768as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natali6613c182011-11-27 12:41:06 +01006769See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006770 else
6771 ac_cv_sizeof_long=0
6772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6777$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006778
6779
6780
Martin v. Löwis11437992002-04-12 09:54:03 +00006781cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006782#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006784
6785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786# The cast to long int works around a bug in the HP C Compiler
6787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6789# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6791$as_echo_n "checking size of void *... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006792if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 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 +00006796
Martin v. Löwis11437992002-04-12 09:54:03 +00006797else
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 if test "$ac_cv_type_void_p" = yes; then
6799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006801as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natali6613c182011-11-27 12:41:06 +01006802See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006803 else
6804 ac_cv_sizeof_void_p=0
6805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006807
Martin v. Löwis11437992002-04-12 09:54:03 +00006808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6810$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811
6812
6813
Martin v. Löwis11437992002-04-12 09:54:03 +00006814cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006815#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006816_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006817
6818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006819# The cast to long int works around a bug in the HP C Compiler
6820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6824$as_echo_n "checking size of short... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006825if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 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 +00006829
Martin v. Löwis11437992002-04-12 09:54:03 +00006830else
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 if test "$ac_cv_type_short" = yes; then
6832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006834as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natali6613c182011-11-27 12:41:06 +01006835See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836 else
6837 ac_cv_sizeof_short=0
6838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006840
Martin v. Löwis11437992002-04-12 09:54:03 +00006841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6843$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006844
6845
6846
Martin v. Löwis11437992002-04-12 09:54:03 +00006847cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006848#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006849_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006850
6851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006852# The cast to long int works around a bug in the HP C Compiler
6853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6855# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6857$as_echo_n "checking size of float... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006858if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006860else
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 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 +00006862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863else
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 if test "$ac_cv_type_float" = yes; then
6865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006867as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natali6613c182011-11-27 12:41:06 +01006868See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006869 else
6870 ac_cv_sizeof_float=0
6871 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6876$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006877
6878
6879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006881#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006882_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006883
6884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885# The cast to long int works around a bug in the HP C Compiler
6886# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6887# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6888# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6890$as_echo_n "checking size of double... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006891if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006893else
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 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 +00006895
Martin v. Löwis11437992002-04-12 09:54:03 +00006896else
Matthias Kloseb9621712010-04-24 17:59:49 +00006897 if test "$ac_cv_type_double" = yes; then
6898 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006900as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natali6613c182011-11-27 12:41:06 +01006901See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902 else
6903 ac_cv_sizeof_double=0
6904 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6909$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910
6911
6912
Martin v. Löwis11437992002-04-12 09:54:03 +00006913cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006914#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006915_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006916
6917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006918# The cast to long int works around a bug in the HP C Compiler
6919# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6920# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6921# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6923$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006924if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006925 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006926else
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 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 +00006928
Martin v. Löwis11437992002-04-12 09:54:03 +00006929else
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 if test "$ac_cv_type_fpos_t" = yes; then
6931 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006933as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01006934See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006935 else
6936 ac_cv_sizeof_fpos_t=0
6937 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6942$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943
6944
6945
Martin v. Löwis11437992002-04-12 09:54:03 +00006946cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006947#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006948_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006949
Michael W. Hudson54241132001-12-07 15:38:26 +00006950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006951# The cast to long int works around a bug in the HP C Compiler
6952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6954# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6956$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006957if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006959else
Matthias Kloseb9621712010-04-24 17:59:49 +00006960 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 +00006961
Martin v. Löwis18e16552006-02-15 17:27:45 +00006962else
Matthias Kloseb9621712010-04-24 17:59:49 +00006963 if test "$ac_cv_type_size_t" = yes; then
6964 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006966as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01006967See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006968 else
6969 ac_cv_sizeof_size_t=0
6970 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006972
Martin v. Löwis18e16552006-02-15 17:27:45 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6975$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976
6977
6978
Martin v. Löwis18e16552006-02-15 17:27:45 +00006979cat >>confdefs.h <<_ACEOF
6980#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6981_ACEOF
6982
6983
Christian Heimes400adb02008-02-01 08:12:03 +00006984# The cast to long int works around a bug in the HP C Compiler
6985# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6986# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6987# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6989$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01006990if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006992else
Matthias Kloseb9621712010-04-24 17:59:49 +00006993 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 +00006994
Christian Heimes400adb02008-02-01 08:12:03 +00006995else
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 if test "$ac_cv_type_pid_t" = yes; then
6997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006999as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01007000See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00007001 else
7002 ac_cv_sizeof_pid_t=0
7003 fi
7004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007005
Christian Heimes400adb02008-02-01 08:12:03 +00007006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7008$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007009
7010
7011
7012cat >>confdefs.h <<_ACEOF
7013#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7014_ACEOF
7015
7016
Michael W. Hudson54241132001-12-07 15:38:26 +00007017
Matthias Kloseb9621712010-04-24 17:59:49 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7019$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007020have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007022/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007023
Martin v. Löwis11437992002-04-12 09:54:03 +00007024int
7025main ()
7026{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007027long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007028 ;
7029 return 0;
7030}
7031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
7034
Matthias Kloseb9621712010-04-24 17:59:49 +00007035$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007036
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007037 have_long_long=yes
7038
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7042$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007043if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044# The cast to long int works around a bug in the HP C Compiler
7045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7047# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7049$as_echo_n "checking size of long long... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007050if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007052else
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 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 +00007054
Martin v. Löwis11437992002-04-12 09:54:03 +00007055else
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 if test "$ac_cv_type_long_long" = yes; then
7057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007059as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natali6613c182011-11-27 12:41:06 +01007060See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007061 else
7062 ac_cv_sizeof_long_long=0
7063 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007065
Martin v. Löwis11437992002-04-12 09:54:03 +00007066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7068$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069
7070
7071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007073#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007074_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007075
Michael W. Hudson54241132001-12-07 15:38:26 +00007076
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007077fi
7078
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7080$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007081have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007083/* end confdefs.h. */
7084
7085int
7086main ()
7087{
7088long double x; x = (long double)0;
7089 ;
7090 return 0;
7091}
7092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007093if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007094
7095
Matthias Kloseb9621712010-04-24 17:59:49 +00007096$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007097
7098 have_long_double=yes
7099
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007100fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7103$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007104if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007105# The cast to long int works around a bug in the HP C Compiler
7106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7108# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7110$as_echo_n "checking size of long double... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007111if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007113else
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 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 +00007115
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007116else
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 if test "$ac_cv_type_long_double" = yes; then
7118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007120as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natali6613c182011-11-27 12:41:06 +01007121See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007122 else
7123 ac_cv_sizeof_long_double=0
7124 fi
7125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007126
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7129$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007130
7131
7132
7133cat >>confdefs.h <<_ACEOF
7134#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7135_ACEOF
7136
7137
7138fi
7139
7140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7142$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007143have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007145/* end confdefs.h. */
7146
7147int
7148main ()
7149{
7150_Bool x; x = (_Bool)0;
7151 ;
7152 return 0;
7153}
7154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007155if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007156
7157
Matthias Kloseb9621712010-04-24 17:59:49 +00007158$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007159
7160 have_c99_bool=yes
7161
Thomas Woutersb2137042007-02-01 18:02:27 +00007162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7165$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007166if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007167# The cast to long int works around a bug in the HP C Compiler
7168# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7169# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7170# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7172$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007173if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007175else
Matthias Kloseb9621712010-04-24 17:59:49 +00007176 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 +00007177
Thomas Woutersb2137042007-02-01 18:02:27 +00007178else
Matthias Kloseb9621712010-04-24 17:59:49 +00007179 if test "$ac_cv_type__Bool" = yes; then
7180 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007182as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natali6613c182011-11-27 12:41:06 +01007183See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007184 else
7185 ac_cv_sizeof__Bool=0
7186 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007188
Thomas Woutersb2137042007-02-01 18:02:27 +00007189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7191$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007192
7193
7194
Thomas Woutersb2137042007-02-01 18:02:27 +00007195cat >>confdefs.h <<_ACEOF
7196#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7197_ACEOF
7198
7199
7200fi
7201
Matthias Kloseb9621712010-04-24 17:59:49 +00007202ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007203 #include <stdint.h>
7204 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007205 #ifdef HAVE_INTTYPES_H
7206 #include <inttypes.h>
7207 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007208"
Charles-François Natali6613c182011-11-27 12:41:06 +01007209if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007210
7211cat >>confdefs.h <<_ACEOF
7212#define HAVE_UINTPTR_T 1
7213_ACEOF
7214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007215# The cast to long int works around a bug in the HP C Compiler
7216# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7217# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7218# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7220$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007221if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007222 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007223else
Matthias Kloseb9621712010-04-24 17:59:49 +00007224 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 +00007225
Martin v. Löwis11437992002-04-12 09:54:03 +00007226else
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 if test "$ac_cv_type_uintptr_t" = yes; then
7228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007230as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01007231See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232 else
7233 ac_cv_sizeof_uintptr_t=0
7234 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007236
Martin v. Löwis11437992002-04-12 09:54:03 +00007237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7239$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240
7241
7242
Martin v. Löwis11437992002-04-12 09:54:03 +00007243cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007244#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007245_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007246
Michael W. Hudson54241132001-12-07 15:38:26 +00007247
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007248fi
7249
Thomas Wouters89f507f2006-12-13 04:49:30 +00007250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007251# The cast to long int works around a bug in the HP C Compiler
7252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7254# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7256$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007257if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259else
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007261#ifdef HAVE_SYS_TYPES_H
7262#include <sys/types.h>
7263#endif
7264
Matthias Kloseb9621712010-04-24 17:59:49 +00007265"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267else
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 if test "$ac_cv_type_off_t" = yes; then
7269 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007271as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01007272See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007273 else
7274 ac_cv_sizeof_off_t=0
7275 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007277
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7280$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007282
7283
Martin v. Löwis11437992002-04-12 09:54:03 +00007284cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007285#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007286_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007287
Michael W. Hudson54241132001-12-07 15:38:26 +00007288
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007289
Matthias Kloseb9621712010-04-24 17:59:49 +00007290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7291$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007292if test "$have_long_long" = yes
7293then
7294if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007295 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007296
Matthias Kloseb9621712010-04-24 17:59:49 +00007297$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007298
Matthias Kloseb9621712010-04-24 17:59:49 +00007299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7300$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007301else
Matthias Kloseb9621712010-04-24 17:59:49 +00007302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7303$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007304fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007305else
Matthias Kloseb9621712010-04-24 17:59:49 +00007306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7307$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007308fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007309
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007310# The cast to long int works around a bug in the HP C Compiler
7311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7313# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7315$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007316if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007318else
Matthias Kloseb9621712010-04-24 17:59:49 +00007319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007320#ifdef HAVE_SYS_TYPES_H
7321#include <sys/types.h>
7322#endif
7323#ifdef HAVE_TIME_H
7324#include <time.h>
7325#endif
7326
Matthias Kloseb9621712010-04-24 17:59:49 +00007327"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007328
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007329else
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 if test "$ac_cv_type_time_t" = yes; then
7331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007333as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01007334See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007335 else
7336 ac_cv_sizeof_time_t=0
7337 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007339
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7342$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007343
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007344
7345
Martin v. Löwis11437992002-04-12 09:54:03 +00007346cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007347#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007348_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007349
Michael W. Hudson54241132001-12-07 15:38:26 +00007350
7351
Trent Mick635f6fb2000-08-23 21:33:05 +00007352# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007353ac_save_cc="$CC"
7354if test "$ac_cv_kpthread" = "yes"
7355then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007356elif test "$ac_cv_kthread" = "yes"
7357then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007358elif test "$ac_cv_pthread" = "yes"
7359then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007360fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007361
Matthias Kloseb9621712010-04-24 17:59:49 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7363$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007364have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007366/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007367
7368 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007369int
7370main ()
7371{
Guido van Rossum12580492000-09-24 16:47:19 +00007372pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007373 ;
7374 return 0;
7375}
Matthias Kloseb159a552010-04-25 21:00:44 +00007376
Martin v. Löwis11437992002-04-12 09:54:03 +00007377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007378if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007379 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7383$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007384if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007385 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007386# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7387# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7388# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7390$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007391if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007395#ifdef HAVE_PTHREAD_H
7396#include <pthread.h>
7397#endif
7398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007400
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007401else
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 if test "$ac_cv_type_pthread_t" = yes; then
7403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007405as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natali6613c182011-11-27 12:41:06 +01007406See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007407 else
7408 ac_cv_sizeof_pthread_t=0
7409 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007411
Trent Mick635f6fb2000-08-23 21:33:05 +00007412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7414$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007415
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007416
7417
Martin v. Löwis11437992002-04-12 09:54:03 +00007418cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007419#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007420_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007421
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007422
Trent Mick635f6fb2000-08-23 21:33:05 +00007423fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007424CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007425
Michael W. Hudson54241132001-12-07 15:38:26 +00007426
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007427case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007428 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007429 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7430 ;;
7431 Darwin/*)
7432 OTHER_LIBTOOL_OPT=""
7433 ;;
7434esac
7435
7436
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007437ARCH_RUN_32BIT=""
7438
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007439case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007440 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007441 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7442 if test "${enable_universalsdk}"; then
7443 :
7444 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007445 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007446 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007447 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007448 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007449 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007450 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007451 if test ${gcc_version} '<' 4.0
7452 then
7453 LIBTOOL_CRUFT="-lcc_dynamic"
7454 else
7455 LIBTOOL_CRUFT=""
7456 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007458 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007459else
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007461/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007462
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007463 #include <unistd.h>
7464 int main(int argc, char*argv[])
7465 {
7466 if (sizeof(long) == 4) {
7467 return 0;
7468 } else {
7469 return 1;
7470 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007471 }
7472
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007474if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007475 ac_osx_32bit=yes
7476else
Matthias Kloseb9621712010-04-24 17:59:49 +00007477 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007481fi
7482
7483
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007484 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007485 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007486 i386)
7487 MACOSX_DEFAULT_ARCH="i386"
7488 ;;
7489 ppc)
7490 MACOSX_DEFAULT_ARCH="ppc"
7491 ;;
7492 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007493 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007494 ;;
7495 esac
7496 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007497 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007498 i386)
7499 MACOSX_DEFAULT_ARCH="x86_64"
7500 ;;
7501 ppc)
7502 MACOSX_DEFAULT_ARCH="ppc64"
7503 ;;
7504 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007505 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007506 ;;
7507 esac
7508
7509 #ARCH_RUN_32BIT="true"
7510 fi
7511
7512 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007513 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007514 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007515esac
7516
Matthias Kloseb9621712010-04-24 17:59:49 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7518$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007519if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007520then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007521 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007523 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007526
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7528$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007529 if test $enable_shared = "yes"
7530 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007531 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 +00007532 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007533else
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7535$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007536fi
7537
Matthias Kloseb9621712010-04-24 17:59:49 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7539$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007540case $ac_sys_system/$ac_sys_release in
7541 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007542
Matthias Kloseb9621712010-04-24 17:59:49 +00007543$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007544
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7546$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007547 ;;
7548 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7550$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007551 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007552esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007553
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007555
Michael W. Hudson54241132001-12-07 15:38:26 +00007556
7557
7558
7559
Benjamin Peterson99f03762010-04-11 22:15:28 +00007560
Thomas Wouters477c8d52006-05-27 19:21:47 +00007561
Georg Brandlb1441c72009-01-03 22:33:39 +00007562
Thomas Wouters477c8d52006-05-27 19:21:47 +00007563cat >>confdefs.h <<_ACEOF
7564#define SHLIB_EXT "$SO"
7565_ACEOF
7566
Guido van Rossum0a516c91994-09-12 10:58:40 +00007567# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007568# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007569# (Shared libraries in this instance are shared modules to be loaded into
7570# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7572$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007573if test -z "$LDSHARED"
7574then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007575 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007576 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007577 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007578 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007579 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007580 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007581 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007582 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007583 if test "$GCC" = "yes" ; then
7584 LDSHARED='$(CC) -shared'
7585 LDCXXSHARED='$(CXX) -shared'
7586 else
7587 LDSHARED='$(CC) -G'
7588 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007589 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007590 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 if test "$GCC" = "yes" ; then
7592 LDSHARED='$(CC) -shared'
7593 LDCXXSHARED='$(CXX) -shared'
7594 else
7595 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007596 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007597 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007598 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007599 LDSHARED='$(CC) -bundle'
7600 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007601 if test "$enable_framework" ; then
7602 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007603 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7604 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007605 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007606 else
7607 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007608 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007609 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007610 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007611 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007612 LDSHARED='$(CC) -bundle'
7613 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007614 if test "$enable_framework" ; then
7615 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007616 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7617 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007618 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007619 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007620 # No framework, use the Python app as bundle-loader
7621 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007622 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007623 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007624 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007625 Darwin/*)
7626 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7627 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007628
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007629 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007630 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007631 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007632 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007633 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007634 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7635 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007636 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007637 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007638 LDSHARED='$(CC) -bundle'
7639 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007640 if test "$enable_framework" ; then
7641 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007642 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7643 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007644 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007645 else
7646 # No framework, use the Python app as bundle-loader
7647 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7648 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007649 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007650 fi
7651 fi
7652 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007653 Linux*|GNU*|QNX*)
7654 LDSHARED='$(CC) -shared'
7655 LDCXXSHARED='$(CXX) -shared';;
7656 BSD/OS*/4*)
7657 LDSHARED="gcc -shared"
7658 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007659 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007660 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007661 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007662 LDSHARED='$(CC) -shared'
7663 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007664 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007665 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007666 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007667 OpenBSD*)
7668 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7669 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007670 LDSHARED='$(CC) -shared $(CCSHARED)'
7671 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007672 else
7673 case `uname -r` in
7674 [01].* | 2.[0-7] | 2.[0-7].*)
7675 LDSHARED="ld -Bshareable ${LDFLAGS}"
7676 ;;
7677 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007678 LDSHARED='$(CC) -shared $(CCSHARED)'
7679 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007680 ;;
7681 esac
7682 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007683 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007684 LDSHARED='$(CC) -shared'
7685 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007686 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007687 if test "$GCC" = "yes" ; then
7688 LDSHARED='$(CC) -shared'
7689 LDCXXSHARED='$(CXX) -shared'
7690 else
7691 LDSHARED='$(CC) -G'
7692 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007693 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007694 SCO_SV*)
7695 LDSHARED='$(CC) -Wl,-G,-Bexport'
7696 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7697 CYGWIN*)
7698 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7699 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007700 *) LDSHARED="ld";;
7701 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7704$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007705LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007706BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007707# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007708# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7710$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007711if test -z "$CCSHARED"
7712then
Guido van Rossum07397971997-04-29 21:49:50 +00007713 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007714 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007715 then CCSHARED="-fPIC";
7716 elif test `uname -p` = sparc;
7717 then CCSHARED="-xcode=pic32";
7718 else CCSHARED="-Kpic";
7719 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007720 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007721 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007722 else CCSHARED="+z";
7723 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007724 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007725 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007726 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007727 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007728 if test "$GCC" = "yes"
7729 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007730 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007731 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007732 SCO_SV*)
7733 if test "$GCC" = "yes"
7734 then CCSHARED="-fPIC"
7735 else CCSHARED="-Kpic -belf"
7736 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007737 IRIX*/6*) case $CC in
7738 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007739 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007740 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007741 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7744$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007745# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007746# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7748$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007749if test -z "$LINKFORSHARED"
7750then
Guido van Rossum07397971997-04-29 21:49:50 +00007751 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007752 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007753 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007754 LINKFORSHARED="-Wl,-E -Wl,+s";;
7755# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007756 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007757 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007758 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007760 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007761 if test "$enable_framework"
7762 then
Jack Jansenda49e192005-01-07 13:08:22 +00007763 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007764 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007765 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007766 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007767 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007768 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007769 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007770 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7771 then
7772 LINKFORSHARED="-Wl,--export-dynamic"
7773 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007774 SunOS/5*) case $CC in
7775 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007776 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007777 then
7778 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007779 fi;;
7780 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007781 CYGWIN*)
7782 if test $enable_shared = "no"
7783 then
7784 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7785 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007786 QNX*)
7787 # -Wl,-E causes the symbols to be added to the dynamic
7788 # symbol table so that they can be found when a module
7789 # is loaded. -N 2048K causes the stack size to be set
7790 # to 2048 kilobytes so that the stack doesn't overflow
7791 # when running test_compile.py.
7792 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007793 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7796$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007797
Michael W. Hudson54241132001-12-07 15:38:26 +00007798
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007799
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7801$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007802if test ! "$LIBRARY" = "$LDLIBRARY"
7803then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007804 case $ac_sys_system in
7805 CYGWIN*)
7806 # Cygwin needs CCSHARED when building extension DLLs
7807 # but not when building the interpreter DLL.
7808 CFLAGSFORSHARED='';;
7809 *)
7810 CFLAGSFORSHARED='$(CCSHARED)'
7811 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7814$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007815
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007816# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7817# library (with --enable-shared).
7818# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007819# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7820# if it is not required, since it creates a dependency of the shared library
7821# to LIBS. This, in turn, means that applications linking the shared libpython
7822# don't need to link LIBS explicitly. The default should be only changed
7823# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007824
Matthias Kloseb9621712010-04-24 17:59:49 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7826$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007827case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007828 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007829 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007830esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7832$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007833
7834
Guido van Rossum627b2d71993-12-24 10:39:16 +00007835# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7837$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007838if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007840else
Martin v. Löwis11437992002-04-12 09:54:03 +00007841 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007842LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846/* Override any GCC internal prototype to avoid an error.
7847 Use char because int might match the return type of a GCC
7848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007849#ifdef __cplusplus
7850extern "C"
7851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007852char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007853int
7854main ()
7855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 ;
7858 return 0;
7859}
7860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007863else
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866rm -f core conftest.err conftest.$ac_objext \
7867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007868LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7871$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007872if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 cat >>confdefs.h <<_ACEOF
7874#define HAVE_LIBDL 1
7875_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007877 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007879fi
7880 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7882$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007883if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007885else
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007887LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891/* Override any GCC internal prototype to avoid an error.
7892 Use char because int might match the return type of a GCC
7893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007894#ifdef __cplusplus
7895extern "C"
7896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007897char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 ;
7903 return 0;
7904}
7905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007906if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007908else
Matthias Kloseb9621712010-04-24 17:59:49 +00007909 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911rm -f core conftest.err conftest.$ac_objext \
7912 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007913LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7916$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007917if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 cat >>confdefs.h <<_ACEOF
7919#define HAVE_LIBDLD 1
7920_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007921
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007922 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007923
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007924fi
7925 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007926
Georg Brandlb1441c72009-01-03 22:33:39 +00007927# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007928if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7930$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007931if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007933else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007934 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938/* Override any GCC internal prototype to avoid an error.
7939 Use char because int might match the return type of a GCC
7940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007941#ifdef __cplusplus
7942extern "C"
7943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007944char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007945int
7946main ()
7947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ;
7950 return 0;
7951}
7952_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953for ac_lib in '' pthread rt posix4; do
7954 if test -z "$ac_lib"; then
7955 ac_res="none required"
7956 else
7957 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007958 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963rm -f core conftest.err conftest.$ac_objext \
7964 conftest$ac_exeext
Charles-François Natali6613c182011-11-27 12:41:06 +01007965 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968done
Charles-François Natali6613c182011-11-27 12:41:06 +01007969if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971else
7972 ac_cv_search_sem_init=no
7973fi
7974rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007975LIBS=$ac_func_search_save_LIBS
7976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7978$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007980if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007982
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007983fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007984 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007985 # posix4 on Solaris 2.6
7986 # pthread (first!) on Linux
7987fi
7988
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7991$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01007992if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007993 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007994else
7995 ac_check_lib_save_LIBS=$LIBS
7996LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007998/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000/* Override any GCC internal prototype to avoid an error.
8001 Use char because int might match the return type of a GCC
8002 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008003#ifdef __cplusplus
8004extern "C"
8005#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008006char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008007int
8008main ()
8009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008011 ;
8012 return 0;
8013}
8014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008015if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008016 ac_cv_lib_intl_textdomain=yes
8017else
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008020rm -f core conftest.err conftest.$ac_objext \
8021 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008022LIBS=$ac_check_lib_save_LIBS
8023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8025$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008026if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008027
Matthias Kloseb9621712010-04-24 17:59:49 +00008028$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008029
Brett Cannonc6d936e2009-06-07 20:09:53 +00008030 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008031fi
8032
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008033
8034# checks for system dependent C++ extensions support
8035case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8037$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008039/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008040
Georg Brandl59e87bd2011-02-15 19:48:59 +00008041 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008042int
8043main ()
8044{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008045loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008046 ;
8047 return 0;
8048}
Matthias Kloseb159a552010-04-25 21:00:44 +00008049
Martin v. Löwis11437992002-04-12 09:54:03 +00008050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008051if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008052
Matthias Kloseb159a552010-04-25 21:00:44 +00008053
Matthias Kloseb9621712010-04-24 17:59:49 +00008054$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
Matthias Kloseb159a552010-04-25 21:00:44 +00008056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008057$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008058
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008059else
Matthias Kloseb159a552010-04-25 21:00:44 +00008060
8061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008062$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008063
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065rm -f core conftest.err conftest.$ac_objext \
8066 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008067 *) ;;
8068esac
8069
Guido van Rossum70c7f481998-03-26 18:44:10 +00008070# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8072$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008073if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008075else
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008077LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081/* Override any GCC internal prototype to avoid an error.
8082 Use char because int might match the return type of a GCC
8083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008084#ifdef __cplusplus
8085extern "C"
8086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008087char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008088int
8089main ()
8090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 ;
8093 return 0;
8094}
8095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008098else
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101rm -f core conftest.err conftest.$ac_objext \
8102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008103LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8106$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008107if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008108 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008109fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008110 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8112$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008113if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008115else
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008117LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121/* Override any GCC internal prototype to avoid an error.
8122 Use char because int might match the return type of a GCC
8123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008124#ifdef __cplusplus
8125extern "C"
8126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008127char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008128int
8129main ()
8130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 ;
8133 return 0;
8134}
8135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008136if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008137 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008141rm -f core conftest.err conftest.$ac_objext \
8142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008143LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8146$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008147if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008148 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008149fi
8150 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8153$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008156if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8159$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008160LIBS="$withval $LIBS"
8161
8162else
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8164$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165fi
8166
Guido van Rossum7f43da71994-08-01 12:15:30 +00008167
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008168if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008169 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8170set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008173if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008174 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008175else
8176 case $PKG_CONFIG in
8177 [\\/]* | ?:[\\/]*)
8178 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8179 ;;
8180 *)
8181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182for as_dir in $PATH
8183do
8184 IFS=$as_save_IFS
8185 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008187 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8188 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008190 break 2
8191 fi
8192done
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008194IFS=$as_save_IFS
8195
8196 ;;
8197esac
8198fi
8199PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8200if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8202$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008203else
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008206fi
8207
8208
8209fi
8210if test -z "$ac_cv_path_PKG_CONFIG"; then
8211 ac_pt_PKG_CONFIG=$PKG_CONFIG
8212 # Extract the first word of "pkg-config", so it can be a program name with args.
8213set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8215$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008216if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008218else
8219 case $ac_pt_PKG_CONFIG in
8220 [\\/]* | ?:[\\/]*)
8221 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8222 ;;
8223 *)
8224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8225for as_dir in $PATH
8226do
8227 IFS=$as_save_IFS
8228 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008230 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8231 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008233 break 2
8234 fi
8235done
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008237IFS=$as_save_IFS
8238
8239 ;;
8240esac
8241fi
8242ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8243if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8245$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008246else
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8248$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008249fi
8250
8251 if test "x$ac_pt_PKG_CONFIG" = x; then
8252 PKG_CONFIG=""
8253 else
8254 case $cross_compiling:$ac_tool_warned in
8255yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008258ac_tool_warned=yes ;;
8259esac
8260 PKG_CONFIG=$ac_pt_PKG_CONFIG
8261 fi
8262else
8263 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8264fi
8265
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008266
8267# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8269$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008270
8271# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008272if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008273 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008274else
8275 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008276fi
8277
8278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8280$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008281
8282# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8284$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008285
8286# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008287if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008288 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008289else
8290 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008291fi
8292
8293
8294if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008295 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8296else
8297 LIBFFI_INCLUDEDIR=""
8298fi
8299
8300
Matthias Kloseb9621712010-04-24 17:59:49 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8302$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008303
Benjamin Peterson076ed002010-10-31 17:11:02 +00008304# Check for support for loadable sqlite extensions
8305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8306$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8307# Check whether --enable-loadable-sqlite-extensions was given.
8308if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8309 enableval=$enable_loadable_sqlite_extensions;
8310else
8311 enable_loadable_sqlite_extensions="no"
8312fi
8313
8314
8315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8316$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8317
Matthias Klose55708cc2009-04-30 08:06:49 +00008318# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8320$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008321
8322# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008323if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008324 withval=$with_dbmliborder;
8325if test x$with_dbmliborder = xyes
8326then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008327as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008328else
8329 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8330 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8331 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008332 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008333 fi
8334 done
8335fi
8336fi
8337
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8339$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008340
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008341# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008342
8343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8345$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008348if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008349 withval=$with_signal_module;
8350fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008351
8352
8353if test -z "$with_signal_module"
8354then with_signal_module="yes"
8355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8357$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008358
8359if test "${with_signal_module}" = "yes"; then
8360 USE_SIGNAL_MODULE=""
8361 SIGNAL_OBJS=""
8362else
8363 USE_SIGNAL_MODULE="#"
8364 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8365fi
8366
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008367# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008368
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008369USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8372$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008373
Guido van Rossumec2f0731997-01-22 20:54:01 +00008374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008376if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8379$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008380LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008381if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008382 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008383fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008384else
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387fi
8388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389
8390# Templates for things AC_DEFINEd more than once.
8391# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008392
8393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394
8395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8397$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008400if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 withval=$with_threads;
8402fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008403
8404
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008405# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008408if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409 withval=$with_thread; with_threads=$with_thread
8410fi
8411
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008412
8413if test -z "$with_threads"
8414then with_threads="yes"
8415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8417$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008418
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008419
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008420if test "$with_threads" = "no"
8421then
8422 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008423elif test "$ac_cv_pthread_is_default" = yes
8424then
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008426
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008427 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008429
8430 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008432elif test "$ac_cv_kpthread" = "yes"
8433then
8434 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008435 if test "$ac_cv_cxx_thread" = "yes"; then
8436 CXX="$CXX -Kpthread"
8437 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008439
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008440 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008441 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008442elif test "$ac_cv_kthread" = "yes"
8443then
8444 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008445 if test "$ac_cv_cxx_thread" = "yes"; then
8446 CXX="$CXX -Kthread"
8447 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008448 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008449
8450 posix_threads=yes
8451 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008452elif test "$ac_cv_pthread" = "yes"
8453then
8454 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008455 if test "$ac_cv_cxx_thread" = "yes"; then
8456 CXX="$CXX -pthread"
8457 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008459
8460 posix_threads=yes
8461 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008462else
8463 if test ! -z "$with_threads" -a -d "$with_threads"
8464 then LDFLAGS="$LDFLAGS -L$with_threads"
8465 fi
8466 if test ! -z "$withval" -a -d "$withval"
8467 then LDFLAGS="$LDFLAGS -L$withval"
8468 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008469
8470 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008471 # define _POSIX_THREADS in unistd.h. Some apparently don't
8472 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8474$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008476/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008477
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008478#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008479#ifdef _POSIX_THREADS
8480yes
8481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008482
8483_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008486 unistd_defines_pthreads=yes
8487else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008488 unistd_defines_pthreads=no
8489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008490rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008491
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8493$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008494
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008496
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 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 +01008498if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008502
Martin v. Löwis11437992002-04-12 09:54:03 +00008503
Matthias Kloseb9621712010-04-24 17:59:49 +00008504$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008505
8506 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008507 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008508else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008509
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 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 +01008511if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008513
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516
Matthias Kloseb9621712010-04-24 17:59:49 +00008517$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008518
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008519 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008520else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008521
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008522 # Just looking for pthread_create in libpthread is not enough:
8523 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8524 # So we really have to include pthread.h, and then link.
8525 _libs=$LIBS
8526 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8528$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008530/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008531#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008532
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008533void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008534int
8535main ()
8536{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008537
8538pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 ;
8540 return 0;
8541}
8542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008543if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008544
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8546$as_echo "yes" >&6; }
8547 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008548
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008549 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008550 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008551else
Martin v. Löwis11437992002-04-12 09:54:03 +00008552
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008553 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natali6613c182011-11-27 12:41:06 +01008555if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008557
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008558 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008559 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008560else
Guido van Rossumad678af1998-10-02 14:42:15 +00008561
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8563$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008564if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008566else
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008568LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572/* Override any GCC internal prototype to avoid an error.
8573 Use char because int might match the return type of a GCC
8574 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008575#ifdef __cplusplus
8576extern "C"
8577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008578char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008579int
8580main ()
8581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 ;
8584 return 0;
8585}
8586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008589else
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008592rm -f core conftest.err conftest.$ac_objext \
8593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008594LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8597$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008598if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008600
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008601 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008602 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008603 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008604else
Greg Steinadf63d62000-07-05 10:38:09 +00008605
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8607$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008608if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008610else
Martin v. Löwis11437992002-04-12 09:54:03 +00008611 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008612LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616/* Override any GCC internal prototype to avoid an error.
8617 Use char because int might match the return type of a GCC
8618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008619#ifdef __cplusplus
8620extern "C"
8621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008622char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008623int
8624main ()
8625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 ;
8628 return 0;
8629}
8630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008636rm -f core conftest.err conftest.$ac_objext \
8637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008638LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8641$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008642if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008644
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008645 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008646 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008647 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008648else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008649
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8651$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008652if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008654else
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008656LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660/* Override any GCC internal prototype to avoid an error.
8661 Use char because int might match the return type of a GCC
8662 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008663#ifdef __cplusplus
8664extern "C"
8665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008666char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008667int
8668main ()
8669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ;
8672 return 0;
8673}
8674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008675if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008680rm -f core conftest.err conftest.$ac_objext \
8681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8685$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008686if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008688
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008689 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008690 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008691 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008692else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008693
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8695$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008696if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008698else
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008700LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704/* Override any GCC internal prototype to avoid an error.
8705 Use char because int might match the return type of a GCC
8706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008707#ifdef __cplusplus
8708extern "C"
8709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008710char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008711int
8712main ()
8713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ;
8716 return 0;
8717}
8718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008721else
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008724rm -f core conftest.err conftest.$ac_objext \
8725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008726LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8729$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008730if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008732
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008733 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008734 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008735 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008736else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008737
Martin v. Löwis130fb172001-07-19 11:00:41 +00008738 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008739fi
8740
Guido van Rossum627b2d71993-12-24 10:39:16 +00008741
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008742fi
8743
Guido van Rossum0be3e491997-05-22 20:33:33 +00008744fi
8745
Guido van Rossum49545951997-12-02 19:28:29 +00008746fi
8747
Guido van Rossumb93a8621998-05-07 13:27:32 +00008748fi
8749
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751rm -f core conftest.err conftest.$ac_objext \
8752 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753fi
8754
Martin v. Löwis11437992002-04-12 09:54:03 +00008755
8756fi
8757
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008758
Michael W. Hudson54241132001-12-07 15:38:26 +00008759
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8761$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008762if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008764else
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008766LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770/* Override any GCC internal prototype to avoid an error.
8771 Use char because int might match the return type of a GCC
8772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008773#ifdef __cplusplus
8774extern "C"
8775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008776char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008777int
8778main ()
8779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008780return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008781 ;
8782 return 0;
8783}
8784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790rm -f core conftest.err conftest.$ac_objext \
8791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008792LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8795$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008796if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008798
Martin v. Löwis130fb172001-07-19 11:00:41 +00008799 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008800 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008801 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008802fi
8803
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008804
Neal Norwitza978ab02002-11-02 16:58:05 +00008805 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8807$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008808if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008810else
Martin v. Löwis11437992002-04-12 09:54:03 +00008811 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008812LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816/* Override any GCC internal prototype to avoid an error.
8817 Use char because int might match the return type of a GCC
8818 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008819#ifdef __cplusplus
8820extern "C"
8821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008822char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008823int
8824main ()
8825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 ;
8828 return 0;
8829}
8830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008831if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008832 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008833else
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836rm -f core conftest.err conftest.$ac_objext \
8837 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008838LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8841$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008842if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008844
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008845 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008846 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008847 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008848fi
8849
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008850 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008851
Martin v. Löwis130fb172001-07-19 11:00:41 +00008852 if test "$USE_THREAD_MODULE" != "#"
8853 then
8854 # If the above checks didn't disable threads, (at least) OSF1
8855 # needs this '-threads' argument during linking.
8856 case $ac_sys_system in
8857 OSF1) LDLAST=-threads;;
8858 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008859 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008860fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008861
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008862if test "$posix_threads" = "yes"; then
8863 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008864
Matthias Kloseb9621712010-04-24 17:59:49 +00008865$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008866
8867 fi
8868
8869 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8870 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008871 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008872$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008873
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008874 ;;
8875 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008876$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008877
8878 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008879 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008880$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008881
8882 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008883 esac
8884
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8886$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01008887 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008889else
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008891 ac_cv_pthread_system_supported=no
8892else
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008895#include <pthread.h>
8896 void *foo(void *parm) {
8897 return NULL;
8898 }
8899 main() {
8900 pthread_attr_t attr;
8901 pthread_t id;
8902 if (pthread_attr_init(&attr)) exit(-1);
8903 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8904 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8905 exit(0);
8906 }
8907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008908if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008909 ac_cv_pthread_system_supported=yes
8910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008915fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917
Guido van Rossum627b2d71993-12-24 10:39:16 +00008918fi
8919
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8921$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008922 if test "$ac_cv_pthread_system_supported" = "yes"; then
8923
Matthias Kloseb9621712010-04-24 17:59:49 +00008924$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008925
8926 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 for ac_func in pthread_sigmask
8928do :
8929 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natali6613c182011-11-27 12:41:06 +01008930if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008931 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008932#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008933_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008934 case $ac_sys_system in
8935 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008936
Matthias Kloseb9621712010-04-24 17:59:49 +00008937$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008938
8939 ;;
8940 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008941fi
8942done
8943
8944fi
8945
8946
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008947# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008948
Matthias Kloseb9621712010-04-24 17:59:49 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8950$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008952if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8956$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957 ipv6=no
8958 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8960$as_echo "yes" >&6; }
8961 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962
8963 ipv6=yes
8964 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966else
Martin v. Löwis11437992002-04-12 09:54:03 +00008967
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008969
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8971$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972 ipv6=no
8973
8974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008976/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977 /* AF_INET6 available check */
8978#include <sys/types.h>
8979#include <sys/socket.h>
8980main()
8981{
8982 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8983 exit(1);
8984 else
8985 exit(0);
8986}
8987
Martin v. Löwis11437992002-04-12 09:54:03 +00008988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008989if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008990
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8992$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995else
Matthias Kloseb159a552010-04-25 21:00:44 +00008996
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9003 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004fi
9005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009007if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9009$as_echo_n "checking if RFC2553 API is available... " >&6; }
9010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009012
9013 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009014#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009015int
9016main ()
9017{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009018struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009019 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ;
9021 return 0;
9022}
Matthias Kloseb159a552010-04-25 21:00:44 +00009023
Martin v. Löwis11437992002-04-12 09:54:03 +00009024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009025if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009026
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009028$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009029 ipv6=yes
9030
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009031else
Matthias Kloseb159a552010-04-25 21:00:44 +00009032
9033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009034$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009035 ipv6=no
9036
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009039fi
9040
9041if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009043
9044fi
9045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046fi
9047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048
9049ipv6type=unknown
9050ipv6lib=none
9051ipv6trylibc=no
9052
9053if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9055$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009056 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9057 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058 case $i in
9059 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009061/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009062
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063#include <netinet/in.h>
9064#ifdef IPV6_INRIA_VERSION
9065yes
9066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009067_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009070 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009072rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073
9074 ;;
9075 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009077/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009078
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079#include <netinet/in.h>
9080#ifdef __KAME__
9081yes
9082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009083_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009086 ipv6type=$i;
9087 ipv6lib=inet6
9088 ipv6libdir=/usr/local/v6/lib
9089 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009091rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092
9093 ;;
9094 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009096/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009097
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009098#include <features.h>
9099#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9100yes
9101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009102_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009103if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009105 ipv6type=$i;
9106 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009107fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009108rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009109
9110 ;;
9111 linux-inet6)
9112 if test -d /usr/inet6; then
9113 ipv6type=$i
9114 ipv6lib=inet6
9115 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009116 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117 fi
9118 ;;
9119 solaris)
9120 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009121 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122 ipv6type=$i
9123 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009124 fi
9125 fi
9126 ;;
9127 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009129/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009131#include <sys/param.h>
9132#ifdef _TOSHIBA_INET6
9133yes
9134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009138 ipv6type=$i;
9139 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009140 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009142rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009143
9144 ;;
9145 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009147/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009148
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009149#include </usr/local/v6/include/sys/v6config.h>
9150#ifdef __V6D__
9151yes
9152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009153_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009155 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009156 ipv6type=$i;
9157 ipv6lib=v6;
9158 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009159 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009160fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009161rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009162
9163 ;;
9164 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009166/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009167
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009168#include <sys/param.h>
9169#ifdef _ZETA_MINAMI_INET6
9170yes
9171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009172_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009174 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009175 ipv6type=$i;
9176 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009177 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009178fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009179rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009180
9181 ;;
9182 esac
9183 if test "$ipv6type" != "unknown"; then
9184 break
9185 fi
9186 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9188$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009189fi
9190
9191if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9192 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9193 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9194 echo "using lib$ipv6lib"
9195 else
9196 if test $ipv6trylibc = "yes"; then
9197 echo "using libc"
9198 else
9199 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9200 echo "You need to fetch lib$ipv6lib.a from appropriate"
9201 echo 'ipv6 kit and compile beforehand.'
9202 exit 1
9203 fi
9204 fi
9205fi
9206
Matthias Kloseb9621712010-04-24 17:59:49 +00009207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9208$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009210/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009211
9212 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009213int
9214main ()
9215{
9216FSIORefNum fRef = 0
9217 ;
9218 return 0;
9219}
Matthias Kloseb159a552010-04-25 21:00:44 +00009220
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009222if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009223
Matthias Kloseb159a552010-04-25 21:00:44 +00009224
Matthias Kloseb9621712010-04-24 17:59:49 +00009225$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009226
Matthias Kloseb9621712010-04-24 17:59:49 +00009227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9228$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009229
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009230else
Matthias Kloseb159a552010-04-25 21:00:44 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9233$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009234
9235fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9237
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009238# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9240$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009242# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009243if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244 withval=$with_doc_strings;
9245fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009246
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009247
9248if test -z "$with_doc_strings"
9249then with_doc_strings="yes"
9250fi
9251if test "$with_doc_strings" != "no"
9252then
9253
Matthias Kloseb9621712010-04-24 17:59:49 +00009254$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009255
9256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9258$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009259
Antoine Pitrou042b1282010-08-13 21:15:58 +00009260# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9262$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009265if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009267if test "$withval" != no
9268then
9269
Matthias Kloseb9621712010-04-24 17:59:49 +00009270$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009271
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9273$as_echo "yes" >&6; }
9274else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009276fi
9277else
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280fi
9281
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009282
9283# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9285$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009288if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009289 withval=$with_pymalloc;
9290fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009291
Neil Schemenauera35c6882001-02-27 04:45:05 +00009292
Neil Schemenauer16c22972002-03-22 15:34:49 +00009293if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009294then
9295 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009296 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009297fi
9298if test "$with_pymalloc" != "no"
9299then
Martin v. Löwis11437992002-04-12 09:54:03 +00009300
Matthias Kloseb9621712010-04-24 17:59:49 +00009301$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009302
9303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9305$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009306
Benjamin Peterson05159c42009-12-03 03:01:27 +00009307# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9309$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009310
9311# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009312if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009313 withval=$with_valgrind;
9314else
9315 with_valgrind=no
9316fi
9317
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9319$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009320if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009321 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 +01009322if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009323
Matthias Kloseb9621712010-04-24 17:59:49 +00009324$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009325
9326else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009327 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009328
9329fi
9330
9331
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009332 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009333fi
9334
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009335# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009336
Guido van Rossum98935bf2001-09-05 19:13:16 +00009337DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009338
Guido van Rossume97ee181999-12-20 21:27:22 +00009339# the dlopen() function means we might want to use dynload_shlib.o. some
9340# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009341for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009342do :
9343 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natali6613c182011-11-27 12:41:06 +01009344if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009346#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009347_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009348
Guido van Rossume97ee181999-12-20 21:27:22 +00009349fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009350done
Guido van Rossume97ee181999-12-20 21:27:22 +00009351
Michael W. Hudson54241132001-12-07 15:38:26 +00009352
Guido van Rossume97ee181999-12-20 21:27:22 +00009353# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9354# loading of modules.
9355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9357$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009358if test -z "$DYNLOADFILE"
9359then
9360 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009361 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9362 if test "$ac_cv_func_dlopen" = yes
9363 then DYNLOADFILE="dynload_shlib.o"
9364 else DYNLOADFILE="dynload_aix.o"
9365 fi
9366 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009367 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009368 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9369 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009370 *)
9371 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9372 # out any dynamic loading
9373 if test "$ac_cv_func_dlopen" = yes
9374 then DYNLOADFILE="dynload_shlib.o"
9375 else DYNLOADFILE="dynload_stub.o"
9376 fi
9377 ;;
9378 esac
9379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9381$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009382if test "$DYNLOADFILE" != "dynload_stub.o"
9383then
Martin v. Löwis11437992002-04-12 09:54:03 +00009384
Matthias Kloseb9621712010-04-24 17:59:49 +00009385$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009386
9387fi
9388
Neil Schemenauer4e425612001-06-19 15:44:15 +00009389# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9390
Michael W. Hudson54241132001-12-07 15:38:26 +00009391
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9393$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009394if test -z "$MACHDEP_OBJS"
9395then
Jack Jansene578a632001-08-15 01:27:14 +00009396 MACHDEP_OBJS=$extra_machdep_objs
9397else
9398 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9401$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009402
Guido van Rossum627b2d71993-12-24 10:39:16 +00009403# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009404for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009405 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009406 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009407 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009408 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009409 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009410 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009411 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9412 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009413 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009414 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009415 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009416 truncate uname unsetenv utimes waitpid wait3 wait4 \
9417 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009418do :
9419 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9420ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009421if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009423#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009424_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009425
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009426fi
9427done
9428
Michael W. Hudson54241132001-12-07 15:38:26 +00009429
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009430# For some functions, having a definition is not sufficient, since
9431# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9433$as_echo_n "checking for chroot... " >&6; }
9434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009435/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009436#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009437int
9438main ()
9439{
9440void *x=chroot
9441 ;
9442 return 0;
9443}
9444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009448
Matthias Kloseb159a552010-04-25 21:00:44 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009450$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009451else
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9453$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009454
9455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9458$as_echo_n "checking for link... " >&6; }
9459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009460/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009461#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009462int
9463main ()
9464{
9465void *x=link
9466 ;
9467 return 0;
9468}
9469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009473
Matthias Kloseb159a552010-04-25 21:00:44 +00009474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009476else
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009479
9480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9483$as_echo_n "checking for symlink... " >&6; }
9484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009485/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009486#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009487int
9488main ()
9489{
9490void *x=symlink
9491 ;
9492 return 0;
9493}
9494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009496
Matthias Kloseb9621712010-04-24 17:59:49 +00009497$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009498
Matthias Kloseb159a552010-04-25 21:00:44 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009500$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009501else
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009504
9505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9508$as_echo_n "checking for fchdir... " >&6; }
9509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009511#include <unistd.h>
9512int
9513main ()
9514{
9515void *x=fchdir
9516 ;
9517 return 0;
9518}
9519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009520if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009521
Matthias Kloseb9621712010-04-24 17:59:49 +00009522$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009523
Matthias Kloseb159a552010-04-25 21:00:44 +00009524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009525$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009526else
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9528$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009529
9530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9533$as_echo_n "checking for fsync... " >&6; }
9534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009535/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009536#include <unistd.h>
9537int
9538main ()
9539{
9540void *x=fsync
9541 ;
9542 return 0;
9543}
9544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009546
Matthias Kloseb9621712010-04-24 17:59:49 +00009547$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009548
Matthias Kloseb159a552010-04-25 21:00:44 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009550$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009551else
Matthias Kloseb9621712010-04-24 17:59:49 +00009552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009554
9555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9558$as_echo_n "checking for fdatasync... " >&6; }
9559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009560/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009561#include <unistd.h>
9562int
9563main ()
9564{
9565void *x=fdatasync
9566 ;
9567 return 0;
9568}
9569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009570if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009571
Matthias Kloseb9621712010-04-24 17:59:49 +00009572$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009573
Matthias Kloseb159a552010-04-25 21:00:44 +00009574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009575$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009576else
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9578$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009579
9580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9583$as_echo_n "checking for epoll... " >&6; }
9584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009585/* end confdefs.h. */
9586#include <sys/epoll.h>
9587int
9588main ()
9589{
9590void *x=epoll_create
9591 ;
9592 return 0;
9593}
9594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009596
Matthias Kloseb9621712010-04-24 17:59:49 +00009597$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009598
Matthias Kloseb159a552010-04-25 21:00:44 +00009599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009600$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009601else
Matthias Kloseb9621712010-04-24 17:59:49 +00009602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9603$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009604
9605fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9608$as_echo_n "checking for kqueue... " >&6; }
9609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009610/* end confdefs.h. */
9611
9612#include <sys/types.h>
9613#include <sys/event.h>
9614
9615int
9616main ()
9617{
9618int x=kqueue()
9619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009626
Matthias Kloseb159a552010-04-25 21:00:44 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009632
9633fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009635# On some systems (eg. FreeBSD 5), we would find a definition of the
9636# functions ctermid_r, setgroups in the library, but no prototype
9637# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9638# address to avoid compiler warnings and potential miscompilations
9639# because of the missing prototypes.
9640
Matthias Kloseb9621712010-04-24 17:59:49 +00009641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9642$as_echo_n "checking for ctermid_r... " >&6; }
9643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009645
Martin v. Löwisd5843682002-11-21 20:41:28 +00009646#include <stdio.h>
9647
Martin v. Löwisd5843682002-11-21 20:41:28 +00009648int
9649main ()
9650{
9651void* p = ctermid_r
9652 ;
9653 return 0;
9654}
9655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009657
Matthias Kloseb9621712010-04-24 17:59:49 +00009658$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009659
Matthias Kloseb159a552010-04-25 21:00:44 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009661$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009662else
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009665
9666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9668
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9670$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009671if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009672 $as_echo_n "(cached) " >&6
9673else
9674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009675/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009676#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009677int
9678main ()
9679{
9680void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009681
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009687 ac_cv_flock_decl=yes
9688else
9689 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009690
9691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009693
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009694fi
9695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9696$as_echo "$ac_cv_flock_decl" >&6; }
9697if test "x${ac_cv_flock_decl}" = xyes; then
9698 for ac_func in flock
9699do :
9700 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natali6613c182011-11-27 12:41:06 +01009701if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009702 cat >>confdefs.h <<_ACEOF
9703#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009704_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009705
Antoine Pitroua3000072010-09-07 14:52:42 +00009706else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009708$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009709if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009710 $as_echo_n "(cached) " >&6
9711else
9712 ac_check_lib_save_LIBS=$LIBS
9713LIBS="-lbsd $LIBS"
9714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9715/* end confdefs.h. */
9716
9717/* Override any GCC internal prototype to avoid an error.
9718 Use char because int might match the return type of a GCC
9719 builtin and then its argument prototype would still apply. */
9720#ifdef __cplusplus
9721extern "C"
9722#endif
9723char flock ();
9724int
9725main ()
9726{
9727return flock ();
9728 ;
9729 return 0;
9730}
9731_ACEOF
9732if ac_fn_c_try_link "$LINENO"; then :
9733 ac_cv_lib_bsd_flock=yes
9734else
9735 ac_cv_lib_bsd_flock=no
9736fi
9737rm -f core conftest.err conftest.$ac_objext \
9738 conftest$ac_exeext conftest.$ac_ext
9739LIBS=$ac_check_lib_save_LIBS
9740fi
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9742$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009743if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009744 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009745
9746
9747$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9748
9749
9750fi
9751
9752
9753fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009754done
9755
Antoine Pitroua3000072010-09-07 14:52:42 +00009756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757
Matthias Kloseb9621712010-04-24 17:59:49 +00009758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9759$as_echo_n "checking for getpagesize... " >&6; }
9760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009761/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009762
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009763#include <unistd.h>
9764
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009765int
9766main ()
9767{
9768void* p = getpagesize
9769 ;
9770 return 0;
9771}
9772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009774
Matthias Kloseb9621712010-04-24 17:59:49 +00009775$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009776
Matthias Kloseb159a552010-04-25 21:00:44 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009778$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009779else
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009782
9783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009785
Charles-François Natali6613c182011-11-27 12:41:06 +01009786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9787$as_echo_n "checking for broken unsetenv... " >&6; }
9788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9789/* end confdefs.h. */
9790
9791#include <stdlib.h>
9792
9793int
9794main ()
9795{
9796int res = unsetenv("DUMMY")
9797 ;
9798 return 0;
9799}
9800_ACEOF
9801if ac_fn_c_try_compile "$LINENO"; then :
9802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9803$as_echo "no" >&6; }
9804else
9805
9806$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9807
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9809$as_echo "yes" >&6; }
9810
9811fi
9812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9813
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009814for ac_prog in true
9815do
9816 # Extract the first word of "$ac_prog", so it can be a program name with args.
9817set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9819$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009820if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009822else
9823 if test -n "$TRUE"; then
9824 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9825else
9826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9827for as_dir in $PATH
9828do
9829 IFS=$as_save_IFS
9830 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 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 +00009833 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 $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 +00009835 break 2
9836 fi
9837done
Matthias Kloseb9621712010-04-24 17:59:49 +00009838 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009840
9841fi
9842fi
9843TRUE=$ac_cv_prog_TRUE
9844if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9846$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009847else
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9849$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009850fi
9851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009853 test -n "$TRUE" && break
9854done
9855test -n "$TRUE" || TRUE="/bin/true"
9856
9857
Matthias Kloseb9621712010-04-24 17:59:49 +00009858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9859$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009860if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009862else
9863 ac_check_lib_save_LIBS=$LIBS
9864LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009866/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868/* Override any GCC internal prototype to avoid an error.
9869 Use char because int might match the return type of a GCC
9870 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009871#ifdef __cplusplus
9872extern "C"
9873#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009874char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009875int
9876main ()
9877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009879 ;
9880 return 0;
9881}
9882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009884 ac_cv_lib_c_inet_aton=yes
9885else
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009888rm -f core conftest.err conftest.$ac_objext \
9889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009890LIBS=$ac_check_lib_save_LIBS
9891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9893$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009894if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009895 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009896else
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9898$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009899if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009900 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009901else
9902 ac_check_lib_save_LIBS=$LIBS
9903LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009905/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907/* Override any GCC internal prototype to avoid an error.
9908 Use char because int might match the return type of a GCC
9909 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009910#ifdef __cplusplus
9911extern "C"
9912#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009913char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009914int
9915main ()
9916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009918 ;
9919 return 0;
9920}
9921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009922if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009923 ac_cv_lib_resolv_inet_aton=yes
9924else
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009927rm -f core conftest.err conftest.$ac_objext \
9928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009929LIBS=$ac_check_lib_save_LIBS
9930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9932$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009933if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009934 cat >>confdefs.h <<_ACEOF
9935#define HAVE_LIBRESOLV 1
9936_ACEOF
9937
9938 LIBS="-lresolv $LIBS"
9939
9940fi
9941
9942
9943fi
9944
9945
Christian Heimesd0764e22007-12-04 15:00:33 +00009946# On Tru64, chflags seems to be present, but calling it will
9947# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9949$as_echo_n "checking for chflags... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009950if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009951 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009952else
Matthias Kloseb9621712010-04-24 17:59:49 +00009953 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009954 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009955else
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009957/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009958
Christian Heimesd0764e22007-12-04 15:00:33 +00009959#include <sys/stat.h>
9960#include <unistd.h>
9961int main(int argc, char*argv[])
9962{
9963 if(chflags(argv[0], 0) != 0)
9964 return 1;
9965 return 0;
9966}
Ned Deily3eb67d52011-06-28 00:00:28 -07009967
Christian Heimesd0764e22007-12-04 15:00:33 +00009968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009969if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009970 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009971else
Matthias Kloseb9621712010-04-24 17:59:49 +00009972 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9975 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009976fi
9977
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009978
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9981$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009982if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natali6613c182011-11-27 12:41:06 +01009984if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009985 ac_cv_have_chflags="yes"
9986else
9987 ac_cv_have_chflags="no"
9988fi
9989
9990fi
9991if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009992
Matthias Kloseb9621712010-04-24 17:59:49 +00009993$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009994
9995fi
9996
Matthias Kloseb9621712010-04-24 17:59:49 +00009997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9998$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +01009999if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010000 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010001else
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010003 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010004else
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010006/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010007
Christian Heimesd0764e22007-12-04 15:00:33 +000010008#include <sys/stat.h>
10009#include <unistd.h>
10010int main(int argc, char*argv[])
10011{
10012 if(lchflags(argv[0], 0) != 0)
10013 return 1;
10014 return 0;
10015}
Ned Deily3eb67d52011-06-28 00:00:28 -070010016
Christian Heimesd0764e22007-12-04 15:00:33 +000010017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010018if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010019 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010020else
Matthias Kloseb9621712010-04-24 17:59:49 +000010021 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10024 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010025fi
10026
10027
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10030$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010031if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010032 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natali6613c182011-11-27 12:41:06 +010010033if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010034 ac_cv_have_lchflags="yes"
10035else
10036 ac_cv_have_lchflags="no"
10037fi
10038
10039fi
10040if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010041
Matthias Kloseb9621712010-04-24 17:59:49 +000010042$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010043
10044fi
10045
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010046case $ac_sys_system/$ac_sys_release in
10047Darwin/*)
10048 _CUR_CFLAGS="${CFLAGS}"
10049 _CUR_LDFLAGS="${LDFLAGS}"
10050 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10051 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10052 ;;
10053esac
10054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10056$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010057if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010059else
10060 ac_check_lib_save_LIBS=$LIBS
10061LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010063/* end confdefs.h. */
10064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065/* Override any GCC internal prototype to avoid an error.
10066 Use char because int might match the return type of a GCC
10067 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010068#ifdef __cplusplus
10069extern "C"
10070#endif
10071char inflateCopy ();
10072int
10073main ()
10074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010076 ;
10077 return 0;
10078}
10079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010080if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010081 ac_cv_lib_z_inflateCopy=yes
10082else
Matthias Kloseb9621712010-04-24 17:59:49 +000010083 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010085rm -f core conftest.err conftest.$ac_objext \
10086 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010087LIBS=$ac_check_lib_save_LIBS
10088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10090$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010091if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010092
Matthias Kloseb9621712010-04-24 17:59:49 +000010093$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010094
10095fi
10096
10097
10098case $ac_sys_system/$ac_sys_release in
10099Darwin/*)
10100 CFLAGS="${_CUR_CFLAGS}"
10101 LDFLAGS="${_CUR_LDFLAGS}"
10102 ;;
10103esac
10104
Matthias Kloseb9621712010-04-24 17:59:49 +000010105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10106$as_echo_n "checking for hstrerror... " >&6; }
10107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010108/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010109
Martin v. Löwise9416172003-05-03 10:12:45 +000010110#include <netdb.h>
10111
Martin v. Löwise9416172003-05-03 10:12:45 +000010112int
10113main ()
10114{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010115void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010116 ;
10117 return 0;
10118}
10119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010120if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010121
Matthias Kloseb9621712010-04-24 17:59:49 +000010122$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010123
Matthias Kloseb159a552010-04-25 21:00:44 +000010124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010125$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010126else
Matthias Kloseb9621712010-04-24 17:59:49 +000010127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10128$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010129
10130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010131rm -f core conftest.err conftest.$ac_objext \
10132 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10135$as_echo_n "checking for inet_aton... " >&6; }
10136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010137/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010138
Martin v. Löwis86d66262006-02-17 08:40:11 +000010139#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010140#include <sys/socket.h>
10141#include <netinet/in.h>
10142#include <arpa/inet.h>
10143
Martin v. Löwise9416172003-05-03 10:12:45 +000010144int
10145main ()
10146{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010147void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010148 ;
10149 return 0;
10150}
10151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010152if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010153
Matthias Kloseb9621712010-04-24 17:59:49 +000010154$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010155
Matthias Kloseb159a552010-04-25 21:00:44 +000010156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010157$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010158else
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10160$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010161
10162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010163rm -f core conftest.err conftest.$ac_objext \
10164 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10167$as_echo_n "checking for inet_pton... " >&6; }
10168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010169/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010170
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010171#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010172#include <sys/socket.h>
10173#include <netinet/in.h>
10174#include <arpa/inet.h>
10175
Martin v. Löwise9416172003-05-03 10:12:45 +000010176int
10177main ()
10178{
10179void* p = inet_pton
10180 ;
10181 return 0;
10182}
10183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010184if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010185
Matthias Kloseb9621712010-04-24 17:59:49 +000010186$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010187
Matthias Kloseb159a552010-04-25 21:00:44 +000010188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010189$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010190else
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010193
10194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010196
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010197# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10199$as_echo_n "checking for setgroups... " >&6; }
10200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010201/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010202
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010203#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010204#ifdef HAVE_GRP_H
10205#include <grp.h>
10206#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010207
Martin v. Löwisd5843682002-11-21 20:41:28 +000010208int
10209main ()
10210{
10211void* p = setgroups
10212 ;
10213 return 0;
10214}
10215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010217
Matthias Kloseb9621712010-04-24 17:59:49 +000010218$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010219
Matthias Kloseb159a552010-04-25 21:00:44 +000010220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010221$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010222else
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10224$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010225
10226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010228
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010229# check for openpty and forkpty
10230
10231for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010232do :
10233 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natali6613c182011-11-27 12:41:06 +010010234if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010236#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010237_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010238
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010239else
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10241$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010242if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010244else
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010246LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250/* Override any GCC internal prototype to avoid an error.
10251 Use char because int might match the return type of a GCC
10252 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010253#ifdef __cplusplus
10254extern "C"
10255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010256char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010257int
10258main ()
10259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ;
10262 return 0;
10263}
10264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010265if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010267else
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010270rm -f core conftest.err conftest.$ac_objext \
10271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010272LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10275$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010276if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010278 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010279else
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10281$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010282if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010284else
10285 ac_check_lib_save_LIBS=$LIBS
10286LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010288/* end confdefs.h. */
10289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290/* Override any GCC internal prototype to avoid an error.
10291 Use char because int might match the return type of a GCC
10292 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010293#ifdef __cplusplus
10294extern "C"
10295#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010296char openpty ();
10297int
10298main ()
10299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010300return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010301 ;
10302 return 0;
10303}
10304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010305if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010306 ac_cv_lib_bsd_openpty=yes
10307else
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010310rm -f core conftest.err conftest.$ac_objext \
10311 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010312LIBS=$ac_check_lib_save_LIBS
10313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10315$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010316if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010318 LIBS="$LIBS -lbsd"
10319fi
10320
10321
10322fi
10323
Fred Drake8cef4cf2000-06-28 16:40:38 +000010324
10325fi
10326done
10327
10328for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010329do :
10330 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natali6613c182011-11-27 12:41:06 +010010331if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010333#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010334_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010335
Fred Drake8cef4cf2000-06-28 16:40:38 +000010336else
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10338$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010339if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010341else
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010343LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347/* Override any GCC internal prototype to avoid an error.
10348 Use char because int might match the return type of a GCC
10349 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010350#ifdef __cplusplus
10351extern "C"
10352#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010353char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010354int
10355main ()
10356{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 ;
10359 return 0;
10360}
10361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010362if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010364else
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010367rm -f core conftest.err conftest.$ac_objext \
10368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010369LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10372$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010373if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010375 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010376else
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10378$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010379if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010381else
10382 ac_check_lib_save_LIBS=$LIBS
10383LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010385/* end confdefs.h. */
10386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387/* Override any GCC internal prototype to avoid an error.
10388 Use char because int might match the return type of a GCC
10389 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010390#ifdef __cplusplus
10391extern "C"
10392#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010393char forkpty ();
10394int
10395main ()
10396{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010398 ;
10399 return 0;
10400}
10401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010402if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010403 ac_cv_lib_bsd_forkpty=yes
10404else
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010407rm -f core conftest.err conftest.$ac_objext \
10408 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010409LIBS=$ac_check_lib_save_LIBS
10410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10412$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010413if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010415 LIBS="$LIBS -lbsd"
10416fi
10417
10418
10419fi
10420
Fred Drake8cef4cf2000-06-28 16:40:38 +000010421
10422fi
10423done
10424
Jack Jansendd19cf82001-12-06 22:36:17 +000010425
Christian Heimesb186d002008-03-18 15:15:01 +000010426# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010427for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010428do :
10429 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natali6613c182011-11-27 12:41:06 +010010430if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010431 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010432#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010433_ACEOF
10434
10435fi
10436done
10437
10438
Michael W. Hudson54241132001-12-07 15:38:26 +000010439# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010440for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010441do :
10442 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10443ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010444if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010446#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010447_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010449fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010450done
10451
Michael W. Hudson54241132001-12-07 15:38:26 +000010452
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010453ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natali6613c182011-11-27 12:41:06 +010010454if test "x$ac_cv_func_dup2" = x""yes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010455 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010456
Martin v. Löwis1142de32002-03-29 16:28:31 +000010457else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010459 *" dup2.$ac_objext "* ) ;;
10460 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010462esac
10463
Martin v. Löwis1142de32002-03-29 16:28:31 +000010464fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010465
10466ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natali6613c182011-11-27 12:41:06 +010010467if test "x$ac_cv_func_getcwd" = x""yes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010468 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10469
10470else
10471 case " $LIBOBJS " in
10472 *" getcwd.$ac_objext "* ) ;;
10473 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10474 ;;
10475esac
10476
10477fi
10478
10479ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natali6613c182011-11-27 12:41:06 +010010480if test "x$ac_cv_func_strdup" = x""yes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010481 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10482
10483else
10484 case " $LIBOBJS " in
10485 *" strdup.$ac_objext "* ) ;;
10486 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10487 ;;
10488esac
10489
10490fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010491
10492
10493for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010494do :
10495 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natali6613c182011-11-27 12:41:06 +010010496if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010497 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010498#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010501/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010502#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010503int
10504main ()
10505{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010506getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ;
10508 return 0;
10509}
10510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010512
Matthias Kloseb9621712010-04-24 17:59:49 +000010513$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010514
Guido van Rossum627b2d71993-12-24 10:39:16 +000010515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010517
Guido van Rossum627b2d71993-12-24 10:39:16 +000010518fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010519done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010520
Jack Jansen150753c2003-03-29 22:07:47 +000010521for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010522do :
10523 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natali6613c182011-11-27 12:41:06 +010010524if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010525 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010526#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010529/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010530#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010531int
10532main ()
10533{
10534setpgrp(0,0);
10535 ;
10536 return 0;
10537}
10538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010540
Matthias Kloseb9621712010-04-24 17:59:49 +000010541$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010542
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010545
10546fi
10547done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010548
Thomas Wouters3a584202000-08-05 23:28:51 +000010549for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010550do :
10551 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natali6613c182011-11-27 12:41:06 +010010552if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010554#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010557/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010558#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010559int
10560main ()
10561{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010562gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 ;
10564 return 0;
10565}
10566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010567if ac_fn_c_try_compile "$LINENO"; then :
10568
Guido van Rossum627b2d71993-12-24 10:39:16 +000010569else
Skip Montanaro6dead952003-09-25 14:50:04 +000010570
Matthias Kloseb9621712010-04-24 17:59:49 +000010571$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010572
Martin v. Löwis11437992002-04-12 09:54:03 +000010573
Guido van Rossum627b2d71993-12-24 10:39:16 +000010574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010576
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010577fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010578done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010579
Michael W. Hudson54241132001-12-07 15:38:26 +000010580
Matthias Kloseb9621712010-04-24 17:59:49 +000010581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10582$as_echo_n "checking for major... " >&6; }
10583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010584/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010585
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010586#if defined(MAJOR_IN_MKDEV)
10587#include <sys/mkdev.h>
10588#elif defined(MAJOR_IN_SYSMACROS)
10589#include <sys/sysmacros.h>
10590#else
10591#include <sys/types.h>
10592#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010593
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010594int
10595main ()
10596{
10597
10598 makedev(major(0),minor(0));
10599
10600 ;
10601 return 0;
10602}
10603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010605
10606
Matthias Kloseb9621712010-04-24 17:59:49 +000010607$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010608
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10610$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010611
10612else
Skip Montanaro6dead952003-09-25 14:50:04 +000010613
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10615$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010616
10617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618rm -f core conftest.err conftest.$ac_objext \
10619 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010620
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010621# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010622# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10624$as_echo_n "checking for getaddrinfo... " >&6; }
10625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010626/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010627
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010628#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010629#include <sys/socket.h>
10630#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010631#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010632
Martin v. Löwis11437992002-04-12 09:54:03 +000010633int
10634main ()
10635{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010636getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ;
10638 return 0;
10639}
10640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010641if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010642 have_getaddrinfo=yes
10643else
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010646rm -f core conftest.err conftest.$ac_objext \
10647 conftest$ac_exeext conftest.$ac_ext
10648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10649$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010650if test $have_getaddrinfo = yes
10651then
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10653$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010654 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010656else
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010658 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010659else
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010661/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010662
10663#include <sys/types.h>
10664#include <netdb.h>
10665#include <string.h>
10666#include <sys/socket.h>
10667#include <netinet/in.h>
10668
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010669int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010670{
10671 int passive, gaierr, inet4 = 0, inet6 = 0;
10672 struct addrinfo hints, *ai, *aitop;
10673 char straddr[INET6_ADDRSTRLEN], strport[16];
10674
10675 for (passive = 0; passive <= 1; passive++) {
10676 memset(&hints, 0, sizeof(hints));
10677 hints.ai_family = AF_UNSPEC;
10678 hints.ai_flags = passive ? AI_PASSIVE : 0;
10679 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010680 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010681 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10682 (void)gai_strerror(gaierr);
10683 goto bad;
10684 }
10685 for (ai = aitop; ai; ai = ai->ai_next) {
10686 if (ai->ai_addr == NULL ||
10687 ai->ai_addrlen == 0 ||
10688 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10689 straddr, sizeof(straddr), strport, sizeof(strport),
10690 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10691 goto bad;
10692 }
10693 switch (ai->ai_family) {
10694 case AF_INET:
10695 if (strcmp(strport, "54321") != 0) {
10696 goto bad;
10697 }
10698 if (passive) {
10699 if (strcmp(straddr, "0.0.0.0") != 0) {
10700 goto bad;
10701 }
10702 } else {
10703 if (strcmp(straddr, "127.0.0.1") != 0) {
10704 goto bad;
10705 }
10706 }
10707 inet4++;
10708 break;
10709 case AF_INET6:
10710 if (strcmp(strport, "54321") != 0) {
10711 goto bad;
10712 }
10713 if (passive) {
10714 if (strcmp(straddr, "::") != 0) {
10715 goto bad;
10716 }
10717 } else {
10718 if (strcmp(straddr, "::1") != 0) {
10719 goto bad;
10720 }
10721 }
10722 inet6++;
10723 break;
10724 case AF_UNSPEC:
10725 goto bad;
10726 break;
10727 default:
10728 /* another family support? */
10729 break;
10730 }
10731 }
10732 }
10733
10734 if (!(inet4 == 0 || inet4 == 2))
10735 goto bad;
10736 if (!(inet6 == 0 || inet6 == 2))
10737 goto bad;
10738
10739 if (aitop)
10740 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010741 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010742
10743 bad:
10744 if (aitop)
10745 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010746 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010747}
10748
Martin v. Löwis11437992002-04-12 09:54:03 +000010749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010750if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010751 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010752else
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010759fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010760
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10764$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10765
Mark Dickinson2df5d282009-12-31 21:22:50 +000010766if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010767then
10768 if test $ipv6 = yes
10769 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010770 echo 'Fatal: You must get working getaddrinfo() function.'
10771 echo ' or you can specify "--disable-ipv6"'.
10772 exit 1
10773 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010774else
Martin v. Löwis11437992002-04-12 09:54:03 +000010775
Matthias Kloseb9621712010-04-24 17:59:49 +000010776$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010777
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010778fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010779
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010780for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010781do :
10782 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natali6613c182011-11-27 12:41:06 +010010783if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010785#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010786_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010787
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010788fi
10789done
10790
Michael W. Hudson54241132001-12-07 15:38:26 +000010791
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010792# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10794$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 +010010795if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010797else
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010800#include <sys/types.h>
10801#include <sys/time.h>
10802#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010803
Martin v. Löwis11437992002-04-12 09:54:03 +000010804int
10805main ()
10806{
10807if ((struct tm *) 0)
10808return 0;
10809 ;
10810 return 0;
10811}
10812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010813if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010814 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010815else
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10821$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010822if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010823
Matthias Kloseb9621712010-04-24 17:59:49 +000010824$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010825
10826fi
10827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10829$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 +010010830if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010832else
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010835#include <sys/types.h>
10836#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Martin v. Löwis11437992002-04-12 09:54:03 +000010838int
10839main ()
10840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010841struct tm tm;
10842 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010844 ;
10845 return 0;
10846}
10847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010848if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010849 ac_cv_struct_tm=time.h
10850else
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10856$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010857if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010860
10861fi
10862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863ac_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 +000010864#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866"
Charles-François Natali6613c182011-11-27 12:41:06 +010010867if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010868
10869cat >>confdefs.h <<_ACEOF
10870#define HAVE_STRUCT_TM_TM_ZONE 1
10871_ACEOF
10872
10873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010874fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010875
Martin v. Löwis11437992002-04-12 09:54:03 +000010876if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010879
10880else
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10882"
Charles-François Natali6613c182011-11-27 12:41:06 +010010883if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010885else
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010887fi
10888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010890#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891_ACEOF
10892
Matthias Kloseb9621712010-04-24 17:59:49 +000010893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10894$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010010895if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010897else
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010900#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901#if !HAVE_DECL_TZNAME
10902extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010904
Martin v. Löwis11437992002-04-12 09:54:03 +000010905int
10906main ()
10907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010908return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 ;
10910 return 0;
10911}
10912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010913if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010914 ac_cv_var_tzname=yes
10915else
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010918rm -f core conftest.err conftest.$ac_objext \
10919 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10922$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010923 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010927 fi
10928fi
10929
Matthias Kloseb9621712010-04-24 17:59:49 +000010930ac_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 +010010931if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010932
10933cat >>confdefs.h <<_ACEOF
10934#define HAVE_STRUCT_STAT_ST_RDEV 1
10935_ACEOF
10936
10937
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010938fi
10939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940ac_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 +010010941if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010942
Martin v. Löwis11437992002-04-12 09:54:03 +000010943cat >>confdefs.h <<_ACEOF
10944#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10945_ACEOF
10946
10947
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010948fi
10949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950ac_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 +010010951if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010952
10953cat >>confdefs.h <<_ACEOF
10954#define HAVE_STRUCT_STAT_ST_FLAGS 1
10955_ACEOF
10956
10957
10958fi
10959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960ac_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 +010010961if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010962
10963cat >>confdefs.h <<_ACEOF
10964#define HAVE_STRUCT_STAT_ST_GEN 1
10965_ACEOF
10966
10967
10968fi
10969
Matthias Kloseb9621712010-04-24 17:59:49 +000010970ac_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 +010010971if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010972
10973cat >>confdefs.h <<_ACEOF
10974#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10975_ACEOF
10976
10977
10978fi
10979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980ac_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 +010010981if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010982
Martin v. Löwis11437992002-04-12 09:54:03 +000010983cat >>confdefs.h <<_ACEOF
10984#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10985_ACEOF
10986
10987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010989
10990else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010992 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10994 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010995esac
10996
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010997fi
10998
Michael W. Hudson54241132001-12-07 15:38:26 +000010999
Martin v. Löwis11437992002-04-12 09:54:03 +000011000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11002$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011003if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011005else
Matthias Kloseb159a552010-04-25 21:00:44 +000011006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011008/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011009#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011010int
11011main ()
11012{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011013return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 ;
11015 return 0;
11016}
11017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011018if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011019 ac_cv_header_time_altzone=yes
11020else
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025fi
11026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11028$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011030
Matthias Kloseb9621712010-04-24 17:59:49 +000011031$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011032
11033fi
11034
Guido van Rossumda88dad1995-01-26 00:46:29 +000011035was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11037$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011039/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011040
11041#include <sys/types.h>
11042#include <sys/select.h>
11043#include <sys/time.h>
11044
Martin v. Löwis11437992002-04-12 09:54:03 +000011045int
11046main ()
11047{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011048;
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 ;
11050 return 0;
11051}
11052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011054
11055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011057
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011058 was_it_defined=yes
11059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11063$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11066$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011067if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011069else
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011072#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
11074main ()
11075{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011076struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011077 ;
11078 return 0;
11079}
11080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011081if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011082 ac_cv_struct_addrinfo=yes
11083else
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11087fi
11088
Matthias Kloseb9621712010-04-24 17:59:49 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11090$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011091if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011092
Matthias Kloseb9621712010-04-24 17:59:49 +000011093$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011094
11095fi
11096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11098$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011099if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011101else
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011104
11105# include <sys/types.h>
11106# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011107int
11108main ()
11109{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011110struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 ;
11112 return 0;
11113}
11114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011116 ac_cv_struct_sockaddr_storage=yes
11117else
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11121fi
11122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11124$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011125if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011128
11129fi
11130
Guido van Rossum627b2d71993-12-24 10:39:16 +000011131# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011132
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11134$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011135if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011137else
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011140$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011141int
11142main ()
11143{
11144static int test_array [1 - 2 * !(((char) -1) < 0)];
11145test_array [0] = 0
11146
11147 ;
11148 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011149}
Martin v. Löwis11437992002-04-12 09:54:03 +000011150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011151if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011152 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011153else
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11159$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011160if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011161 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011162
11163fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011164
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11166$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011167if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011169else
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011171/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172
Martin v. Löwis11437992002-04-12 09:54:03 +000011173int
11174main ()
11175{
11176/* FIXME: Include the comments suggested by Paul. */
11177#ifndef __cplusplus
11178 /* Ultrix mips cc rejects this. */
11179 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182 char const *const *pcpcc;
11183 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 /* NEC SVR4.0.2 mips cc rejects this. */
11185 struct point {int x, y;};
11186 static struct point const zero = {0,0};
11187 /* AIX XL C 1.02.0.0 rejects this.
11188 It does not let you subtract one const X* pointer from another in
11189 an arm of an if-expression whose if-part is not a constant
11190 expression */
11191 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011192 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011193 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194 ++pcpcc;
11195 ppc = (char**) pcpcc;
11196 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 { /* SCO 3.2v4 cc rejects this. */
11198 char *t;
11199 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011200
Martin v. Löwis11437992002-04-12 09:54:03 +000011201 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 }
11204 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11205 int x[] = {25, 17};
11206 const int *foo = &x[0];
11207 ++foo;
11208 }
11209 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11210 typedef const int *iptr;
11211 iptr p = 0;
11212 ++p;
11213 }
11214 { /* AIX XL C 1.02.0.0 rejects this saying
11215 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11216 struct s { int j; const int *ap[3]; };
11217 struct s *b; b->j = 5;
11218 }
11219 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11220 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011221 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011222 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011224#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011225
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 ;
11227 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011228}
Martin v. Löwis11437992002-04-12 09:54:03 +000011229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011230if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011231 ac_cv_c_const=yes
11232else
Matthias Kloseb9621712010-04-24 17:59:49 +000011233 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11238$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011239if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Matthias Kloseb9621712010-04-24 17:59:49 +000011241$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011242
11243fi
11244
Michael W. Hudson54241132001-12-07 15:38:26 +000011245
Guido van Rossumda88dad1995-01-26 00:46:29 +000011246works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11248$as_echo_n "checking for working volatile... " >&6; }
11249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011250/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011251
Martin v. Löwis11437992002-04-12 09:54:03 +000011252int
11253main ()
11254{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011255volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011256 ;
11257 return 0;
11258}
11259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011261 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011262else
Skip Montanaro6dead952003-09-25 14:50:04 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011265
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011266
Guido van Rossum627b2d71993-12-24 10:39:16 +000011267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11270$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011271
Guido van Rossumda88dad1995-01-26 00:46:29 +000011272works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11274$as_echo_n "checking for working signed char... " >&6; }
11275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011276/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011277
Martin v. Löwis11437992002-04-12 09:54:03 +000011278int
11279main ()
11280{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011281signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011282 ;
11283 return 0;
11284}
11285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011286if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011287 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011288else
Skip Montanaro6dead952003-09-25 14:50:04 +000011289
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011291
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011292
Guido van Rossum7f43da71994-08-01 12:15:30 +000011293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11296$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011297
Guido van Rossumda88dad1995-01-26 00:46:29 +000011298have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11300$as_echo_n "checking for prototypes... " >&6; }
11301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011303int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011304int
11305main ()
11306{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 ;
11309 return 0;
11310}
11311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011315
Matthias Kloseb159a552010-04-25 21:00:44 +000011316 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11320$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321
Guido van Rossumda88dad1995-01-26 00:46:29 +000011322works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11324$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011326/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011327
11328#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011329int foo(int x, ...) {
11330 va_list va;
11331 va_start(va, x);
11332 va_arg(va, int);
11333 va_arg(va, char *);
11334 va_arg(va, double);
11335 return 0;
11336}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011337
Martin v. Löwis11437992002-04-12 09:54:03 +000011338int
11339main ()
11340{
Guido van Rossum90eea071996-08-30 20:58:57 +000011341return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 ;
11343 return 0;
11344}
11345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011347
11348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011351 works=yes
11352
Guido van Rossum627b2d71993-12-24 10:39:16 +000011353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11356$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011357
Martin v. Löwisd6320502004-08-12 13:45:08 +000011358# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11360$as_echo_n "checking for socketpair... " >&6; }
11361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011362/* end confdefs.h. */
11363
11364#include <sys/types.h>
11365#include <sys/socket.h>
11366
11367int
11368main ()
11369{
11370void *x=socketpair
11371 ;
11372 return 0;
11373}
11374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011376
Matthias Kloseb9621712010-04-24 17:59:49 +000011377$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011378
Matthias Kloseb159a552010-04-25 21:00:44 +000011379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011381else
Matthias Kloseb9621712010-04-24 17:59:49 +000011382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11383$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011384
11385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011387
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011388# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11390$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011393#include <sys/types.h>
11394#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011395int
11396main ()
11397{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011398struct sockaddr x;
11399x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 ;
11401 return 0;
11402}
11403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011404if ac_fn_c_try_compile "$LINENO"; then :
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11406$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011409
11410else
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11412$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011413
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011416
Guido van Rossumda88dad1995-01-26 00:46:29 +000011417va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11419$as_echo_n "checking whether va_list is an array... " >&6; }
11420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011422
11423#ifdef HAVE_STDARG_PROTOTYPES
11424#include <stdarg.h>
11425#else
11426#include <varargs.h>
11427#endif
11428
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 ;
11434 return 0;
11435}
11436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011437if ac_fn_c_try_compile "$LINENO"; then :
11438
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439else
Skip Montanaro6dead952003-09-25 14:50:04 +000011440
Martin v. Löwis11437992002-04-12 09:54:03 +000011441
Matthias Kloseb9621712010-04-24 17:59:49 +000011442$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011443
Guido van Rossumda88dad1995-01-26 00:46:29 +000011444 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011445
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11449$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011450
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011451# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011452
11453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natali6613c182011-11-27 12:41:06 +010011455if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011456
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011458
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11460$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011461 OLD_CFLAGS=$CFLAGS
11462 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011464/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011465
11466# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011467
Martin v. Löwis11437992002-04-12 09:54:03 +000011468int
11469main ()
11470{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011471
11472 char *name;
11473 struct hostent *he, *res;
11474 char buffer[2048];
11475 int buflen = 2048;
11476 int h_errnop;
11477
11478 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
11480 ;
11481 return 0;
11482}
11483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011485
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011487
Martin v. Löwis11437992002-04-12 09:54:03 +000011488
Matthias Kloseb9621712010-04-24 17:59:49 +000011489$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011490
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11492$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011493
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011494else
Skip Montanaro6dead952003-09-25 14:50:04 +000011495
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497$as_echo "no" >&6; }
11498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11499$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011501/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011502
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011503# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
Martin v. Löwis11437992002-04-12 09:54:03 +000011505int
11506main ()
11507{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011508
11509 char *name;
11510 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011511 char buffer[2048];
11512 int buflen = 2048;
11513 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011514
Matthias Kloseb159a552010-04-25 21:00:44 +000011515 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011516
11517 ;
11518 return 0;
11519}
11520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011524
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
Matthias Kloseb159a552010-04-25 21:00:44 +000011526$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011527
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11529$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011531else
Skip Montanaro6dead952003-09-25 14:50:04 +000011532
Matthias Kloseb9621712010-04-24 17:59:49 +000011533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11534$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11536$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11538/* end confdefs.h. */
11539
11540# include <netdb.h>
11541
11542int
11543main ()
11544{
11545
11546 char *name;
11547 struct hostent *he;
11548 struct hostent_data data;
11549
11550 (void) gethostbyname_r(name, he, &data);
11551
11552 ;
11553 return 0;
11554}
11555_ACEOF
11556if ac_fn_c_try_compile "$LINENO"; then :
11557
11558 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11559
11560
11561$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11562
11563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11564$as_echo "yes" >&6; }
11565
11566else
11567
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11569$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011570
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011573
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011576
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011579 CFLAGS=$OLD_CFLAGS
11580
11581else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 for ac_func in gethostbyname
11584do :
11585 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natali6613c182011-11-27 12:41:06 +010011586if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011587 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011588#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011589_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011590
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011591fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011592done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011593
Michael W. Hudson54241132001-12-07 15:38:26 +000011594
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011595fi
11596
Michael W. Hudson54241132001-12-07 15:38:26 +000011597
11598
11599
11600
11601
11602
Guido van Rossum627b2d71993-12-24 10:39:16 +000011603# checks for system services
11604# (none yet)
11605
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011606# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011607ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natali6613c182011-11-27 12:41:06 +010011608if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011609
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011610else
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11612$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011613if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011615else
Martin v. Löwis11437992002-04-12 09:54:03 +000011616 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011617LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621/* Override any GCC internal prototype to avoid an error.
11622 Use char because int might match the return type of a GCC
11623 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011624#ifdef __cplusplus
11625extern "C"
11626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011627char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011628int
11629main ()
11630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011632 ;
11633 return 0;
11634}
11635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011636if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011637 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011638else
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011641rm -f core conftest.err conftest.$ac_objext \
11642 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011643LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11646$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011647if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 cat >>confdefs.h <<_ACEOF
11649#define HAVE_LIBIEEE 1
11650_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011651
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011652 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011653
Guido van Rossum627b2d71993-12-24 10:39:16 +000011654fi
11655
Michael W. Hudson54241132001-12-07 15:38:26 +000011656
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011657fi
11658
Michael W. Hudson54241132001-12-07 15:38:26 +000011659
Guido van Rossum7f253911997-05-09 02:42:48 +000011660# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11662$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011664# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011665if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011666 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011667if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011668then
11669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011671
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11673$as_echo "yes" >&6; }
11674else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011676fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11679$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680fi
11681
Guido van Rossum7f253911997-05-09 02:42:48 +000011682
Guido van Rossum7f43da71994-08-01 12:15:30 +000011683# check for --with-libm=...
11684
Guido van Rossum563e7081996-09-10 18:20:48 +000011685case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011686Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011687*) LIBM=-lm
11688esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11690$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011694 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011695if test "$withval" = no
11696then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11698$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011699elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011700then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11702$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011703else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011704fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11707$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011708fi
11709
Guido van Rossum7f43da71994-08-01 12:15:30 +000011710
11711# check for --with-libc=...
11712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11714$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011716# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011718 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011719if test "$withval" = no
11720then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11722$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011723elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011724then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11726$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011727else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011728fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011729else
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11731$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011732fi
11733
Guido van Rossum7f43da71994-08-01 12:15:30 +000011734
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011735# **************************************************
11736# * Check for various properties of floating point *
11737# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011738
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11740$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011741if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011743else
11744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746 ac_cv_little_endian_double=no
11747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011749/* end confdefs.h. */
11750
11751#include <string.h>
11752int main() {
11753 double x = 9006104071832581.0;
11754 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11755 return 0;
11756 else
11757 return 1;
11758}
11759
11760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011761if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011762 ac_cv_little_endian_double=yes
11763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011768fi
11769
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011770fi
11771
Matthias Kloseb9621712010-04-24 17:59:49 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11773$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011774if test "$ac_cv_little_endian_double" = yes
11775then
11776
Matthias Kloseb9621712010-04-24 17:59:49 +000011777$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011778
11779fi
11780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11782$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011783if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011785else
11786
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788 ac_cv_big_endian_double=no
11789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791/* end confdefs.h. */
11792
11793#include <string.h>
11794int main() {
11795 double x = 9006104071832581.0;
11796 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11797 return 0;
11798 else
11799 return 1;
11800}
11801
11802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011803if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011804 ac_cv_big_endian_double=yes
11805else
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011810fi
11811
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011812fi
11813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11815$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011816if test "$ac_cv_big_endian_double" = yes
11817then
11818
Matthias Kloseb9621712010-04-24 17:59:49 +000011819$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011820
11821fi
11822
11823# Some ARM platforms use a mixed-endian representation for doubles.
11824# While Python doesn't currently have full support for these platforms
11825# (see e.g., issue 1762561), we can at least make sure that float <-> string
11826# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11828$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010011829if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831else
11832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011834 ac_cv_mixed_endian_double=no
11835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011837/* end confdefs.h. */
11838
11839#include <string.h>
11840int main() {
11841 double x = 9006104071832581.0;
11842 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11843 return 0;
11844 else
11845 return 1;
11846}
11847
11848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011850 ac_cv_mixed_endian_double=yes
11851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011856fi
11857
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011858fi
11859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11861$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011862if test "$ac_cv_mixed_endian_double" = yes
11863then
11864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011866
11867fi
11868
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011869# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011870# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011871# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011872# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011873# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011874# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011875
11876# This inline assembler syntax may also work for suncc and icc,
11877# so we try it on all platforms.
11878
Matthias Kloseb9621712010-04-24 17:59:49 +000011879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11880$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011882/* end confdefs.h. */
11883
11884int
11885main ()
11886{
11887
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011888 unsigned short cw;
11889 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11890 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011891
11892 ;
11893 return 0;
11894}
11895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011897 have_gcc_asm_for_x87=yes
11898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011900fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11903$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011904if test "$have_gcc_asm_for_x87" = yes
11905then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011906
Matthias Kloseb9621712010-04-24 17:59:49 +000011907$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011908
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011909fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011910
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011911# Detect whether system arithmetic is subject to x87-style double
11912# rounding issues. The result of this test has little meaning on non
11913# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11914# mode is round-to-nearest and double rounding issues are present, and
11915# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11917$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011918# $BASECFLAGS may affect the result
11919ac_save_cc="$CC"
11920CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011921if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011922 ac_cv_x87_double_rounding=no
11923else
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011925/* end confdefs.h. */
11926
11927#include <stdlib.h>
11928#include <math.h>
11929int main() {
11930 volatile double x, y, z;
11931 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11932 x = 0.99999999999999989; /* 1-2**-53 */
11933 y = 1./x;
11934 if (y != 1.)
11935 exit(0);
11936 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11937 x = 1e16;
11938 y = 2.99999;
11939 z = x + y;
11940 if (z != 1e16+4.)
11941 exit(0);
11942 /* both tests show evidence of double rounding */
11943 exit(1);
11944}
11945
11946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011947if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011948 ac_cv_x87_double_rounding=no
11949else
Matthias Kloseb9621712010-04-24 17:59:49 +000011950 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011954fi
11955
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011956CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11958$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011959if test "$ac_cv_x87_double_rounding" = yes
11960then
11961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011963
11964fi
11965
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011966# ************************************
11967# * Check for mathematical functions *
11968# ************************************
11969
11970LIBS_SAVE=$LIBS
11971LIBS="$LIBS $LIBM"
11972
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011973for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11974do :
11975 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11976ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011977if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011978 cat >>confdefs.h <<_ACEOF
11979#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11980_ACEOF
11981
11982fi
11983done
11984
11985for ac_func in hypot lgamma log1p round tgamma
11986do :
11987 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11988ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011989if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011990 cat >>confdefs.h <<_ACEOF
11991#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11992_ACEOF
11993
11994fi
11995done
11996
11997ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11998"
Charles-François Natali6613c182011-11-27 12:41:06 +010011999if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012000 ac_have_decl=1
12001else
12002 ac_have_decl=0
12003fi
12004
12005cat >>confdefs.h <<_ACEOF
12006#define HAVE_DECL_ISINF $ac_have_decl
12007_ACEOF
12008ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12009"
Charles-François Natali6613c182011-11-27 12:41:06 +010012010if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012011 ac_have_decl=1
12012else
12013 ac_have_decl=0
12014fi
12015
12016cat >>confdefs.h <<_ACEOF
12017#define HAVE_DECL_ISNAN $ac_have_decl
12018_ACEOF
12019ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12020"
Charles-François Natali6613c182011-11-27 12:41:06 +010012021if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012022 ac_have_decl=1
12023else
12024 ac_have_decl=0
12025fi
12026
12027cat >>confdefs.h <<_ACEOF
12028#define HAVE_DECL_ISFINITE $ac_have_decl
12029_ACEOF
12030
12031
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012032# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12033# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12035$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012036if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012037 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012038else
12039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012041 ac_cv_tanh_preserves_zero_sign=no
12042else
Matthias Kloseb9621712010-04-24 17:59:49 +000012043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012044/* end confdefs.h. */
12045
12046#include <math.h>
12047#include <stdlib.h>
12048int main() {
12049 /* return 0 if either negative zeros don't exist
12050 on this platform or if negative zeros exist
12051 and tanh(-0.) == -0. */
12052 if (atan2(0., -1.) == atan2(-0., -1.) ||
12053 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12054 else exit(1);
12055}
12056
12057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012058if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012059 ac_cv_tanh_preserves_zero_sign=yes
12060else
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12064 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012065fi
12066
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012067fi
12068
Matthias Kloseb9621712010-04-24 17:59:49 +000012069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12070$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012071if test "$ac_cv_tanh_preserves_zero_sign" = yes
12072then
12073
Matthias Kloseb9621712010-04-24 17:59:49 +000012074$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012075
12076fi
12077
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012078if test "$ac_cv_func_log1p" = yes
12079then
12080 # On some versions of AIX, log1p(-0.) returns 0. instead of
12081 # -0. See issue #9920.
12082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12083$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012084 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012085 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012086else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012087
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012088 if test "$cross_compiling" = yes; then :
12089 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012090else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12092/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012093
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012094 #include <math.h>
12095 #include <stdlib.h>
12096 int main() {
12097 /* Fail if the signs of log1p(-0.) and -0. can be
12098 distinguished. */
12099 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12100 return 0;
12101 else
12102 return 1;
12103 }
12104
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012105_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012106if ac_fn_c_try_run "$LINENO"; then :
12107 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012108else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012109 ac_cv_log1p_drops_zero_sign=yes
12110fi
12111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12112 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012113fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012114
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012115fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012116
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12118$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12119fi
12120if test "$ac_cv_log1p_drops_zero_sign" = yes
12121then
12122
12123$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12124
12125fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012126
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012127LIBS=$LIBS_SAVE
12128
Mark Dickinsona614f042009-11-28 12:48:43 +000012129# For multiprocessing module, check that sem_open
12130# actually works. For FreeBSD versions <= 7.2,
12131# the kernel module that provides POSIX semaphores
12132# isn't loaded by default, so an attempt to call
12133# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12135$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012136if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012138else
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012140 ac_cv_posix_semaphores_enabled=yes
12141else
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012143/* end confdefs.h. */
12144
12145#include <unistd.h>
12146#include <fcntl.h>
12147#include <stdio.h>
12148#include <semaphore.h>
12149#include <sys/stat.h>
12150
12151int main(void) {
12152 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12153 if (a == SEM_FAILED) {
12154 perror("sem_open");
12155 return 1;
12156 }
12157 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012158 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012159 return 0;
12160}
12161
12162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012164 ac_cv_posix_semaphores_enabled=yes
12165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12169 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012170fi
12171
12172
Mark Dickinsona614f042009-11-28 12:48:43 +000012173fi
12174
Matthias Kloseb9621712010-04-24 17:59:49 +000012175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12176$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012177if test $ac_cv_posix_semaphores_enabled = no
12178then
12179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012181
12182fi
12183
Mark Dickinson10683072009-04-18 21:18:19 +000012184# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12186$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012187if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012189else
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012191 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012194/* end confdefs.h. */
12195
12196#include <unistd.h>
12197#include <fcntl.h>
12198#include <stdio.h>
12199#include <semaphore.h>
12200#include <sys/stat.h>
12201
12202int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012203 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012204 int count;
12205 int res;
12206 if(a==SEM_FAILED){
12207 perror("sem_open");
12208 return 1;
12209
12210 }
12211 res = sem_getvalue(a, &count);
12212 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012213 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012214 return res==-1 ? 1 : 0;
12215}
12216
Mark Dickinson10683072009-04-18 21:18:19 +000012217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012218if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012219 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012220else
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12224 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012225fi
12226
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012227
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012228fi
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12231$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012232if test $ac_cv_broken_sem_getvalue = yes
12233then
12234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012236
12237fi
12238
Mark Dickinsonbd792642009-03-18 20:06:12 +000012239# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12241$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012242# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012243if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012244 enableval=$enable_big_digits; case $enable_big_digits in
12245yes)
12246 enable_big_digits=30 ;;
12247no)
12248 enable_big_digits=15 ;;
1224915|30)
12250 ;;
12251*)
Charles-François Natali6613c182011-11-27 12:41:06 +010012252 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 +000012253esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12255$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012256
12257cat >>confdefs.h <<_ACEOF
12258#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12259_ACEOF
12260
12261
12262else
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12264$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012265fi
12266
12267
Guido van Rossumef2255b2000-03-10 22:30:29 +000012268# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012269ac_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 +010012270if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012271
12272
Matthias Kloseb9621712010-04-24 17:59:49 +000012273$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012274
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012275 wchar_h="yes"
12276
Guido van Rossumef2255b2000-03-10 22:30:29 +000012277else
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012279
12280fi
12281
Michael W. Hudson54241132001-12-07 15:38:26 +000012282
Martin v. Löwis11437992002-04-12 09:54:03 +000012283
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012284# determine wchar_t size
12285if test "$wchar_h" = yes
12286then
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12289# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12290# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12292$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012293if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012295else
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12297"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012298
Martin v. Löwis11437992002-04-12 09:54:03 +000012299else
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 if test "$ac_cv_type_wchar_t" = yes; then
12301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012303as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natali6613c182011-11-27 12:41:06 +010012304See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305 else
12306 ac_cv_sizeof_wchar_t=0
12307 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012309
Martin v. Löwis11437992002-04-12 09:54:03 +000012310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12312$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313
12314
12315
Martin v. Löwis11437992002-04-12 09:54:03 +000012316cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012317#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012318_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012319
Michael W. Hudson54241132001-12-07 15:38:26 +000012320
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012321fi
12322
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12324$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012325have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012327/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012328
12329#include <tcl.h>
12330#if TCL_UTF_MAX != 6
12331# error "NOT UCS4_TCL"
12332#endif
12333int
12334main ()
12335{
12336
12337 ;
12338 return 0;
12339}
12340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012342
12343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012345
12346 have_ucs4_tcl=yes
12347
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12351$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012352
Skip Montanaro6dead952003-09-25 14:50:04 +000012353# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012354if test "$wchar_h" = yes
12355then
12356 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12358$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012359 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012361else
12362
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012364 ac_cv_wchar_t_signed=yes
12365else
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012367/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012368
12369 #include <wchar.h>
12370 int main()
12371 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012372 /* Success: exit code 0 */
12373 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012374 }
12375
12376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012377if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012378 ac_cv_wchar_t_signed=yes
12379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12383 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012384fi
12385
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012386fi
12387
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12389$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390fi
12391
Matthias Kloseb9621712010-04-24 17:59:49 +000012392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12393$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012394
12395# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012396if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012397 withval=$with_wide_unicode;
12398if test "$withval" != no
12399then unicode_size="4"
12400else unicode_size="2"
12401fi
12402
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012403else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404
Georg Brandl52d168a2008-01-07 18:10:24 +000012405case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012406 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012407 *) unicode_size="2" ;;
12408esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012409
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012410fi
12411
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012412
12413
Georg Brandl52d168a2008-01-07 18:10:24 +000012414case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012415 4)
12416 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12417
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012418 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012419 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012421 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012422esac
12423
Michael W. Hudson54241132001-12-07 15:38:26 +000012424
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Georg Brandl52d168a2008-01-07 18:10:24 +000012426# wchar_t is only usable if it maps to an unsigned type
12427if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012428 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012429then
12430 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012431
Matthias Kloseb9621712010-04-24 17:59:49 +000012432$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012435
Georg Brandl52d168a2008-01-07 18:10:24 +000012436elif test "$ac_cv_sizeof_short" = "$unicode_size"
12437then
12438 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012440
Georg Brandl52d168a2008-01-07 18:10:24 +000012441elif test "$ac_cv_sizeof_long" = "$unicode_size"
12442then
12443 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012445
Georg Brandl52d168a2008-01-07 18:10:24 +000012446else
12447 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12450$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012451
12452# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12454$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012455if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012457else
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 ac_cv_c_bigendian=unknown
12459 # See if we're dealing with a universal compiler.
12460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12461/* end confdefs.h. */
12462#ifndef __APPLE_CC__
12463 not a universal capable compiler
12464 #endif
12465 typedef int dummy;
12466
Skip Montanaro6dead952003-09-25 14:50:04 +000012467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012468if ac_fn_c_try_compile "$LINENO"; then :
12469
12470 # Check for potential -arch flags. It is not universal unless
12471 # there are at least two -arch flags with different values.
12472 ac_arch=
12473 ac_prev=
12474 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12475 if test -n "$ac_prev"; then
12476 case $ac_word in
12477 i?86 | x86_64 | ppc | ppc64)
12478 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12479 ac_arch=$ac_word
12480 else
12481 ac_cv_c_bigendian=universal
12482 break
12483 fi
12484 ;;
12485 esac
12486 ac_prev=
12487 elif test "x$ac_word" = "x-arch"; then
12488 ac_prev=arch
12489 fi
12490 done
12491fi
12492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12493 if test $ac_cv_c_bigendian = unknown; then
12494 # See if sys/param.h defines the BYTE_ORDER macro.
12495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012496/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012497#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012499
Martin v. Löwis11437992002-04-12 09:54:03 +000012500int
12501main ()
12502{
Matthias Kloseb9621712010-04-24 17:59:49 +000012503#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12504 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12505 && LITTLE_ENDIAN)
12506 bogus endian macros
12507 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
12509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012514 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012516/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012517#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520int
12521main ()
12522{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012523#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 not big endian
12525 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012526
12527 ;
12528 return 0;
12529}
12530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012532 ac_cv_c_bigendian=yes
12533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012537fi
12538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12539 fi
12540 if test $ac_cv_c_bigendian = unknown; then
12541 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012543/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012544#include <limits.h>
12545
Martin v. Löwis11437992002-04-12 09:54:03 +000012546int
12547main ()
12548{
Matthias Kloseb9621712010-04-24 17:59:49 +000012549#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12550 bogus endian macros
12551 #endif
12552
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 ;
12554 return 0;
12555}
12556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012557if ac_fn_c_try_compile "$LINENO"; then :
12558 # It does; now see whether it defined to _BIG_ENDIAN or not.
12559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12560/* end confdefs.h. */
12561#include <limits.h>
12562
12563int
12564main ()
12565{
12566#ifndef _BIG_ENDIAN
12567 not big endian
12568 #endif
12569
12570 ;
12571 return 0;
12572}
12573_ACEOF
12574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012576else
Matthias Kloseb9621712010-04-24 17:59:49 +000012577 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12580fi
12581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12582 fi
12583 if test $ac_cv_c_bigendian = unknown; then
12584 # Compile a test program.
12585 if test "$cross_compiling" = yes; then :
12586 # Try to guess by grepping values from an object file.
12587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12588/* end confdefs.h. */
12589short int ascii_mm[] =
12590 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12591 short int ascii_ii[] =
12592 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12593 int use_ascii (int i) {
12594 return ascii_mm[i] + ascii_ii[i];
12595 }
12596 short int ebcdic_ii[] =
12597 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12598 short int ebcdic_mm[] =
12599 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12600 int use_ebcdic (int i) {
12601 return ebcdic_mm[i] + ebcdic_ii[i];
12602 }
12603 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012604
Matthias Kloseb9621712010-04-24 17:59:49 +000012605int
12606main ()
12607{
12608return use_ascii (foo) == use_ebcdic (foo);
12609 ;
12610 return 0;
12611}
12612_ACEOF
12613if ac_fn_c_try_compile "$LINENO"; then :
12614 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12615 ac_cv_c_bigendian=yes
12616 fi
12617 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12618 if test "$ac_cv_c_bigendian" = unknown; then
12619 ac_cv_c_bigendian=no
12620 else
12621 # finding both strings is unlikely to happen, but who knows?
12622 ac_cv_c_bigendian=unknown
12623 fi
12624 fi
12625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012627else
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012629/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012630$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012631int
12632main ()
12633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 /* Are we little or big endian? From Harbison&Steele. */
12636 union
12637 {
12638 long int l;
12639 char c[sizeof (long int)];
12640 } u;
12641 u.l = 1;
12642 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643
12644 ;
12645 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012646}
Martin v. Löwis11437992002-04-12 09:54:03 +000012647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012648if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012649 ac_cv_c_bigendian=no
12650else
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12654 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012656
Matthias Kloseb9621712010-04-24 17:59:49 +000012657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12660$as_echo "$ac_cv_c_bigendian" >&6; }
12661 case $ac_cv_c_bigendian in #(
12662 yes)
12663 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12664;; #(
12665 no)
12666 ;; #(
12667 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 ;; #(
12672 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012673 as_fn_error $? "unknown endianness
Charles-François Natali6613c182011-11-27 12:41:06 +010012674 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012676
Michael W. Hudson54241132001-12-07 15:38:26 +000012677
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012678# ABI version string for Python extension modules. This appears between the
12679# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12680# from the following attributes which affect the ABI of this Python build (in
12681# this order):
12682#
12683# * The Python implementation (always 'cpython-' for us)
12684# * The major and minor version numbers
12685# * --with-pydebug (adds a 'd')
12686# * --with-pymalloc (adds a 'm')
12687# * --with-wide-unicode (adds a 'u')
12688#
12689# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012690# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12691# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012692
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12694$as_echo_n "checking ABIFLAGS... " >&6; }
12695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12696$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12698$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012699SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12701$as_echo "$SOABI" >&6; }
12702
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12704$as_echo_n "checking LDVERSION... " >&6; }
12705LDVERSION='$(VERSION)$(ABIFLAGS)'
12706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12707$as_echo "$LDVERSION" >&6; }
12708
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012709# SO is the extension of shared libraries `(including the dot!)
12710# -- usually .so, .sl on HP-UX, .dll on Cygwin
12711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12712$as_echo_n "checking SO... " >&6; }
12713if test -z "$SO"
12714then
12715 case $ac_sys_system in
12716 hp*|HP*)
12717 case `uname -m` in
12718 ia64) SO=.so;;
12719 *) SO=.sl;;
12720 esac
12721 ;;
12722 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012723 Linux*|GNU*)
12724 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012725 *) SO=.so;;
12726 esac
12727else
12728 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012729 echo
12730 echo '====================================================================='
12731 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012732 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012733 echo '+ Do you really mean to change the extension for shared libraries? +'
12734 echo '+ Continuing in 10 seconds to let you to ponder. +'
12735 echo '+ +'
12736 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012737 sleep 10
12738fi
12739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12740$as_echo "$SO" >&6; }
12741
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012742# Check whether right shifting a negative integer extends the sign bit
12743# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12745$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012746if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012747 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012748else
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012751 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012752else
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012754/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012755
12756int main()
12757{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012758 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012759}
12760
Martin v. Löwis11437992002-04-12 09:54:03 +000012761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012762if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012763 ac_cv_rshift_extends_sign=yes
12764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012769fi
12770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771fi
12772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12774$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012775if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012776then
Martin v. Löwis11437992002-04-12 09:54:03 +000012777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012779
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012780fi
12781
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012782# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12784$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012785if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012787else
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
Matthias Kloseb9621712010-04-24 17:59:49 +000012789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012790/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012791#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012792int
12793main ()
12794{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012795
12796 FILE *f = fopen("/dev/null", "r");
12797 flockfile(f);
12798 getc_unlocked(f);
12799 funlockfile(f);
12800
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ;
12802 return 0;
12803}
12804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012805if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012806 ac_cv_have_getc_unlocked=yes
12807else
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 ac_cv_have_getc_unlocked=no
12809fi
12810rm -f core conftest.err conftest.$ac_objext \
12811 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12815$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012816if test "$ac_cv_have_getc_unlocked" = yes
12817then
Martin v. Löwis11437992002-04-12 09:54:03 +000012818
Matthias Kloseb9621712010-04-24 17:59:49 +000012819$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012820
12821fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012822
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012823# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012824# save the value of LIBS so we don't actually link Python with readline
12825LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012826
Gregory P. Smith18820942008-09-07 06:24:49 +000012827# On some systems we need to link readline to a termcap compatible
12828# library. NOTE: Keep the precedence of listed libraries synchronised
12829# with setup.py.
12830py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12832$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012833for py_libtermcap in "" ncursesw ncurses curses termcap; do
12834 if test -z "$py_libtermcap"; then
12835 READLINE_LIBS="-lreadline"
12836 else
12837 READLINE_LIBS="-lreadline -l$py_libtermcap"
12838 fi
12839 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012841/* end confdefs.h. */
12842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843/* Override any GCC internal prototype to avoid an error.
12844 Use char because int might match the return type of a GCC
12845 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012846#ifdef __cplusplus
12847extern "C"
12848#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012849char readline ();
12850int
12851main ()
12852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012854 ;
12855 return 0;
12856}
12857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012859 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012861rm -f core conftest.err conftest.$ac_objext \
12862 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012863 if test $py_cv_lib_readline = yes; then
12864 break
12865 fi
12866done
12867# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12868#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012869if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12871$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012872else
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12874$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012877
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012878fi
12879
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012880# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12882$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012883if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012885else
12886 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012887LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012889/* end confdefs.h. */
12890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891/* Override any GCC internal prototype to avoid an error.
12892 Use char because int might match the return type of a GCC
12893 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012894#ifdef __cplusplus
12895extern "C"
12896#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012897char rl_callback_handler_install ();
12898int
12899main ()
12900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012902 ;
12903 return 0;
12904}
12905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012906if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012907 ac_cv_lib_readline_rl_callback_handler_install=yes
12908else
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012911rm -f core conftest.err conftest.$ac_objext \
12912 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012913LIBS=$ac_check_lib_save_LIBS
12914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12916$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012917if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012918
Matthias Kloseb9621712010-04-24 17:59:49 +000012919$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012920
12921fi
12922
12923
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012924# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012926/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012927#include <readline/readline.h>
12928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012929if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012930 have_readline=yes
12931else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012932 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012933
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012934fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012935rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012936if test $have_readline = yes
12937then
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012939/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012940#include <readline/readline.h>
12941
12942_ACEOF
12943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012945
Matthias Kloseb9621712010-04-24 17:59:49 +000012946$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012947
12948fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012949rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012952/* end confdefs.h. */
12953#include <readline/readline.h>
12954
12955_ACEOF
12956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012957 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012960
12961fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012962rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012963
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012964fi
12965
Martin v. Löwis0daad592001-09-30 21:09:59 +000012966# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12968$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010012969if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012971else
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012973LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012977/* Override any GCC internal prototype to avoid an error.
12978 Use char because int might match the return type of a GCC
12979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012980#ifdef __cplusplus
12981extern "C"
12982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012983char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012984int
12985main ()
12986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ;
12989 return 0;
12990}
12991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012997rm -f core conftest.err conftest.$ac_objext \
12998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012999LIBS=$ac_check_lib_save_LIBS
13000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13002$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013003if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013006
Martin v. Löwis0daad592001-09-30 21:09:59 +000013007fi
13008
Michael W. Hudson54241132001-12-07 15:38:26 +000013009
Thomas Wouters89d996e2007-09-08 17:39:28 +000013010# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13012$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013013if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013015else
13016 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013017LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013019/* end confdefs.h. */
13020
13021/* Override any GCC internal prototype to avoid an error.
13022 Use char because int might match the return type of a GCC
13023 builtin and then its argument prototype would still apply. */
13024#ifdef __cplusplus
13025extern "C"
13026#endif
13027char rl_completion_display_matches_hook ();
13028int
13029main ()
13030{
13031return rl_completion_display_matches_hook ();
13032 ;
13033 return 0;
13034}
13035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013036if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013037 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13038else
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013041rm -f core conftest.err conftest.$ac_objext \
13042 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013043LIBS=$ac_check_lib_save_LIBS
13044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13046$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013047if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013050
13051fi
13052
13053
Martin v. Löwis0daad592001-09-30 21:09:59 +000013054# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13056$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013057if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013059else
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013061LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065/* Override any GCC internal prototype to avoid an error.
13066 Use char because int might match the return type of a GCC
13067 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013068#ifdef __cplusplus
13069extern "C"
13070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013071char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013072int
13073main ()
13074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 ;
13077 return 0;
13078}
13079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013080if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013082else
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013085rm -f core conftest.err conftest.$ac_objext \
13086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013087LIBS=$ac_check_lib_save_LIBS
13088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13090$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013091if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013094
Guido van Rossum353ae582001-07-10 16:45:32 +000013095fi
13096
Jack Jansendd19cf82001-12-06 22:36:17 +000013097
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013098# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013100/* end confdefs.h. */
13101#include <readline/readline.h>
13102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013103if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013104 have_readline=yes
13105else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013106 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013107
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013108fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013109rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013110if test $have_readline = yes
13111then
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013113/* end confdefs.h. */
13114#include <readline/readline.h>
13115
13116_ACEOF
13117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013118 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013121
13122fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013123rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013124
13125fi
13126
Martin v. Löwis82bca632006-02-10 20:49:30 +000013127# End of readline checks: restore LIBS
13128LIBS=$LIBS_no_readline
13129
Matthias Kloseb9621712010-04-24 17:59:49 +000013130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13131$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013132if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013134else
Martin v. Löwis11437992002-04-12 09:54:03 +000013135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013137 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013138else
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013140/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013141
13142int main()
13143{
13144 int val1 = nice(1);
13145 if (val1 != -1 && val1 == nice(2))
13146 exit(0);
13147 exit(1);
13148}
13149
Martin v. Löwis11437992002-04-12 09:54:03 +000013150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013151if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013152 ac_cv_broken_nice=yes
13153else
Matthias Kloseb9621712010-04-24 17:59:49 +000013154 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013158fi
13159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160fi
13161
Matthias Kloseb9621712010-04-24 17:59:49 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13163$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013164if test "$ac_cv_broken_nice" = yes
13165then
Martin v. Löwis11437992002-04-12 09:54:03 +000013166
Matthias Kloseb9621712010-04-24 17:59:49 +000013167$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013168
13169fi
13170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13172$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013173if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013177 ac_cv_broken_poll=no
13178else
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013180/* end confdefs.h. */
13181
13182#include <poll.h>
13183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013184int main()
13185{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013186 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013187 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013188
13189 close (42);
13190
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013191 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013192 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013193 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013194 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013195 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013196 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013197 return 1;
13198}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013199
13200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013201if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013202 ac_cv_broken_poll=yes
13203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013210fi
13211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13213$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013214if test "$ac_cv_broken_poll" = yes
13215then
13216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013218
13219fi
13220
Brett Cannon43802422005-02-10 20:48:03 +000013221# 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 +000013222# (which is not required by ISO C or UNIX spec) and/or if we support
13223# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013224ac_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 +000013225#include <$ac_cv_struct_tm>
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227"
Charles-François Natali6613c182011-11-27 12:41:06 +010013228if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013229
13230cat >>confdefs.h <<_ACEOF
13231#define HAVE_STRUCT_TM_TM_ZONE 1
13232_ACEOF
13233
13234
13235fi
13236
13237if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13238
Matthias Kloseb9621712010-04-24 17:59:49 +000013239$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013240
13241else
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13243"
Charles-François Natali6613c182011-11-27 12:41:06 +010013244if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013248fi
13249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013250cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013251#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013252_ACEOF
13253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13255$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013256if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013260/* end confdefs.h. */
13261#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013262#if !HAVE_DECL_TZNAME
13263extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013264#endif
13265
13266int
13267main ()
13268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013269return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013270 ;
13271 return 0;
13272}
13273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013274if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013275 ac_cv_var_tzname=yes
13276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013279rm -f core conftest.err conftest.$ac_objext \
13280 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13283$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013284 if test $ac_cv_var_tzname = yes; then
13285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013287
13288 fi
13289fi
13290
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013291
Martin v. Löwis1d459062005-03-14 21:23:33 +000013292# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13294$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013295if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013297else
13298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013300 ac_cv_working_tzset=no
13301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013303/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013304
13305#include <stdlib.h>
13306#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013307#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013308
13309#if HAVE_TZNAME
13310extern char *tzname[];
13311#endif
13312
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013313int main()
13314{
Brett Cannon18367812003-09-19 00:59:16 +000013315 /* Note that we need to ensure that not only does tzset(3)
13316 do 'something' with localtime, but it works as documented
13317 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013318 This includes making sure that tzname is set properly if
13319 tm->tm_zone does not exist since it is the alternative way
13320 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013321
13322 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013323 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013324 */
13325
Martin v. Löwis1d459062005-03-14 21:23:33 +000013326 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013327 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13328
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013329 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013330 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013331 if (localtime(&groundhogday)->tm_hour != 0)
13332 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013333#if HAVE_TZNAME
13334 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13335 if (strcmp(tzname[0], "UTC") ||
13336 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13337 exit(1);
13338#endif
Brett Cannon18367812003-09-19 00:59:16 +000013339
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013340 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013341 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013342 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013343 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013344#if HAVE_TZNAME
13345 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13346 exit(1);
13347#endif
Brett Cannon18367812003-09-19 00:59:16 +000013348
13349 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13350 tzset();
13351 if (localtime(&groundhogday)->tm_hour != 11)
13352 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013353#if HAVE_TZNAME
13354 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13355 exit(1);
13356#endif
13357
13358#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013359 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13360 exit(1);
13361 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13362 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013363#endif
Brett Cannon18367812003-09-19 00:59:16 +000013364
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013365 exit(0);
13366}
13367
13368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013370 ac_cv_working_tzset=yes
13371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13375 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013376fi
13377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378fi
13379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13381$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013382if test "$ac_cv_working_tzset" = yes
13383then
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013386
13387fi
13388
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013389# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13391$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013392if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013396/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013397#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013398int
13399main ()
13400{
13401
13402struct stat st;
13403st.st_mtim.tv_nsec = 1;
13404
13405 ;
13406 return 0;
13407}
13408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013410 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013411else
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13415fi
13416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13418$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013419if test "$ac_cv_stat_tv_nsec" = yes
13420then
13421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013423
13424fi
13425
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013426# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13428$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013429if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013431else
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013433/* end confdefs.h. */
13434#include <sys/stat.h>
13435int
13436main ()
13437{
13438
13439struct stat st;
13440st.st_mtimespec.tv_nsec = 1;
13441
13442 ;
13443 return 0;
13444}
13445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013447 ac_cv_stat_tv_nsec2=yes
13448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13452fi
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13455$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013456if test "$ac_cv_stat_tv_nsec2" = yes
13457then
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013460
13461fi
13462
Jack Jansen666b1e72001-10-31 12:11:48 +000013463# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13465$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013466if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013468else
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013470/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013471#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013472int
13473main ()
13474{
Jack Jansen666b1e72001-10-31 12:11:48 +000013475
13476 int rtn;
13477 rtn = mvwdelch(0,0,0);
13478
Martin v. Löwis11437992002-04-12 09:54:03 +000013479 ;
13480 return 0;
13481}
13482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013483if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013484 ac_cv_mvwdelch_is_expression=yes
13485else
Matthias Kloseb9621712010-04-24 17:59:49 +000013486 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13489fi
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13492$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013493
13494if test "$ac_cv_mvwdelch_is_expression" = yes
13495then
Martin v. Löwis11437992002-04-12 09:54:03 +000013496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013498
13499fi
13500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13502$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013503if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013505else
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013507/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013508#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013509int
13510main ()
13511{
Jack Jansen666b1e72001-10-31 12:11:48 +000013512
13513 WINDOW *w;
13514 w->_flags = 0;
13515
Martin v. Löwis11437992002-04-12 09:54:03 +000013516 ;
13517 return 0;
13518}
13519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013520if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013521 ac_cv_window_has_flags=yes
13522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13526fi
13527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13529$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013530
Jack Jansen666b1e72001-10-31 12:11:48 +000013531
13532if test "$ac_cv_window_has_flags" = yes
13533then
Martin v. Löwis11437992002-04-12 09:54:03 +000013534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013536
13537fi
13538
Matthias Kloseb9621712010-04-24 17:59:49 +000013539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13540$as_echo_n "checking for is_term_resized... " >&6; }
13541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013542/* end confdefs.h. */
13543#include <curses.h>
13544int
13545main ()
13546{
13547void *x=is_term_resized
13548 ;
13549 return 0;
13550}
13551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013555
Matthias Kloseb159a552010-04-25 21:00:44 +000013556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013557$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013558else
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13560$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013561
13562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13566$as_echo_n "checking for resize_term... " >&6; }
13567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013568/* end confdefs.h. */
13569#include <curses.h>
13570int
13571main ()
13572{
13573void *x=resize_term
13574 ;
13575 return 0;
13576}
13577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013578if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013581
Matthias Kloseb159a552010-04-25 21:00:44 +000013582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013583$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13586$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013587
13588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13592$as_echo_n "checking for resizeterm... " >&6; }
13593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013594/* end confdefs.h. */
13595#include <curses.h>
13596int
13597main ()
13598{
13599void *x=resizeterm
13600 ;
13601 return 0;
13602}
13603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013604if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013607
Matthias Kloseb159a552010-04-25 21:00:44 +000013608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013609$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13612$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013613
13614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13618$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013619
13620if test -r /dev/ptmx
13621then
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13623$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013626
Thomas Wouters89f507f2006-12-13 04:49:30 +000013627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13629$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013630fi
13631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13633$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013634
13635if test -r /dev/ptc
13636then
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13638$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013641
Thomas Wouters89f507f2006-12-13 04:49:30 +000013642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13644$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013645fi
13646
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013647if test "$have_long_long" = yes
13648then
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13650$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013651 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013655 ac_cv_have_long_long_format=no
13656else
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013658/* end confdefs.h. */
13659
13660 #include <stdio.h>
13661 #include <stddef.h>
13662 #include <string.h>
13663
13664 #ifdef HAVE_SYS_TYPES_H
13665 #include <sys/types.h>
13666 #endif
13667
13668 int main()
13669 {
13670 char buffer[256];
13671
13672 if (sprintf(buffer, "%lld", (long long)123) < 0)
13673 return 1;
13674 if (strcmp(buffer, "123"))
13675 return 1;
13676
13677 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13678 return 1;
13679 if (strcmp(buffer, "-123"))
13680 return 1;
13681
13682 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13683 return 1;
13684 if (strcmp(buffer, "123"))
13685 return 1;
13686
13687 return 0;
13688 }
13689
13690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013691if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013692 ac_cv_have_long_long_format=yes
13693else
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013698fi
13699
13700
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013701fi
13702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13704$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013705fi
13706
Mark Dickinson89d7d412009-12-31 20:50:59 +000013707if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013708then
13709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013711
13712fi
13713
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013714if test $ac_sys_system = Darwin
13715then
13716 LIBS="$LIBS -framework CoreFoundation"
13717fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13720$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013721if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013723else
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013725 ac_cv_have_size_t_format="cross -- assuming yes"
13726
Thomas Wouters477c8d52006-05-27 19:21:47 +000013727else
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013729/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013730
Thomas Wouters477c8d52006-05-27 19:21:47 +000013731#include <stdio.h>
13732#include <stddef.h>
13733#include <string.h>
13734
Christian Heimes2c181612007-12-17 20:04:13 +000013735#ifdef HAVE_SYS_TYPES_H
13736#include <sys/types.h>
13737#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013738
13739#ifdef HAVE_SSIZE_T
13740typedef ssize_t Py_ssize_t;
13741#elif SIZEOF_VOID_P == SIZEOF_LONG
13742typedef long Py_ssize_t;
13743#else
13744typedef int Py_ssize_t;
13745#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013746
Christian Heimes2c181612007-12-17 20:04:13 +000013747int main()
13748{
13749 char buffer[256];
13750
Thomas Wouters477c8d52006-05-27 19:21:47 +000013751 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13752 return 1;
13753
Thomas Wouters89f507f2006-12-13 04:49:30 +000013754 if (strcmp(buffer, "123"))
13755 return 1;
13756
13757 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13758 return 1;
13759
13760 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013761 return 1;
13762
13763 return 0;
13764}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013765
Thomas Wouters477c8d52006-05-27 19:21:47 +000013766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013767if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013768 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013769else
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013774fi
13775
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13778$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013779if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013782
13783fi
13784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013786#ifdef HAVE_SYS_TYPES_H
13787#include <sys/types.h>
13788#endif
13789#ifdef HAVE_SYS_SOCKET_H
13790#include <sys/socket.h>
13791#endif
13792
Matthias Kloseb9621712010-04-24 17:59:49 +000013793"
Charles-François Natali6613c182011-11-27 12:41:06 +010013794if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013795
Martin v. Löwis11437992002-04-12 09:54:03 +000013796else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013797
Matthias Kloseb9621712010-04-24 17:59:49 +000013798$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013799
13800fi
13801
Michael W. Hudson54241132001-12-07 15:38:26 +000013802
Matthias Kloseb9621712010-04-24 17:59:49 +000013803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13804$as_echo_n "checking for broken mbstowcs... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013805if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013806 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013807else
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013809 ac_cv_broken_mbstowcs=no
13810else
Matthias Kloseb9621712010-04-24 17:59:49 +000013811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013812/* end confdefs.h. */
13813
13814#include<stdlib.h>
13815int main() {
13816 size_t len = -1;
13817 const char *str = "text";
13818 len = mbstowcs(NULL, str, 0);
13819 return (len != 4);
13820}
13821
13822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013823if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013824 ac_cv_broken_mbstowcs=no
13825else
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013830fi
13831
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013832fi
13833
Matthias Kloseb9621712010-04-24 17:59:49 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13835$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013836if test "$ac_cv_broken_mbstowcs" = yes
13837then
13838
Matthias Kloseb9621712010-04-24 17:59:49 +000013839$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013840
13841fi
13842
Antoine Pitrou042b1282010-08-13 21:15:58 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13844$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Charles-François Natali6613c182011-11-27 12:41:06 +010013845if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013846 $as_echo_n "(cached) " >&6
13847else
13848 if test "$cross_compiling" = yes; then :
13849 ac_cv_computed_gotos=no
13850else
13851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13852/* end confdefs.h. */
13853
13854int main(int argc, char **argv)
13855{
13856 static void *targets[1] = { &&LABEL1 };
13857 goto LABEL2;
13858LABEL1:
13859 return 0;
13860LABEL2:
13861 goto *targets[0];
13862 return 1;
13863}
13864
13865_ACEOF
13866if ac_fn_c_try_run "$LINENO"; then :
13867 ac_cv_computed_gotos=yes
13868else
13869 ac_cv_computed_gotos=no
13870fi
13871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13872 conftest.$ac_objext conftest.beam conftest.$ac_ext
13873fi
13874
13875fi
13876
13877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13878$as_echo "$ac_cv_computed_gotos" >&6; }
13879if test "$ac_cv_computed_gotos" = yes
13880then
13881
13882$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13883
13884fi
13885
Antoine Pitroub52ec782009-01-25 16:34:23 +000013886# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13888$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013889
13890# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013891if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013892 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013893if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013894then
13895
Matthias Kloseb9621712010-04-24 17:59:49 +000013896$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13899$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013900fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013901if test "$withval" = no
13902then
13903
13904$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13905
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13907$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013908fi
13909
Antoine Pitrou042b1282010-08-13 21:15:58 +000013910else
13911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13912$as_echo "no value specified" >&6; }
13913fi
13914
Antoine Pitroub52ec782009-01-25 16:34:23 +000013915
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013916case $ac_sys_system in
13917AIX*)
13918
13919$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13920 ;;
13921esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013922
Michael W. Hudson54241132001-12-07 15:38:26 +000013923
Jesus Cea6a792292010-05-03 21:18:48 +000013924case $ac_sys_system in
Charles-François Natali6613c182011-11-27 12:41:06 +010013925 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 +000013926esac
13927
Gregory P. Smith138fa432010-12-13 08:00:52 +000013928ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Charles-François Natali6613c182011-11-27 12:41:06 +010013929if test "x$ac_cv_func_pipe2" = x""yes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013930
13931$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13932
13933fi
Jesus Cea6a792292010-05-03 21:18:48 +000013934
13935
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013936
13937
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013938for h in `(cd $srcdir;echo Python/thread_*.h)`
13939do
13940 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13941done
13942
Michael W. Hudson54241132001-12-07 15:38:26 +000013943
Neal Norwitzd24499d2005-12-18 21:36:39 +000013944SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13946$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013947for dir in $SRCDIRS; do
13948 if test ! -d $dir; then
13949 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013950 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013951done
Matthias Kloseb9621712010-04-24 17:59:49 +000013952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13953$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013954
Guido van Rossum627b2d71993-12-24 10:39:16 +000013955# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013956ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013957
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013958ac_config_files="$ac_config_files Modules/ld_so_aix"
13959
Martin v. Löwis11437992002-04-12 09:54:03 +000013960cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013961# This file is a shell script that caches the results of configure
13962# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013963# scripts and configure runs, see configure's option --config-cache.
13964# It is not useful on other systems. If it contains results you don't
13965# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013966#
Martin v. Löwis11437992002-04-12 09:54:03 +000013967# config.status only pays attention to the cache file if you give it
13968# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013969#
Skip Montanaro6dead952003-09-25 14:50:04 +000013970# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013971# loading this file, other *unset* `ac_cv_foo' will be assigned the
13972# following values.
13973
13974_ACEOF
13975
Guido van Rossumf78abae1997-01-21 22:02:36 +000013976# The following way of writing the cache mishandles newlines in values,
13977# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013979# Ultrix sh set writes to stderr and can't be redirected directly,
13980# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981(
13982 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13983 eval ac_val=\$$ac_var
13984 case $ac_val in #(
13985 *${as_nl}*)
13986 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13988$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989 esac
13990 case $ac_var in #(
13991 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13993 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013994 esac ;;
13995 esac
13996 done
13997
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14000 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 # `set' does not quote correctly, so add quotes: double-quote
14002 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014003 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014004 "s/'/'\\\\''/g;
14005 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014006 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 *)
14008 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014009 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014010 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011 esac |
14012 sort
14013) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014014 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014017 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14019 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014020 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14021 :end' >>confcache
14022if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14023 if test -w "$cache_file"; then
Charles-François Natali6613c182011-11-27 12:41:06 +010014024 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14026$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natali6613c182011-11-27 12:41:06 +010014027 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014028 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14030$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014031 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014032fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014033rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014034
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014035test "x$prefix" = xNONE && prefix=$ac_default_prefix
14036# Let make expand exec_prefix.
14037test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014038
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014039DEFS=-DHAVE_CONFIG_H
14040
Skip Montanaro6dead952003-09-25 14:50:04 +000014041ac_libobjs=
14042ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014043U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014044for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14045 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014046 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014048 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14049 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14051 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014052done
14053LIBOBJS=$ac_libobjs
14054
14055LTLIBOBJS=$ac_ltlibobjs
14056
14057
Martin v. Löwis11437992002-04-12 09:54:03 +000014058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059
Charles-François Natali6613c182011-11-27 12:41:06 +010014060: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000014061ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014062ac_clean_files_save=$ac_clean_files
14063ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014064{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14065$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14066as_write_fail=0
14067cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014068#! $SHELL
14069# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014070# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014071# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014072# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014073
Martin v. Löwis11437992002-04-12 09:54:03 +000014074debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014075ac_cs_recheck=false
14076ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078SHELL=\${CONFIG_SHELL-$SHELL}
14079export SHELL
14080_ASEOF
14081cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14082## -------------------- ##
14083## M4sh Initialization. ##
14084## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086# Be more Bourne compatible
14087DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014088if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 emulate sh
14090 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014092 # is contrary to our usage. Disable this feature.
14093 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 case `(set -o) 2>/dev/null` in #(
14097 *posix*) :
14098 set -o posix ;; #(
14099 *) :
14100 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014101esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014102fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014103
14104
Matthias Kloseb9621712010-04-24 17:59:49 +000014105as_nl='
14106'
14107export as_nl
14108# Printing a long string crashes Solaris 7 /usr/bin/printf.
14109as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14110as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14111as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14112# Prefer a ksh shell builtin over an external printf program on Solaris,
14113# but without wasting forks for bash or zsh.
14114if test -z "$BASH_VERSION$ZSH_VERSION" \
14115 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14116 as_echo='print -r --'
14117 as_echo_n='print -rn --'
14118elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14119 as_echo='printf %s\n'
14120 as_echo_n='printf %s'
14121else
14122 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14123 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14124 as_echo_n='/usr/ucb/echo -n'
14125 else
14126 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14127 as_echo_n_body='eval
14128 arg=$1;
14129 case $arg in #(
14130 *"$as_nl"*)
14131 expr "X$arg" : "X\\(.*\\)$as_nl";
14132 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14133 esac;
14134 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14135 '
14136 export as_echo_n_body
14137 as_echo_n='sh -c $as_echo_n_body as_echo'
14138 fi
14139 export as_echo_body
14140 as_echo='sh -c $as_echo_body as_echo'
14141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
14143# The user is always right.
14144if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 PATH_SEPARATOR=:
14146 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14147 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14148 PATH_SEPARATOR=';'
14149 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152
14153# IFS
14154# We need space, tab and new line, in precisely that order. Quoting is
14155# there to prevent editors from complaining about space-tab.
14156# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14157# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158IFS=" "" $as_nl"
14159
14160# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014161case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014162 *[\\/]* ) as_myself=$0 ;;
14163 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014164for as_dir in $PATH
14165do
14166 IFS=$as_save_IFS
14167 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14169 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172 ;;
14173esac
14174# We did not find ourselves, most probably we were run as `sh COMMAND'
14175# in which case we are not to be found in the path.
14176if test "x$as_myself" = x; then
14177 as_myself=$0
14178fi
14179if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14181 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182fi
14183
Matthias Kloseb9621712010-04-24 17:59:49 +000014184# Unset variables that we do not need and which cause bugs (e.g. in
14185# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14186# suppresses any "Segmentation fault" message there. '((' could
14187# trigger a bug in pdksh 5.2.14.
14188for as_var in BASH_ENV ENV MAIL MAILPATH
14189do eval test x\${$as_var+set} = xset \
14190 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014191done
14192PS1='$ '
14193PS2='> '
14194PS4='+ '
14195
14196# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014197LC_ALL=C
14198export LC_ALL
14199LANGUAGE=C
14200export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014201
Matthias Kloseb9621712010-04-24 17:59:49 +000014202# CDPATH.
14203(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14204
14205
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014206# as_fn_error STATUS ERROR [LINENO LOG_FD]
14207# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014208# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14209# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014210# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014211as_fn_error ()
14212{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014213 as_status=$1; test $as_status -eq 0 && as_status=1
14214 if test "$4"; then
14215 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14216 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014218 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 as_fn_exit $as_status
14220} # as_fn_error
14221
14222
14223# as_fn_set_status STATUS
14224# -----------------------
14225# Set $? to STATUS, without forking.
14226as_fn_set_status ()
14227{
14228 return $1
14229} # as_fn_set_status
14230
14231# as_fn_exit STATUS
14232# -----------------
14233# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14234as_fn_exit ()
14235{
14236 set +e
14237 as_fn_set_status $1
14238 exit $1
14239} # as_fn_exit
14240
14241# as_fn_unset VAR
14242# ---------------
14243# Portably unset VAR.
14244as_fn_unset ()
14245{
14246 { eval $1=; unset $1;}
14247}
14248as_unset=as_fn_unset
14249# as_fn_append VAR VALUE
14250# ----------------------
14251# Append the text in VALUE to the end of the definition contained in VAR. Take
14252# advantage of any shell optimizations that allow amortized linear growth over
14253# repeated appends, instead of the typical quadratic growth present in naive
14254# implementations.
14255if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14256 eval 'as_fn_append ()
14257 {
14258 eval $1+=\$2
14259 }'
14260else
14261 as_fn_append ()
14262 {
14263 eval $1=\$$1\$2
14264 }
14265fi # as_fn_append
14266
14267# as_fn_arith ARG...
14268# ------------------
14269# Perform arithmetic evaluation on the ARGs, and store the result in the
14270# global $as_val. Take advantage of shells that can avoid forks. The arguments
14271# must be portable across $(()) and expr.
14272if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14273 eval 'as_fn_arith ()
14274 {
14275 as_val=$(( $* ))
14276 }'
14277else
14278 as_fn_arith ()
14279 {
14280 as_val=`expr "$@" || test $? -eq 1`
14281 }
14282fi # as_fn_arith
14283
14284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285if expr a : '\(a\)' >/dev/null 2>&1 &&
14286 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14287 as_expr=expr
14288else
14289 as_expr=false
14290fi
14291
14292if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14293 as_basename=basename
14294else
14295 as_basename=false
14296fi
14297
Matthias Kloseb9621712010-04-24 17:59:49 +000014298if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14299 as_dirname=dirname
14300else
14301 as_dirname=false
14302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304as_me=`$as_basename -- "$0" ||
14305$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14306 X"$0" : 'X\(//\)$' \| \
14307 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014308$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014309 sed '/^.*\/\([^/][^/]*\)\/*$/{
14310 s//\1/
14311 q
14312 }
14313 /^X\/\(\/\/\)$/{
14314 s//\1/
14315 q
14316 }
14317 /^X\/\(\/\).*/{
14318 s//\1/
14319 q
14320 }
14321 s/.*/./; q'`
14322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323# Avoid depending upon Character Ranges.
14324as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14325as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14326as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14327as_cr_digits='0123456789'
14328as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329
14330ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014331case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 xy) ECHO_C='\c';;
14336 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14337 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338 esac;;
14339*)
14340 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014342
Martin v. Löwis11437992002-04-12 09:54:03 +000014343rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344if test -d conf$$.dir; then
14345 rm -f conf$$.dir/conf$$.file
14346else
14347 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014350if (echo >conf$$.file) 2>/dev/null; then
14351 if ln -s conf$$.file conf$$ 2>/dev/null; then
14352 as_ln_s='ln -s'
14353 # ... but there are two gotchas:
14354 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14355 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14356 # In both cases, we have to default to `cp -p'.
14357 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14358 as_ln_s='cp -p'
14359 elif ln conf$$.file conf$$ 2>/dev/null; then
14360 as_ln_s=ln
14361 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014362 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014364else
14365 as_ln_s='cp -p'
14366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14368rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
Matthias Kloseb9621712010-04-24 17:59:49 +000014370
14371# as_fn_mkdir_p
14372# -------------
14373# Create "$as_dir" as a directory, including parents if necessary.
14374as_fn_mkdir_p ()
14375{
14376
14377 case $as_dir in #(
14378 -*) as_dir=./$as_dir;;
14379 esac
14380 test -d "$as_dir" || eval $as_mkdir_p || {
14381 as_dirs=
14382 while :; do
14383 case $as_dir in #(
14384 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14385 *) as_qdir=$as_dir;;
14386 esac
14387 as_dirs="'$as_qdir' $as_dirs"
14388 as_dir=`$as_dirname -- "$as_dir" ||
14389$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14390 X"$as_dir" : 'X\(//\)[^/]' \| \
14391 X"$as_dir" : 'X\(//\)$' \| \
14392 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14393$as_echo X"$as_dir" |
14394 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14395 s//\1/
14396 q
14397 }
14398 /^X\(\/\/\)[^/].*/{
14399 s//\1/
14400 q
14401 }
14402 /^X\(\/\/\)$/{
14403 s//\1/
14404 q
14405 }
14406 /^X\(\/\).*/{
14407 s//\1/
14408 q
14409 }
14410 s/.*/./; q'`
14411 test -d "$as_dir" && break
14412 done
14413 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014414 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014415
14416
14417} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014418if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014420else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014421 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014422 as_mkdir_p=false
14423fi
14424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425if test -x / >/dev/null 2>&1; then
14426 as_test_x='test -x'
14427else
14428 if ls -dL / >/dev/null 2>&1; then
14429 as_ls_L_option=L
14430 else
14431 as_ls_L_option=
14432 fi
14433 as_test_x='
14434 eval sh -c '\''
14435 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 case $1 in #(
14439 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442 ???[sx]*):;;*)false;;esac;fi
14443 '\'' sh
14444 '
14445fi
14446as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014447
14448# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014449as_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 +000014450
14451# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014452as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
14454
Martin v. Löwis11437992002-04-12 09:54:03 +000014455exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014456## ----------------------------------- ##
14457## Main body of $CONFIG_STATUS script. ##
14458## ----------------------------------- ##
14459_ASEOF
14460test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
Matthias Kloseb9621712010-04-24 17:59:49 +000014462cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14463# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014464# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465# values after options handling.
14466ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014467This file was extended by python $as_me 3.2, which was
Charles-François Natali6613c182011-11-27 12:41:06 +010014468generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014469
14470 CONFIG_FILES = $CONFIG_FILES
14471 CONFIG_HEADERS = $CONFIG_HEADERS
14472 CONFIG_LINKS = $CONFIG_LINKS
14473 CONFIG_COMMANDS = $CONFIG_COMMANDS
14474 $ $0 $@
14475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476on `(hostname || uname -n) 2>/dev/null | sed 1q`
14477"
14478
Martin v. Löwis11437992002-04-12 09:54:03 +000014479_ACEOF
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481case $ac_config_files in *"
14482"*) set x $ac_config_files; shift; ac_config_files=$*;;
14483esac
14484
14485case $ac_config_headers in *"
14486"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14487esac
14488
14489
14490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014491# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014492config_files="$ac_config_files"
14493config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
Matthias Kloseb9621712010-04-24 17:59:49 +000014497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014498ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014499\`$as_me' instantiates files and other configuration actions
14500from templates according to the current configuration. Unless the files
14501and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014502
Matthias Kloseb9621712010-04-24 17:59:49 +000014503Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014504
14505 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 --config print configuration, then exit
14508 -q, --quiet, --silent
14509 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 -d, --debug don't remove temporary files
14511 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 --file=FILE[:TEMPLATE]
14513 instantiate the configuration file FILE
14514 --header=FILE[:TEMPLATE]
14515 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
14517Configuration files:
14518$config_files
14519
14520Configuration headers:
14521$config_headers
14522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014526cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14527ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014528ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014529python config.status 3.2
Charles-François Natali6613c182011-11-27 12:41:06 +010014530configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014532
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014533Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014534This config.status script is free software; the Free Software Foundation
14535gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536
14537ac_pwd='$ac_pwd'
14538srcdir='$srcdir'
14539INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014540test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014541_ACEOF
14542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14544# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014545ac_need_defaults=:
14546while test $# != 0
14547do
14548 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014549 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14551 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014552 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014553 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014554 --*=)
14555 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14556 ac_optarg=
14557 ac_shift=:
14558 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014560 ac_option=$1
14561 ac_optarg=$2
14562 ac_shift=shift
14563 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014564 esac
14565
Skip Montanaro6dead952003-09-25 14:50:04 +000014566 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014568 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14569 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 $as_echo "$ac_cs_version"; exit ;;
14572 --config | --confi | --conf | --con | --co | --c )
14573 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 debug=: ;;
14576 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014577 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 case $ac_optarg in
14579 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014580 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 esac
14582 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 ac_need_defaults=false;;
14584 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014585 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 case $ac_optarg in
14587 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14588 esac
14589 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591 --he | --h)
14592 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014593 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014594Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014597 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14598 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14599 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
14601 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014602 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014603Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014607
14608 esac
14609 shift
14610done
14611
Skip Montanaro6dead952003-09-25 14:50:04 +000014612ac_configure_extra_args=
14613
14614if $ac_cs_silent; then
14615 exec 6>/dev/null
14616 ac_configure_extra_args="$ac_configure_extra_args --silent"
14617fi
14618
14619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014620cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014621if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14623 shift
14624 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14625 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014627 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014628fi
14629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014632exec 5>>config.log
14633{
14634 echo
14635 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14636## Running $as_me. ##
14637_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014639} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014642cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014644
Matthias Kloseb9621712010-04-24 17:59:49 +000014645cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014646
14647# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014648for ac_config_target in $ac_config_targets
14649do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650 case $ac_config_target in
14651 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14652 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14653 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014654 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14655 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14657 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014658 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014659 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660
Charles-François Natali6613c182011-11-27 12:41:06 +010014661 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 esac
14663done
14664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665
Martin v. Löwis11437992002-04-12 09:54:03 +000014666# If the user did not use the arguments to specify the items to instantiate,
14667# then the envvar interface is used. Set only those that are not.
14668# We use the long form for the default assignment because of an extremely
14669# bizarre bug on SunOS 4.1.3.
14670if $ac_need_defaults; then
14671 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14672 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14673fi
14674
Skip Montanaro6dead952003-09-25 14:50:04 +000014675# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014677# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678# Hook for its removal unless debugging.
14679# Note that there is a small window in which the directory will not be cleaned:
14680# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014681$debug ||
14682{
Charles-François Natali6613c182011-11-27 12:41:06 +010014683 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684 trap 'exit_status=$?
Charles-François Natali6613c182011-11-27 12:41:06 +010014685 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014688}
Martin v. Löwis11437992002-04-12 09:54:03 +000014689# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014690
Martin v. Löwis11437992002-04-12 09:54:03 +000014691{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014692 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natali6613c182011-11-27 12:41:06 +010014693 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014694} ||
14695{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696 tmp=./conf$$-$RANDOM
14697 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014698} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014699
Matthias Kloseb9621712010-04-24 17:59:49 +000014700# Set up the scripts for CONFIG_FILES section.
14701# No need to generate them if there are no CONFIG_FILES.
14702# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014704
Matthias Kloseb9621712010-04-24 17:59:49 +000014705
14706ac_cr=`echo X | tr X '\015'`
14707# On cygwin, bash can eat \r inside `` if the user requested igncr.
14708# But we know of no other shell where ac_cr would be empty at this
14709# point, so we can use a bashism as a fallback.
14710if test "x$ac_cr" = x; then
14711 eval ac_cr=\$\'\\r\'
14712fi
14713ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14714if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014715 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014716else
14717 ac_cs_awk_cr=$ac_cr
14718fi
14719
Charles-François Natali6613c182011-11-27 12:41:06 +010014720echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014721_ACEOF
14722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723
Matthias Kloseb9621712010-04-24 17:59:49 +000014724{
14725 echo "cat >conf$$subs.awk <<_ACEOF" &&
14726 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14727 echo "_ACEOF"
14728} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014729 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14730ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731ac_delim='%!_!# '
14732for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014734 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14737 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738 break
14739 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014740 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014741 else
14742 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014743 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014744done
Matthias Kloseb9621712010-04-24 17:59:49 +000014745rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746
Matthias Kloseb9621712010-04-24 17:59:49 +000014747cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natali6613c182011-11-27 12:41:06 +010014748cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014750sed -n '
14751h
14752s/^/S["/; s/!.*/"]=/
14753p
14754g
14755s/^[^!]*!//
14756:repl
14757t repl
14758s/'"$ac_delim"'$//
14759t delim
14760:nl
14761h
14762s/\(.\{148\}\)..*/\1/
14763t more1
14764s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14765p
14766n
14767b repl
14768:more1
14769s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14770p
14771g
14772s/.\{148\}//
14773t nl
14774:delim
14775h
14776s/\(.\{148\}\)..*/\1/
14777t more2
14778s/["\\]/\\&/g; s/^/"/; s/$/"/
14779p
14780b
14781:more2
14782s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14783p
14784g
14785s/.\{148\}//
14786t delim
14787' <conf$$subs.awk | sed '
14788/^[^""]/{
14789 N
14790 s/\n//
14791}
14792' >>$CONFIG_STATUS || ac_write_fail=1
14793rm -f conf$$subs.awk
14794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14795_ACAWK
Charles-François Natali6613c182011-11-27 12:41:06 +010014796cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 for (key in S) S_is_set[key] = 1
14798 FS = ""
14799
14800}
14801{
14802 line = $ 0
14803 nfields = split(line, field, "@")
14804 substed = 0
14805 len = length(field[1])
14806 for (i = 2; i < nfields; i++) {
14807 key = field[i]
14808 keylen = length(key)
14809 if (S_is_set[key]) {
14810 value = S[key]
14811 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14812 len += length(value) + length(field[++i])
14813 substed = 1
14814 } else
14815 len += 1 + keylen
14816 }
14817
14818 print line
14819}
14820
14821_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14824if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14825 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14826else
14827 cat
Charles-François Natali6613c182011-11-27 12:41:06 +010014828fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014829 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014830_ACEOF
14831
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014832# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14833# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834# trailing colons and then remove the whole line if VPATH becomes empty
14835# (actually we leave an empty line to preserve line numbers).
14836if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014837 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14838h
14839s///
14840s/^/:/
14841s/[ ]*$/:/
14842s/:\$(srcdir):/:/g
14843s/:\${srcdir}:/:/g
14844s/:@srcdir@:/:/g
14845s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014847x
14848s/\(=[ ]*\).*/\1/
14849G
14850s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851s/^[^=]*=[ ]*$//
14852}'
14853fi
14854
Matthias Kloseb9621712010-04-24 17:59:49 +000014855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014856fi # test -n "$CONFIG_FILES"
14857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858# Set up the scripts for CONFIG_HEADERS section.
14859# No need to generate them if there are no CONFIG_HEADERS.
14860# This happens for instance with `./config.status Makefile'.
14861if test -n "$CONFIG_HEADERS"; then
Charles-François Natali6613c182011-11-27 12:41:06 +010014862cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014863BEGIN {
14864_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866# Transform confdefs.h into an awk script `defines.awk', embedded as
14867# here-document in config.status, that substitutes the proper values into
14868# config.h.in to produce config.h.
14869
14870# Create a delimiter string that does not exist in confdefs.h, to ease
14871# handling of long lines.
14872ac_delim='%!_!# '
14873for ac_last_try in false false :; do
Charles-François Natali6613c182011-11-27 12:41:06 +010014874 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14875 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014876 break
14877 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014878 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 else
14880 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14881 fi
14882done
14883
14884# For the awk script, D is an array of macro values keyed by name,
14885# likewise P contains macro parameters if any. Preserve backslash
14886# newline sequences.
14887
14888ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14889sed -n '
14890s/.\{148\}/&'"$ac_delim"'/g
14891t rset
14892:rset
14893s/^[ ]*#[ ]*define[ ][ ]*/ /
14894t def
14895d
14896:def
14897s/\\$//
14898t bsnl
14899s/["\\]/\\&/g
14900s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14901D["\1"]=" \3"/p
14902s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14903d
14904:bsnl
14905s/["\\]/\\&/g
14906s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14907D["\1"]=" \3\\\\\\n"\\/p
14908t cont
14909s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14910t cont
14911d
14912:cont
14913n
14914s/.\{148\}/&'"$ac_delim"'/g
14915t clear
14916:clear
14917s/\\$//
14918t bsnlc
14919s/["\\]/\\&/g; s/^/"/; s/$/"/p
14920d
14921:bsnlc
14922s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14923b cont
14924' <confdefs.h | sed '
14925s/'"$ac_delim"'/"\\\
14926"/g' >>$CONFIG_STATUS || ac_write_fail=1
14927
14928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14929 for (key in D) D_is_set[key] = 1
14930 FS = ""
14931}
14932/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14933 line = \$ 0
14934 split(line, arg, " ")
14935 if (arg[1] == "#") {
14936 defundef = arg[2]
14937 mac1 = arg[3]
14938 } else {
14939 defundef = substr(arg[1], 2)
14940 mac1 = arg[2]
14941 }
14942 split(mac1, mac2, "(") #)
14943 macro = mac2[1]
14944 prefix = substr(line, 1, index(line, defundef) - 1)
14945 if (D_is_set[macro]) {
14946 # Preserve the white space surrounding the "#".
14947 print prefix "define", macro P[macro] D[macro]
14948 next
14949 } else {
14950 # Replace #undef with comments. This is necessary, for example,
14951 # in the case of _POSIX_SOURCE, which is predefined and required
14952 # on some systems where configure will not decide to define it.
14953 if (defundef == "undef") {
14954 print "/*", prefix defundef, macro, "*/"
14955 next
14956 }
14957 }
14958}
14959{ print }
14960_ACAWK
14961_ACEOF
14962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014963 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014964fi # test -n "$CONFIG_HEADERS"
14965
14966
14967eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14968shift
14969for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970do
14971 case $ac_tag in
14972 :[FHLC]) ac_mode=$ac_tag; continue;;
14973 esac
14974 case $ac_mode$ac_tag in
14975 :[FHL]*:*);;
Charles-François Natali6613c182011-11-27 12:41:06 +010014976 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977 :[FH]-) ac_tag=-:-;;
14978 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14979 esac
14980 ac_save_IFS=$IFS
14981 IFS=:
14982 set x $ac_tag
14983 IFS=$ac_save_IFS
14984 shift
14985 ac_file=$1
14986 shift
14987
14988 case $ac_mode in
14989 :L) ac_source=$1;;
14990 :[FH])
14991 ac_file_inputs=
14992 for ac_f
14993 do
14994 case $ac_f in
Charles-François Natali6613c182011-11-27 12:41:06 +010014995 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996 *) # Look for the file first in the build tree, then in the source tree
14997 # (if the path is not absolute). The absolute path cannot be DOS-style,
14998 # because $ac_f cannot contain `:'.
14999 test -f "$ac_f" ||
15000 case $ac_f in
15001 [\\/$]*) false;;
15002 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15003 esac ||
Charles-François Natali6613c182011-11-27 12:41:06 +010015004 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015006 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15007 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008 done
15009
15010 # Let's still pretend it is `configure' which instantiates (i.e., don't
15011 # use $as_me), people would be surprised to read:
15012 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 configure_input='Generated from '`
15014 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15015 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016 if test x"$ac_file" != x-; then
15017 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15019$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 # Neutralize special characters interpreted by sed in replacement strings.
15022 case $configure_input in #(
15023 *\&* | *\|* | *\\* )
15024 ac_sed_conf_input=`$as_echo "$configure_input" |
15025 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15026 *) ac_sed_conf_input=$configure_input;;
15027 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028
15029 case $ac_tag in
Charles-François Natali6613c182011-11-27 12:41:06 +010015030 *:-:* | *:-) cat >"$tmp/stdin" \
15031 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032 esac
15033 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 esac
15035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015037$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015038 X"$ac_file" : 'X\(//\)[^/]' \| \
15039 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015041$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15043 s//\1/
15044 q
15045 }
15046 /^X\(\/\/\)[^/].*/{
15047 s//\1/
15048 q
15049 }
15050 /^X\(\/\/\)$/{
15051 s//\1/
15052 q
15053 }
15054 /^X\(\/\).*/{
15055 s//\1/
15056 q
15057 }
15058 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 ac_builddir=.
15061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062case "$ac_dir" in
15063.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15064*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068 case $ac_top_builddir_sub in
15069 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15070 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15071 esac ;;
15072esac
15073ac_abs_top_builddir=$ac_pwd
15074ac_abs_builddir=$ac_pwd$ac_dir_suffix
15075# for backward compatibility:
15076ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015077
15078case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081 ac_top_srcdir=$ac_top_builddir_sub
15082 ac_abs_top_srcdir=$ac_pwd ;;
15083 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015084 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085 ac_top_srcdir=$srcdir
15086 ac_abs_top_srcdir=$srcdir ;;
15087 *) # Relative name.
15088 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15089 ac_top_srcdir=$ac_top_build_prefix$srcdir
15090 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015091esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015093
Martin v. Löwis11437992002-04-12 09:54:03 +000015094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095 case $ac_mode in
15096 :F)
15097 #
15098 # CONFIG_FILE
15099 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015100
15101 case $INSTALL in
15102 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015105_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015106
Matthias Kloseb9621712010-04-24 17:59:49 +000015107cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108# If the template does not know about datarootdir, expand it.
15109# FIXME: This hack should be removed a few years after 2.60.
15110ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015111ac_sed_dataroot='
15112/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113 p
15114 q
15115}
15116/@datadir@/p
15117/@docdir@/p
15118/@infodir@/p
15119/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015120/@mandir@/p'
15121case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122*datarootdir*) ac_datarootdir_seen=yes;;
15123*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15125$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015127cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128 ac_datarootdir_hack='
15129 s&@datadir@&$datadir&g
15130 s&@docdir@&$docdir&g
15131 s&@infodir@&$infodir&g
15132 s&@localedir@&$localedir&g
15133 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135esac
15136_ACEOF
15137
15138# Neutralize VPATH when `$srcdir' = `.'.
15139# Shell code in configure.ac might set extrasub.
15140# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015141cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15142ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015143$extrasub
15144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015145cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015146:t
15147/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015148s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015150s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151s&@srcdir@&$ac_srcdir&;t t
15152s&@abs_srcdir@&$ac_abs_srcdir&;t t
15153s&@top_srcdir@&$ac_top_srcdir&;t t
15154s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15155s&@builddir@&$ac_builddir&;t t
15156s&@abs_builddir@&$ac_abs_builddir&;t t
15157s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15158s&@INSTALL@&$ac_INSTALL&;t t
15159$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015160"
Charles-François Natali6613c182011-11-27 12:41:06 +010015161eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15162 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natali6613c182011-11-27 12:41:06 +010015165 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15166 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 { $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 +000015168which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015169$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015170which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015171
Charles-François Natali6613c182011-11-27 12:41:06 +010015172 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 case $ac_file in
Charles-François Natali6613c182011-11-27 12:41:06 +010015174 -) cat "$tmp/out" && rm -f "$tmp/out";;
15175 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015176 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015177 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178 ;;
15179 :H)
15180 #
15181 # CONFIG_HEADER
15182 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 {
15185 $as_echo "/* $configure_input */" \
Charles-François Natali6613c182011-11-27 12:41:06 +010015186 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15187 } >"$tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015188 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natali6613c182011-11-27 12:41:06 +010015189 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015190 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15191$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 rm -f "$ac_file"
Charles-François Natali6613c182011-11-27 12:41:06 +010015194 mv "$tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015195 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 fi
15197 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015198 $as_echo "/* $configure_input */" \
Charles-François Natali6613c182011-11-27 12:41:06 +010015199 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015200 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204
15205 esac
15206
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015207
15208 case $ac_file$ac_mode in
15209 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15210
15211 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212done # for ac_tag
15213
Guido van Rossum627b2d71993-12-24 10:39:16 +000015214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015216_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015217ac_clean_files=$ac_clean_files_save
15218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015220 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015221
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
15223# configure is writing to config.log, and then calls config.status.
15224# config.status does its own redirection, appending to config.log.
15225# Unfortunately, on DOS this fails, as config.log is still kept open
15226# by configure, so config.status won't be able to write to it; its
15227# output is simply discarded. So we exec the FD to /dev/null,
15228# effectively closing config.log, so it can be properly (re)opened and
15229# appended to by config.status. When coming back to configure, we
15230# need to make the FD available again.
15231if test "$no_create" != yes; then
15232 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015233 ac_config_status_args=
15234 test "$silent" = yes &&
15235 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015237 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015238 exec 5>>config.log
15239 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15240 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015241 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015242fi
15243if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15245$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015246fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015247
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015248
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015249echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015250if test ! -f Modules/Setup
15251then
15252 cp $srcdir/Modules/Setup.dist Modules/Setup
15253fi
15254
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015255echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015256if test ! -f Modules/Setup.local
15257then
15258 echo "# Edit this file for local setup changes" >Modules/Setup.local
15259fi
15260
15261echo "creating Makefile"
15262$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15263 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015264 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015265mv config.c Modules