blob: 21c9d1703cc66723cc99e7a6d794a670e2ff784d [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 Natalibeed47e2011-07-22 23:48:44 +02004# 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 Natalibeed47e2011-07-22 23:48:44 +0200224 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 Natalibeed47e2011-07-22 23:48:44 +02001181 : ${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 Natalibeed47e2011-07-22 23:48:44 +02001519generated 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 Natalibeed47e2011-07-22 23:48:44 +02001565 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 Natalibeed47e2011-07-22 23:48:44 +02001611 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 Natalibeed47e2011-07-22 23:48:44 +02001648 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 Natalibeed47e2011-07-22 23:48:44 +02001661 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 Natalibeed47e2011-07-22 23:48:44 +02001664if 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 Natalibeed47e2011-07-22 23:48:44 +02001731if 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 Natalibeed47e2011-07-22 23:48:44 +02001740 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 Natalibeed47e2011-07-22 23:48:44 +02001781 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 Natalibeed47e2011-07-22 23:48:44 +02001795if 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 Natalibeed47e2011-07-22 23:48:44 +02001813 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 Natalibeed47e2011-07-22 23:48:44 +02001826if 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 Natalibeed47e2011-07-22 23:48:44 +02001867 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 Natalibeed47e2011-07-22 23:48:44 +02001880if 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 Natalibeed47e2011-07-22 23:48:44 +02001920 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 Natalibeed47e2011-07-22 23:48:44 +02001933if 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 Natalibeed47e2011-07-22 23:48:44 +02001994 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 Natalibeed47e2011-07-22 23:48:44 +02002171 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 Natalibeed47e2011-07-22 23:48:44 +02002184if 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 Natalibeed47e2011-07-22 23:48:44 +02002239 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 Natalibeed47e2011-07-22 23:48:44 +02002252if 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 Natalibeed47e2011-07-22 23:48:44 +02002296 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 Natalibeed47e2011-07-22 23:48:44 +02002311if 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 Natalibeed47e2011-07-22 23:48:44 +02002342 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 Natalibeed47e2011-07-22 23:48:44 +02002350generated 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 Natalibeed47e2011-07-22 23:48:44 +02002608See \`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
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002992 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002993 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002994 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002995 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002996 esac
2997fi
Guido van Rossum91922671997-10-09 20:24:13 +00002998
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002999# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3000# disable features if it is defined, without any means to access these
3001# features as extensions. For these systems, we skip the definition of
3002# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3003# some feature, make sure there is no alternative way to access this
3004# feature. Also, when using wildcards, make sure you have verified the
3005# need for not defining _XOPEN_SOURCE on all systems matching the
3006# wildcard, and that the wildcard does not include future systems
3007# (which may remove their limitations).
3008case $ac_sys_system/$ac_sys_release in
3009 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3010 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003011 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003012 # In addition, Stefan Krah confirms that issue #1244610 exists through
3013 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003014 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003015 define_xopen_source=no
3016 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3017 # also defined. This can be overridden by defining _BSD_SOURCE
3018 # As this has a different meaning on Linux, only define it on OpenBSD
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003021
3022 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003023 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003024 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3025 # also defined. This can be overridden by defining _BSD_SOURCE
3026 # As this has a different meaning on Linux, only define it on OpenBSD
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003029
3030 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003031 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3032 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3033 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003034 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 +00003035 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003036 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3037 # request to enable features supported by the standard as a request
3038 # to disable features not supported by the standard. The best way
3039 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3040 # entirely and define __EXTENSIONS__ instead.
3041 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003042 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003043 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3044 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003045 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003046 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003047 define_xopen_source=no;;
3048 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003049 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003050 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003051 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003052 # On FreeBSD 4, the math functions C89 does not cover are never defined
3053 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3054 FreeBSD/4.*)
3055 define_xopen_source=no;;
3056 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3057 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3058 # identifies itself as Darwin/7.*
3059 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3060 # disables platform specific features beyond repair.
3061 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3062 # has no effect, don't bother defining them
3063 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003064 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003065 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003066 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003067 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3068 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3069 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003070 AIX/4)
3071 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003072 AIX/5)
3073 if test `uname -r` -eq 1; then
3074 define_xopen_source=no
3075 fi
3076 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003077 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3078 # defining NI_NUMERICHOST.
3079 QNX/6.3.2)
3080 define_xopen_source=no
3081 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003082
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003083esac
3084
3085if test $define_xopen_source = yes
3086then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003089
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003090
3091 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3092 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3093 # several APIs are not declared. Since this is also needed in some
3094 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003095
Matthias Kloseb9621712010-04-24 17:59:49 +00003096$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003097
3098
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003099
Matthias Kloseb9621712010-04-24 17:59:49 +00003100$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003101
3102
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003103fi
3104
Guido van Rossum91922671997-10-09 20:24:13 +00003105#
3106# SGI compilers allow the specification of the both the ABI and the
3107# ISA on the command line. Depending on the values of these switches,
3108# different and often incompatable code will be generated.
3109#
3110# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3111# thus supply support for various ABI/ISA combinations. The MACHDEP
3112# variable is also adjusted.
3113#
3114
3115if test ! -z "$SGI_ABI"
3116then
3117 CC="cc $SGI_ABI"
3118 LDFLAGS="$SGI_ABI $LDFLAGS"
3119 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3122$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003123
Jack Jansen6b08a402004-06-03 12:41:45 +00003124# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3125# it may influence the way we can build extensions, so distutils
3126# needs to check it
3127
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128
Jack Jansen6b08a402004-06-03 12:41:45 +00003129CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003130EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003131
Matthias Kloseb9621712010-04-24 17:59:49 +00003132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3133$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003134ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3136$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003137
Guido van Rossum627b2d71993-12-24 10:39:16 +00003138# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003139
3140# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3141# for debug/optimization stuff. BASECFLAGS is for flags that are required
3142# just to get things to compile and link. Users are free to override OPT
3143# when running configure or make. The build should not break if they do.
3144# BASECFLAGS should generally not be messed with, however.
3145
3146# XXX shouldn't some/most/all of this code be merged with the stuff later
3147# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3149$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003152if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003154 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003155 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003156 without_gcc=yes;;
3157 yes) CC=gcc
3158 without_gcc=no;;
3159 *) CC=$withval
3160 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003161 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003162else
Martin v. Löwis11437992002-04-12 09:54:03 +00003163
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003164 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003165 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003166 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003167 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003168 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169fi
3170
Matthias Kloseb9621712010-04-24 17:59:49 +00003171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3172$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003173
Guido van Rossum8b131c51995-03-09 14:10:13 +00003174# If the user switches compilers, we can't believe the cache
3175if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3176then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003177 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003178(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003179fi
3180
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003181# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3182# when the compiler supports them, but we don't always want -O2, and
3183# we set -g later.
3184if test -z "$CFLAGS"; then
3185 CFLAGS=
3186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003187ac_ext=c
3188ac_cpp='$CPP $CPPFLAGS'
3189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3191ac_compiler_gnu=$ac_cv_c_compiler_gnu
3192if test -n "$ac_tool_prefix"; then
3193 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3194set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3196$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003197if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003198 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003199else
3200 if test -n "$CC"; then
3201 ac_cv_prog_CC="$CC" # Let the user override the test.
3202else
Martin v. Löwis11437992002-04-12 09:54:03 +00003203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3204for as_dir in $PATH
3205do
3206 IFS=$as_save_IFS
3207 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003208 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003209 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 +00003210 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003211 $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 +00003212 break 2
3213 fi
3214done
Matthias Kloseb9621712010-04-24 17:59:49 +00003215 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003217
Jack Jansendd19cf82001-12-06 22:36:17 +00003218fi
3219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003220CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003221if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3223$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003224else
Matthias Kloseb9621712010-04-24 17:59:49 +00003225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3226$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003227fi
3228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229
Martin v. Löwis11437992002-04-12 09:54:03 +00003230fi
3231if test -z "$ac_cv_prog_CC"; then
3232 ac_ct_CC=$CC
3233 # Extract the first word of "gcc", so it can be a program name with args.
3234set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3236$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003237if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003238 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003239else
3240 if test -n "$ac_ct_CC"; then
3241 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3242else
3243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3244for as_dir in $PATH
3245do
3246 IFS=$as_save_IFS
3247 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003248 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249 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 +00003250 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003251 $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 +00003252 break 2
3253 fi
3254done
Matthias Kloseb9621712010-04-24 17:59:49 +00003255 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003257
3258fi
3259fi
3260ac_ct_CC=$ac_cv_prog_ac_ct_CC
3261if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3263$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003264else
Matthias Kloseb9621712010-04-24 17:59:49 +00003265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3266$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003267fi
3268
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003269 if test "x$ac_ct_CC" = x; then
3270 CC=""
3271 else
3272 case $cross_compiling:$ac_tool_warned in
3273yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003274{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3275$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003276ac_tool_warned=yes ;;
3277esac
3278 CC=$ac_ct_CC
3279 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003280else
3281 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003282fi
3283
Jack Jansendd19cf82001-12-06 22:36:17 +00003284if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285 if test -n "$ac_tool_prefix"; then
3286 # 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 +00003287set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3289$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003290if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003291 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003292else
3293 if test -n "$CC"; then
3294 ac_cv_prog_CC="$CC" # Let the user override the test.
3295else
Martin v. Löwis11437992002-04-12 09:54:03 +00003296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3297for as_dir in $PATH
3298do
3299 IFS=$as_save_IFS
3300 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003302 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 +00003303 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003304 $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 +00003305 break 2
3306 fi
3307done
Matthias Kloseb9621712010-04-24 17:59:49 +00003308 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003309IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003310
3311fi
3312fi
3313CC=$ac_cv_prog_CC
3314if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3316$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003317else
Matthias Kloseb9621712010-04-24 17:59:49 +00003318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3319$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003320fi
3321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003322
Martin v. Löwis11437992002-04-12 09:54:03 +00003323 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003324fi
3325if test -z "$CC"; then
3326 # Extract the first word of "cc", so it can be a program name with args.
3327set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3329$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003330if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003331 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003332else
3333 if test -n "$CC"; then
3334 ac_cv_prog_CC="$CC" # Let the user override the test.
3335else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003336 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3338for as_dir in $PATH
3339do
3340 IFS=$as_save_IFS
3341 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003342 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343 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 +00003344 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3345 ac_prog_rejected=yes
3346 continue
3347 fi
3348 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003349 $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 +00003350 break 2
3351 fi
3352done
Matthias Kloseb9621712010-04-24 17:59:49 +00003353 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003354IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003355
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003356if test $ac_prog_rejected = yes; then
3357 # We found a bogon in the path, so make sure we never use it.
3358 set dummy $ac_cv_prog_CC
3359 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361 # We chose a different compiler from the bogus one.
3362 # However, it has the same basename, so the bogon will be chosen
3363 # first if we set CC to just the basename; use the full file name.
3364 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003365 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366 fi
3367fi
3368fi
3369fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003370CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003371if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3373$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003374else
Matthias Kloseb9621712010-04-24 17:59:49 +00003375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3376$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003377fi
3378
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003379
Martin v. Löwis11437992002-04-12 09:54:03 +00003380fi
3381if test -z "$CC"; then
3382 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003383 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003384 do
3385 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3386set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3388$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003389if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003390 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003391else
3392 if test -n "$CC"; then
3393 ac_cv_prog_CC="$CC" # Let the user override the test.
3394else
Martin v. Löwis11437992002-04-12 09:54:03 +00003395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3396for as_dir in $PATH
3397do
3398 IFS=$as_save_IFS
3399 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003400 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003401 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 +00003402 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003403 $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 +00003404 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003405 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003406done
Matthias Kloseb9621712010-04-24 17:59:49 +00003407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003408IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003409
3410fi
3411fi
3412CC=$ac_cv_prog_CC
3413if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3415$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003416else
Matthias Kloseb9621712010-04-24 17:59:49 +00003417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3418$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003419fi
3420
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003421
Martin v. Löwis11437992002-04-12 09:54:03 +00003422 test -n "$CC" && break
3423 done
3424fi
3425if test -z "$CC"; then
3426 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003427 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003428do
3429 # Extract the first word of "$ac_prog", so it can be a program name with args.
3430set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3432$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003433if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003434 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003435else
3436 if test -n "$ac_ct_CC"; then
3437 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3438else
3439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3440for as_dir in $PATH
3441do
3442 IFS=$as_save_IFS
3443 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003444 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445 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 +00003446 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003447 $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 +00003448 break 2
3449 fi
3450done
Matthias Kloseb9621712010-04-24 17:59:49 +00003451 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003453
Martin v. Löwis11437992002-04-12 09:54:03 +00003454fi
3455fi
3456ac_ct_CC=$ac_cv_prog_ac_ct_CC
3457if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3459$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003460else
Matthias Kloseb9621712010-04-24 17:59:49 +00003461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3462$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 test -n "$ac_ct_CC" && break
3467done
Michael W. Hudson54241132001-12-07 15:38:26 +00003468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 if test "x$ac_ct_CC" = x; then
3470 CC=""
3471 else
3472 case $cross_compiling:$ac_tool_warned in
3473yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003474{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3475$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476ac_tool_warned=yes ;;
3477esac
3478 CC=$ac_ct_CC
3479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003480fi
3481
3482fi
3483
3484
Matthias Kloseb9621712010-04-24 17:59:49 +00003485test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003487as_fn_error $? "no acceptable C compiler found in \$PATH
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003488See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003489
3490# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003491$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3492set X $ac_compile
3493ac_compiler=$2
3494for ac_option in --version -v -V -qversion; do
3495 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003496case "(($ac_try" in
3497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3498 *) ac_try_echo=$ac_try;;
3499esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3501$as_echo "$ac_try_echo"; } >&5
3502 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003504 if test -s conftest.err; then
3505 sed '10a\
3506... rest of stderr output deleted ...
3507 10q' conftest.err >conftest.er1
3508 cat conftest.er1 >&5
3509 fi
3510 rm -f conftest.er1 conftest.err
3511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3512 test $ac_status = 0; }
3513done
Martin v. Löwis11437992002-04-12 09:54:03 +00003514
Matthias Kloseb9621712010-04-24 17:59:49 +00003515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003516/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003517
Martin v. Löwis11437992002-04-12 09:54:03 +00003518int
3519main ()
3520{
3521
3522 ;
3523 return 0;
3524}
3525_ACEOF
3526ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003527ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003528# Try to create an executable without -o first, disregard a.out.
3529# It will help us diagnose broken compilers, and finding out an intuition
3530# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3532$as_echo_n "checking whether the C compiler works... " >&6; }
3533ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3534
3535# The possible output files:
3536ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538ac_rmfiles=
3539for ac_file in $ac_files
3540do
3541 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003542 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3544 esac
3545done
3546rm -f $ac_rmfiles
3547
Matthias Kloseb9621712010-04-24 17:59:49 +00003548if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003549case "(($ac_try" in
3550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3551 *) ac_try_echo=$ac_try;;
3552esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3554$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3558 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3560# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3561# in a Makefile. We should not override ac_cv_exeext if it was cached,
3562# so that the user can short-circuit this test for compilers unknown to
3563# Autoconf.
3564for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003565do
3566 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003569 ;;
3570 [ab].out )
3571 # We found the default executable, but exeext='' is most
3572 # certainly right.
3573 break;;
3574 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576 then :; else
3577 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3578 fi
3579 # We set ac_cv_exeext here because the later test for it is not
3580 # safe: cross compilers may not add the suffix if given an `-o'
3581 # argument, so we may need to know it at that point already.
3582 # Even if this section looks crufty: it has the advantage of
3583 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003584 break;;
3585 * )
3586 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 esac
3588done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589test "$ac_cv_exeext" = no && ac_cv_exeext=
3590
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003591else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592 ac_file=''
3593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003594if test -z "$ac_file"; then :
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3596$as_echo "no" >&6; }
3597$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003598sed 's/^/| /' conftest.$ac_ext >&5
3599
Matthias Kloseb9621712010-04-24 17:59:49 +00003600{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003602as_fn_error 77 "C compiler cannot create executables
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003603See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003604else
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3606$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3609$as_echo_n "checking for C compiler default output file name... " >&6; }
3610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3611$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003612ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003613
Matthias Kloseb9621712010-04-24 17:59:49 +00003614rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003615ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3617$as_echo_n "checking for suffix of executables... " >&6; }
3618if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619case "(($ac_try" in
3620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3621 *) ac_try_echo=$ac_try;;
3622esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003623eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3624$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3628 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003629 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3630# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3631# work properly (i.e., refer to `conftest.exe'), while it won't with
3632# `rm'.
3633for ac_file in conftest.exe conftest conftest.*; do
3634 test -f "$ac_file" || continue
3635 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003637 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3638 break;;
3639 * ) break;;
3640 esac
3641done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003642else
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003645as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003646See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003648rm -f conftest conftest$ac_cv_exeext
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3650$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003651
3652rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003653EXEEXT=$ac_cv_exeext
3654ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3656/* end confdefs.h. */
3657#include <stdio.h>
3658int
3659main ()
3660{
3661FILE *f = fopen ("conftest.out", "w");
3662 return ferror (f) || fclose (f) != 0;
3663
3664 ;
3665 return 0;
3666}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003668ac_clean_files="$ac_clean_files conftest.out"
3669# Check that the compiler produces executables we can run. If not, either
3670# the compiler is broken, or we cross compile.
3671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3672$as_echo_n "checking whether we are cross compiling... " >&6; }
3673if test "$cross_compiling" != yes; then
3674 { { ac_try="$ac_link"
3675case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678esac
3679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3680$as_echo "$ac_try_echo"; } >&5
3681 (eval "$ac_link") 2>&5
3682 ac_status=$?
3683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }
3685 if { ac_try='./conftest$ac_cv_exeext'
3686 { { case "(($ac_try" in
3687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3688 *) ac_try_echo=$ac_try;;
3689esac
3690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3691$as_echo "$ac_try_echo"; } >&5
3692 (eval "$ac_try") 2>&5
3693 ac_status=$?
3694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3695 test $ac_status = 0; }; }; then
3696 cross_compiling=no
3697 else
3698 if test "$cross_compiling" = maybe; then
3699 cross_compiling=yes
3700 else
3701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003703as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003704If you meant to cross compile, use \`--host'.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003705See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 fi
3707 fi
3708fi
3709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3710$as_echo "$cross_compiling" >&6; }
3711
3712rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3713ac_clean_files=$ac_clean_files_save
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3715$as_echo_n "checking for suffix of object files... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003716if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $as_echo_n "(cached) " >&6
3718else
3719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003720/* end confdefs.h. */
3721
3722int
3723main ()
3724{
3725
3726 ;
3727 return 0;
3728}
3729_ACEOF
3730rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003731if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732case "(($ac_try" in
3733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3734 *) ac_try_echo=$ac_try;;
3735esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3737$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3741 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742 for ac_file in conftest.o conftest.obj conftest.*; do
3743 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3747 break;;
3748 esac
3749done
3750else
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003752sed 's/^/| /' conftest.$ac_ext >&5
3753
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003756as_fn_error $? "cannot compute suffix of object files: cannot compile
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003757See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003759rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3762$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003763OBJEXT=$ac_cv_objext
3764ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3766$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003767if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003769else
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003772
Martin v. Löwis11437992002-04-12 09:54:03 +00003773int
3774main ()
3775{
3776#ifndef __GNUC__
3777 choke me
3778#endif
3779
3780 ;
3781 return 0;
3782}
3783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003784if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_compiler_gnu=yes
3786else
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003790ac_cv_c_compiler_gnu=$ac_compiler_gnu
3791
3792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3794$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3795if test $ac_compiler_gnu = yes; then
3796 GCC=yes
3797else
3798 GCC=
3799fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003800ac_test_CFLAGS=${CFLAGS+set}
3801ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3803$as_echo_n "checking whether $CC accepts -g... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003804if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003806else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807 ac_save_c_werror_flag=$ac_c_werror_flag
3808 ac_c_werror_flag=yes
3809 ac_cv_prog_cc_g=no
3810 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003813
Martin v. Löwis11437992002-04-12 09:54:03 +00003814int
3815main ()
3816{
3817
3818 ;
3819 return 0;
3820}
3821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003822if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003823 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003824else
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 CFLAGS=""
3826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827/* end confdefs.h. */
3828
3829int
3830main ()
3831{
3832
3833 ;
3834 return 0;
3835}
3836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003837if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838
Matthias Kloseb9621712010-04-24 17:59:49 +00003839else
3840 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843/* end confdefs.h. */
3844
3845int
3846main ()
3847{
3848
3849 ;
3850 return 0;
3851}
3852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003853if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3861 ac_c_werror_flag=$ac_save_c_werror_flag
3862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3864$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003865if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003867elif test $ac_cv_prog_cc_g = yes; then
3868 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003869 CFLAGS="-g -O2"
3870 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003871 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003872 fi
3873else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003874 if test "$GCC" = yes; then
3875 CFLAGS="-O2"
3876 else
3877 CFLAGS=
3878 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3881$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003882if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003884else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003886ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003888/* end confdefs.h. */
3889#include <stdarg.h>
3890#include <stdio.h>
3891#include <sys/types.h>
3892#include <sys/stat.h>
3893/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3894struct buf { int x; };
3895FILE * (*rcsopen) (struct buf *, struct stat *, int);
3896static char *e (p, i)
3897 char **p;
3898 int i;
3899{
3900 return p[i];
3901}
3902static char *f (char * (*g) (char **, int), char **p, ...)
3903{
3904 char *s;
3905 va_list v;
3906 va_start (v,p);
3907 s = g (p, va_arg (v,int));
3908 va_end (v);
3909 return s;
3910}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003911
3912/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3913 function prototypes and stuff, but not '\xHH' hex character constants.
3914 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003916 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3917 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003919int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3922 inside strings and character constants. */
3923#define FOO(x) 'x'
3924int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3925
Skip Montanaro6dead952003-09-25 14:50:04 +00003926int test (int i, double x);
3927struct s1 {int (*f) (int a);};
3928struct s2 {int (*f) (double a);};
3929int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3930int argc;
3931char **argv;
3932int
3933main ()
3934{
3935return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3936 ;
3937 return 0;
3938}
3939_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3941 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003942do
3943 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947rm -f core conftest.err conftest.$ac_objext
3948 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003949done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003951CC=$ac_save_CC
3952
3953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954# AC_CACHE_VAL
3955case "x$ac_cv_prog_cc_c89" in
3956 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3958$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3961$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003962 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3965$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003966esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003967if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003968
Matthias Kloseb9621712010-04-24 17:59:49 +00003969fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003970
Martin v. Löwis11437992002-04-12 09:54:03 +00003971ac_ext=c
3972ac_cpp='$CPP $CPPFLAGS'
3973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3975ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003976
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003977
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003978
3979
Matthias Kloseb9621712010-04-24 17:59:49 +00003980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3981$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003984if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003986
3987 case $withval in
3988 no) with_cxx_main=no
3989 MAINCC='$(CC)';;
3990 yes) with_cxx_main=yes
3991 MAINCC='$(CXX)';;
3992 *) with_cxx_main=yes
3993 MAINCC=$withval
3994 if test -z "$CXX"
3995 then
3996 CXX=$withval
3997 fi;;
3998 esac
3999else
4000
4001 with_cxx_main=no
4002 MAINCC='$(CC)'
4003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004fi
4005
Matthias Kloseb9621712010-04-24 17:59:49 +00004006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4007$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004008
4009preset_cxx="$CXX"
4010if test -z "$CXX"
4011then
4012 case "$CC" in
4013 gcc) # Extract the first word of "g++", so it can be a program name with args.
4014set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4016$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004017if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004019else
4020 case $CXX in
4021 [\\/]* | ?:[\\/]*)
4022 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4023 ;;
4024 *)
4025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4026for as_dir in notfound
4027do
4028 IFS=$as_save_IFS
4029 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031 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 +00004032 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004034 break 2
4035 fi
4036done
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004039
4040 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4041 ;;
4042esac
4043fi
4044CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004045if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4047$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004048else
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4050$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004052
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004053 ;;
4054 cc) # Extract the first word of "c++", so it can be a program name with args.
4055set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4057$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004058if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004060else
4061 case $CXX in
4062 [\\/]* | ?:[\\/]*)
4063 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4064 ;;
4065 *)
4066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4067for as_dir in notfound
4068do
4069 IFS=$as_save_IFS
4070 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004071 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004072 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 +00004073 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075 break 2
4076 fi
4077done
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004079IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004080
4081 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4082 ;;
4083esac
4084fi
4085CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004086if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4088$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004089else
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004093
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004094 ;;
4095 esac
4096 if test "$CXX" = "notfound"
4097 then
4098 CXX=""
4099 fi
4100fi
4101if test -z "$CXX"
4102then
4103 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4104do
4105 # Extract the first word of "$ac_prog", so it can be a program name with args.
4106set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004109if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111else
4112 if test -n "$CXX"; then
4113 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4114else
4115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4116for as_dir in $PATH
4117do
4118 IFS=$as_save_IFS
4119 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121 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 +00004122 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124 break 2
4125 fi
4126done
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004129
4130fi
4131fi
4132CXX=$ac_cv_prog_CXX
4133if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4135$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004136else
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4138$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004139fi
4140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142 test -n "$CXX" && break
4143done
4144test -n "$CXX" || CXX="notfound"
4145
4146 if test "$CXX" = "notfound"
4147 then
4148 CXX=""
4149 fi
4150fi
4151if test "$preset_cxx" != "$CXX"
4152then
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004154
4155 By default, distutils will build C++ extension modules with \"$CXX\".
4156 If this is not intended, then set CXX on the configure command line.
4157 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004158$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004159
4160 By default, distutils will build C++ extension modules with \"$CXX\".
4161 If this is not intended, then set CXX on the configure command line.
4162 " >&2;}
4163fi
4164
4165
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4167$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4168save_LDFLAGS="$LDFLAGS"
4169LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004170
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172/* end confdefs.h. */
4173
4174int
4175main ()
4176{
4177
4178 ;
4179 return 0;
4180}
4181_ACEOF
4182if ac_fn_c_try_link "$LINENO"; then :
4183 NO_AS_NEEDED="-Wl,--no-as-needed"
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4185$as_echo "yes" >&6; }
4186else
4187 NO_AS_NEEDED=""
4188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4189$as_echo "no" >&6; }
4190fi
4191rm -f core conftest.err conftest.$ac_objext \
4192 conftest$ac_exeext conftest.$ac_ext
4193LDFLAGS="$save_LDFLAGS"
4194
4195
4196
4197# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004198ac_ext=c
4199ac_cpp='$CPP $CPPFLAGS'
4200ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4201ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4202ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4204$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004205# On Suns, sometimes $CPP names a directory.
4206if test -n "$CPP" && test -d "$CPP"; then
4207 CPP=
4208fi
4209if test -z "$CPP"; then
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004210 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004212else
Martin v. Löwis11437992002-04-12 09:54:03 +00004213 # Double quotes because CPP needs to be expanded
4214 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4215 do
4216 ac_preproc_ok=false
4217for ac_c_preproc_warn_flag in '' yes
4218do
4219 # Use a header file that comes with gcc, so configuring glibc
4220 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004221 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4222 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004223 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004224 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004226/* end confdefs.h. */
4227#ifdef __STDC__
4228# include <limits.h>
4229#else
4230# include <assert.h>
4231#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004232 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004234if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004235
Matthias Kloseb9621712010-04-24 17:59:49 +00004236else
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 # Broken: fails on valid input.
4238continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004239fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004240rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004243 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004246#include <ac_nonexistent.h>
4247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004248if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # Broken: success on invalid input.
4250continue
4251else
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 # Passes both tests.
4253ac_preproc_ok=:
4254break
4255fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004256rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004257
4258done
4259# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004260rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004261if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 break
4263fi
4264
4265 done
4266 ac_cv_prog_CPP=$CPP
4267
4268fi
4269 CPP=$ac_cv_prog_CPP
4270else
4271 ac_cv_prog_CPP=$CPP
4272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4274$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004275ac_preproc_ok=false
4276for ac_c_preproc_warn_flag in '' yes
4277do
4278 # Use a header file that comes with gcc, so configuring glibc
4279 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004280 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4281 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 # On the NeXT, cc -E runs the code through the compiler's parser,
4283 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004285/* end confdefs.h. */
4286#ifdef __STDC__
4287# include <limits.h>
4288#else
4289# include <assert.h>
4290#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004291 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004293if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004294
Matthias Kloseb9621712010-04-24 17:59:49 +00004295else
Martin v. Löwis11437992002-04-12 09:54:03 +00004296 # Broken: fails on valid input.
4297continue
4298fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004299rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004302 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004305#include <ac_nonexistent.h>
4306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004307if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004308 # Broken: success on invalid input.
4309continue
4310else
Martin v. Löwis11437992002-04-12 09:54:03 +00004311 # Passes both tests.
4312ac_preproc_ok=:
4313break
4314fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004315rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004316
4317done
4318# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004319rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004320if $ac_preproc_ok; then :
4321
Martin v. Löwis11437992002-04-12 09:54:03 +00004322else
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4324$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004325as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004326See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004327fi
4328
4329ac_ext=c
4330ac_cpp='$CPP $CPPFLAGS'
4331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4333ac_compiler_gnu=$ac_cv_c_compiler_gnu
4334
4335
Matthias Kloseb9621712010-04-24 17:59:49 +00004336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4337$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004338if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004340else
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 # Loop through the user's path and test for each of PROGNAME-LIST
4344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4346do
4347 IFS=$as_save_IFS
4348 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 for ac_prog in grep ggrep; do
4350 for ac_exec_ext in '' $ac_executable_extensions; do
4351 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4352 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4353# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 # Check for GNU $ac_path_GREP
4355case `"$ac_path_GREP" --version 2>&1` in
4356*GNU*)
4357 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4358*)
4359 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 while :
4362 do
4363 cat "conftest.in" "conftest.in" >"conftest.tmp"
4364 mv "conftest.tmp" "conftest.in"
4365 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4368 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4371 # Best one so far, save it but keep looking for a better one
4372 ac_cv_path_GREP="$ac_path_GREP"
4373 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004374 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 # 10*(2^10) chars as input seems more than enough
4376 test $ac_count -gt 10 && break
4377 done
4378 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4379esac
4380
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 $ac_path_GREP_found && break 3
4382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004387 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 +00004388 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389else
4390 ac_cv_path_GREP=$GREP
4391fi
4392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4395$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 GREP="$ac_cv_path_GREP"
4397
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4400$as_echo_n "checking for egrep... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004401if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403else
4404 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4405 then ac_cv_path_EGREP="$GREP -E"
4406 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004409 # Loop through the user's path and test for each of PROGNAME-LIST
4410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4412do
4413 IFS=$as_save_IFS
4414 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004415 for ac_prog in egrep; do
4416 for ac_exec_ext in '' $ac_executable_extensions; do
4417 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4418 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4419# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420 # Check for GNU $ac_path_EGREP
4421case `"$ac_path_EGREP" --version 2>&1` in
4422*GNU*)
4423 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4424*)
4425 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004426 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004427 while :
4428 do
4429 cat "conftest.in" "conftest.in" >"conftest.tmp"
4430 mv "conftest.tmp" "conftest.in"
4431 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004432 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4434 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004435 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4437 # Best one so far, save it but keep looking for a better one
4438 ac_cv_path_EGREP="$ac_path_EGREP"
4439 ac_path_EGREP_max=$ac_count
4440 fi
4441 # 10*(2^10) chars as input seems more than enough
4442 test $ac_count -gt 10 && break
4443 done
4444 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4445esac
4446
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 $ac_path_EGREP_found && break 3
4448 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004449 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004451IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004452 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004453 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 +00004454 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004455else
4456 ac_cv_path_EGREP=$EGREP
4457fi
4458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459 fi
4460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4462$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004463 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004464
4465
Matthias Kloseb9621712010-04-24 17:59:49 +00004466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4467$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004468if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004469 $as_echo_n "(cached) " >&6
4470else
4471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004472/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004473#include <stdlib.h>
4474#include <stdarg.h>
4475#include <string.h>
4476#include <float.h>
4477
4478int
4479main ()
4480{
4481
4482 ;
4483 return 0;
4484}
4485_ACEOF
4486if ac_fn_c_try_compile "$LINENO"; then :
4487 ac_cv_header_stdc=yes
4488else
4489 ac_cv_header_stdc=no
4490fi
4491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4492
4493if test $ac_cv_header_stdc = yes; then
4494 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4496/* end confdefs.h. */
4497#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004498
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004499_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004502
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004503else
Matthias Kloseb9621712010-04-24 17:59:49 +00004504 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004505fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004506rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004507
Matthias Kloseb9621712010-04-24 17:59:49 +00004508fi
4509
4510if test $ac_cv_header_stdc = yes; then
4511 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4513/* end confdefs.h. */
4514#include <stdlib.h>
4515
4516_ACEOF
4517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4518 $EGREP "free" >/dev/null 2>&1; then :
4519
4520else
4521 ac_cv_header_stdc=no
4522fi
4523rm -f conftest*
4524
4525fi
4526
4527if test $ac_cv_header_stdc = yes; then
4528 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4529 if test "$cross_compiling" = yes; then :
4530 :
4531else
4532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4533/* end confdefs.h. */
4534#include <ctype.h>
4535#include <stdlib.h>
4536#if ((' ' & 0x0FF) == 0x020)
4537# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4538# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4539#else
4540# define ISLOWER(c) \
4541 (('a' <= (c) && (c) <= 'i') \
4542 || ('j' <= (c) && (c) <= 'r') \
4543 || ('s' <= (c) && (c) <= 'z'))
4544# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4545#endif
4546
4547#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4548int
4549main ()
4550{
4551 int i;
4552 for (i = 0; i < 256; i++)
4553 if (XOR (islower (i), ISLOWER (i))
4554 || toupper (i) != TOUPPER (i))
4555 return 2;
4556 return 0;
4557}
4558_ACEOF
4559if ac_fn_c_try_run "$LINENO"; then :
4560
4561else
4562 ac_cv_header_stdc=no
4563fi
4564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4565 conftest.$ac_objext conftest.beam conftest.$ac_ext
4566fi
4567
4568fi
4569fi
4570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4571$as_echo "$ac_cv_header_stdc" >&6; }
4572if test $ac_cv_header_stdc = yes; then
4573
4574$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4575
4576fi
4577
4578# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4579for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4580 inttypes.h stdint.h unistd.h
4581do :
4582 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4583ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4584"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004585if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004586 cat >>confdefs.h <<_ACEOF
4587#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4588_ACEOF
4589
4590fi
4591
4592done
4593
4594
4595
4596 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004597if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004598 MINIX=yes
4599else
4600 MINIX=
4601fi
4602
4603
4604 if test "$MINIX" = yes; then
4605
4606$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4607
4608
4609$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4610
4611
4612$as_echo "#define _MINIX 1" >>confdefs.h
4613
4614 fi
4615
4616
4617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4618$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004619if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004620 $as_echo_n "(cached) " >&6
4621else
4622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4623/* end confdefs.h. */
4624
4625# define __EXTENSIONS__ 1
4626 $ac_includes_default
4627int
4628main ()
4629{
4630
4631 ;
4632 return 0;
4633}
4634_ACEOF
4635if ac_fn_c_try_compile "$LINENO"; then :
4636 ac_cv_safe_to_define___extensions__=yes
4637else
4638 ac_cv_safe_to_define___extensions__=no
4639fi
4640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4641fi
4642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4643$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4644 test $ac_cv_safe_to_define___extensions__ = yes &&
4645 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4646
4647 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4648
4649 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4650
4651 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4652
4653 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4654
4655
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004657# Check for unsupported systems
4658case $ac_sys_system/$ac_sys_release in
4659atheos*|Linux*/1*)
4660 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4661 echo See README for details.
4662 exit 1;;
4663esac
4664
4665
Matthias Kloseb9621712010-04-24 17:59:49 +00004666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4667$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004668
4669# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004670if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004671 withval=$with_suffix;
4672 case $withval in
4673 no) EXEEXT=;;
4674 yes) EXEEXT=.exe;;
4675 *) EXEEXT=$withval;;
4676 esac
4677fi
4678
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4680$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681
4682# Test whether we're running on a non-case-sensitive system, in which
4683# case we give a warning if no ext is given
4684
Matthias Kloseb9621712010-04-24 17:59:49 +00004685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4686$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687if test ! -d CaseSensitiveTestDir; then
4688mkdir CaseSensitiveTestDir
4689fi
4690
4691if test -d casesensitivetestdir
4692then
Matthias Kloseb9621712010-04-24 17:59:49 +00004693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4694$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004695 BUILDEXEEXT=.exe
4696else
Matthias Kloseb9621712010-04-24 17:59:49 +00004697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4698$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004699 BUILDEXEEXT=$EXEEXT
4700fi
4701rmdir CaseSensitiveTestDir
4702
4703case $MACHDEP in
4704bsdos*)
4705 case $CC in
4706 gcc) CC="$CC -D_HAVE_BSDI";;
4707 esac;;
4708esac
4709
4710case $ac_sys_system in
4711hp*|HP*)
4712 case $CC in
4713 cc|*/cc) CC="$CC -Ae";;
4714 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004715esac
4716
4717
4718
Matthias Kloseb9621712010-04-24 17:59:49 +00004719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4720$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004721if test -z "$LIBRARY"
4722then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004723 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4726$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727
4728# LDLIBRARY is the name of the library to link against (as opposed to the
4729# name of the library into which to insert object files). BLDLIBRARY is also
4730# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4731# is blank as the main program is not linked directly against LDLIBRARY.
4732# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4733# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4734# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4735# DLLLIBRARY is the shared (i.e., DLL) library.
4736#
4737# RUNSHARED is used to run shared python without installed libraries
4738#
4739# INSTSONAME is the name of the shared library that will be use to install
4740# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004741#
4742# LDVERSION is the shared library version number, normally the Python version
4743# with the ABI build flags appended.
4744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745
4746
4747
4748
4749
4750
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004752LDLIBRARY="$LIBRARY"
4753BLDLIBRARY='$(LDLIBRARY)'
4754INSTSONAME='$(LDLIBRARY)'
4755DLLLIBRARY=''
4756LDLIBRARYDIR=''
4757RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004758LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759
4760# LINKCC is the command that links the python executable -- default is $(CC).
4761# If CXX is set, and if it is needed to link a main function that was
4762# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4763# python might then depend on the C++ runtime
4764# This is altered for AIX in order to build the export list before
4765# linking.
4766
Matthias Kloseb9621712010-04-24 17:59:49 +00004767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4768$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769if test -z "$LINKCC"
4770then
4771 LINKCC='$(PURIFY) $(MAINCC)'
4772 case $ac_sys_system in
4773 AIX*)
4774 exp_extra="\"\""
4775 if test $ac_sys_release -ge 5 -o \
4776 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4777 exp_extra="."
4778 fi
4779 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780 QNX*)
4781 # qcc must be used because the other compilers do not
4782 # support -N.
4783 LINKCC=qcc;;
4784 esac
4785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4787$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788
4789# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4790# make sure we default having it set to "no": this is used by
4791# distutils.unixccompiler to know if it should add --enable-new-dtags
4792# to linker command lines, and failing to detect GNU ld simply results
4793# in the same bahaviour as before.
4794
Matthias Kloseb9621712010-04-24 17:59:49 +00004795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4796$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004797ac_prog=ld
4798if test "$GCC" = yes; then
4799 ac_prog=`$CC -print-prog-name=ld`
4800fi
4801case `"$ac_prog" -V 2>&1 < /dev/null` in
4802 *GNU*)
4803 GNULD=yes;;
4804 *)
4805 GNULD=no;;
4806esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4808$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4811$as_echo_n "checking for inline... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02004812if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004813 $as_echo_n "(cached) " >&6
4814else
4815 ac_cv_c_inline=no
4816for ac_kw in inline __inline__ __inline; do
4817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818/* end confdefs.h. */
4819#ifndef __cplusplus
4820typedef int foo_t;
4821static $ac_kw foo_t static_foo () {return 0; }
4822$ac_kw foo_t foo () {return 0; }
4823#endif
4824
4825_ACEOF
4826if ac_fn_c_try_compile "$LINENO"; then :
4827 ac_cv_c_inline=$ac_kw
4828fi
4829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4830 test "$ac_cv_c_inline" != no && break
4831done
4832
4833fi
4834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4835$as_echo "$ac_cv_c_inline" >&6; }
4836
4837case $ac_cv_c_inline in
4838 inline | yes) ;;
4839 *)
4840 case $ac_cv_c_inline in
4841 no) ac_val=;;
4842 *) ac_val=$ac_cv_c_inline;;
4843 esac
4844 cat >>confdefs.h <<_ACEOF
4845#ifndef __cplusplus
4846#define inline $ac_val
4847#endif
4848_ACEOF
4849 ;;
4850esac
4851
4852if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004853
4854$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004855
4856
4857fi
4858
4859
Matthias Kloseb9621712010-04-24 17:59:49 +00004860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4861$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004863if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864 enableval=$enable_shared;
4865fi
4866
4867
4868if test -z "$enable_shared"
4869then
4870 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004871 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872 enable_shared="yes";;
4873 *)
4874 enable_shared="no";;
4875 esac
4876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4878$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004879
Matthias Kloseb9621712010-04-24 17:59:49 +00004880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4881$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004883if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004884 enableval=$enable_profiling; ac_save_cc="$CC"
4885 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887 ac_enable_profiling="no"
4888else
Matthias Kloseb9621712010-04-24 17:59:49 +00004889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890/* end confdefs.h. */
4891int main() { return 0; }
4892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004893if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004894 ac_enable_profiling="yes"
4895else
Matthias Kloseb9621712010-04-24 17:59:49 +00004896 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900fi
4901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902 CC="$ac_save_cc"
4903fi
4904
Matthias Kloseb9621712010-04-24 17:59:49 +00004905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4906$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907
4908case "$ac_enable_profiling" in
4909 "yes")
4910 BASECFLAGS="-pg $BASECFLAGS"
4911 LDFLAGS="-pg $LDFLAGS"
4912 ;;
4913esac
4914
Matthias Kloseb9621712010-04-24 17:59:49 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4916$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917
4918# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4919# library that we build, but we do not want to link against it (we
4920# will find it with a -framework option). For this reason there is an
4921# extra variable BLDLIBRARY against which Python and the extension
4922# modules are linked, BLDLIBRARY. This is normally the same as
4923# LDLIBRARY, but empty for MacOSX framework builds.
4924if test "$enable_framework"
4925then
4926 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4927 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4928 BLDLIBRARY=''
4929else
4930 BLDLIBRARY='$(LDLIBRARY)'
4931fi
4932
4933# Other platforms follow
4934if test $enable_shared = "yes"; then
4935
Matthias Kloseb9621712010-04-24 17:59:49 +00004936$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937
4938 case $ac_sys_system in
4939 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004940 LDLIBRARY='libpython$(LDVERSION).dll.a'
4941 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942 ;;
4943 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004944 LDLIBRARY='libpython$(LDVERSION).so'
4945 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4947 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004948 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004949 then
4950 PY3LIBRARY=libpython3.so
4951 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952 ;;
4953 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004954 LDLIBRARY='libpython$(LDVERSION).so'
4955 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4957 case $ac_sys_system in
4958 FreeBSD*)
4959 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4960 ;;
4961 esac
4962 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004963 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004964 then
4965 PY3LIBRARY=libpython3.so
4966 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967 ;;
4968 hp*|HP*)
4969 case `uname -m` in
4970 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004971 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 ;;
4973 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004974 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 ;;
4976 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004977 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4979 ;;
4980 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004981 LDLIBRARY='libpython$(LDVERSION).so'
4982 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4984 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004986 LDLIBRARY='libpython$(LDVERSION).dylib'
4987 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004988 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4989 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004990 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004991 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004992 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4993 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994
4995 esac
4996else # shared is disabled
4997 case $ac_sys_system in
4998 CYGWIN*)
4999 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005000 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005001 ;;
5002 esac
5003fi
5004
Matthias Kloseb9621712010-04-24 17:59:49 +00005005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5006$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007
5008if test -n "$ac_tool_prefix"; then
5009 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5010set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005013if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015else
5016 if test -n "$RANLIB"; then
5017 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5018else
5019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022 IFS=$as_save_IFS
5023 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5026 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 break 2
5029 fi
5030done
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032IFS=$as_save_IFS
5033
5034fi
5035fi
5036RANLIB=$ac_cv_prog_RANLIB
5037if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5039$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040else
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043fi
5044
5045
5046fi
5047if test -z "$ac_cv_prog_RANLIB"; then
5048 ac_ct_RANLIB=$RANLIB
5049 # Extract the first word of "ranlib", so it can be a program name with args.
5050set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5052$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005053if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055else
5056 if test -n "$ac_ct_RANLIB"; then
5057 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5058else
5059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5060for as_dir in $PATH
5061do
5062 IFS=$as_save_IFS
5063 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5066 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005068 break 2
5069 fi
5070done
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072IFS=$as_save_IFS
5073
5074fi
5075fi
5076ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5077if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5079$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080else
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5082$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083fi
5084
5085 if test "x$ac_ct_RANLIB" = x; then
5086 RANLIB=":"
5087 else
5088 case $cross_compiling:$ac_tool_warned in
5089yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005090{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5091$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005092ac_tool_warned=yes ;;
5093esac
5094 RANLIB=$ac_ct_RANLIB
5095 fi
5096else
5097 RANLIB="$ac_cv_prog_RANLIB"
5098fi
5099
5100
5101for ac_prog in ar aal
5102do
5103 # Extract the first word of "$ac_prog", so it can be a program name with args.
5104set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5106$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005107if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109else
5110 if test -n "$AR"; then
5111 ac_cv_prog_AR="$AR" # Let the user override the test.
5112else
5113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114for as_dir in $PATH
5115do
5116 IFS=$as_save_IFS
5117 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5120 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 break 2
5123 fi
5124done
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126IFS=$as_save_IFS
5127
5128fi
5129fi
5130AR=$ac_cv_prog_AR
5131if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5133$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005134else
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5136$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137fi
5138
5139
5140 test -n "$AR" && break
5141done
5142test -n "$AR" || AR="ar"
5143
5144
5145# tweak ARFLAGS only if the user didn't set it on the command line
5146
5147if test -z "$ARFLAGS"
5148then
5149 ARFLAGS="rc"
5150fi
5151
5152
5153# Extract the first word of "svnversion", so it can be a program name with args.
5154set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005157if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005158 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159else
5160 if test -n "$SVNVERSION"; then
5161 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5162else
5163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5164for as_dir in $PATH
5165do
5166 IFS=$as_save_IFS
5167 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005168 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5170 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172 break 2
5173 fi
5174done
Matthias Kloseb9621712010-04-24 17:59:49 +00005175 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005176IFS=$as_save_IFS
5177
5178 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5179fi
5180fi
5181SVNVERSION=$ac_cv_prog_SVNVERSION
5182if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5184$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185else
Matthias Kloseb9621712010-04-24 17:59:49 +00005186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188fi
5189
5190
5191if test $SVNVERSION = found
5192then
5193 SVNVERSION="svnversion \$(srcdir)"
5194else
5195 SVNVERSION="echo Unversioned directory"
5196fi
5197
Georg Brandl1ca2e792011-03-05 20:51:24 +01005198
5199
5200
Georg Brandl187c1112011-07-03 09:23:20 +02005201
5202if test -e $srcdir/.hg/00changelog.i
5203then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005204# Extract the first word of "hg", so it can be a program name with args.
5205set dummy hg; ac_word=$2
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5207$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005208if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005209 $as_echo_n "(cached) " >&6
5210else
5211 if test -n "$HAS_HG"; then
5212 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5213else
5214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5215for as_dir in $PATH
5216do
5217 IFS=$as_save_IFS
5218 test -z "$as_dir" && as_dir=.
5219 for ac_exec_ext in '' $ac_executable_extensions; do
5220 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5221 ac_cv_prog_HAS_HG="found"
5222 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5223 break 2
5224 fi
5225done
5226 done
5227IFS=$as_save_IFS
5228
5229 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5230fi
5231fi
5232HAS_HG=$ac_cv_prog_HAS_HG
5233if test -n "$HAS_HG"; then
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5235$as_echo "$HAS_HG" >&6; }
5236else
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238$as_echo "no" >&6; }
5239fi
5240
5241
Georg Brandl187c1112011-07-03 09:23:20 +02005242else
5243HAS_HG=no-repository
5244fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005245if test $HAS_HG = found
5246then
5247 HGVERSION="hg id -i \$(srcdir)"
5248 HGTAG="hg id -t \$(srcdir)"
5249 HGBRANCH="hg id -b \$(srcdir)"
5250else
5251 HGVERSION=""
5252 HGTAG=""
5253 HGBRANCH=""
5254fi
5255
Georg Brandl187c1112011-07-03 09:23:20 +02005256
5257DISABLE_ASDLGEN=""
5258# Extract the first word of "python", so it can be a program name with args.
5259set dummy python; ac_word=$2
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005262if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005263 $as_echo_n "(cached) " >&6
5264else
5265 if test -n "$HAS_PYTHON"; then
5266 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5267else
5268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269for as_dir in $PATH
5270do
5271 IFS=$as_save_IFS
5272 test -z "$as_dir" && as_dir=.
5273 for ac_exec_ext in '' $ac_executable_extensions; do
5274 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5275 ac_cv_prog_HAS_PYTHON="found"
5276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277 break 2
5278 fi
5279done
5280 done
5281IFS=$as_save_IFS
5282
5283 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5284fi
5285fi
5286HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5287if test -n "$HAS_PYTHON"; then
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5289$as_echo "$HAS_PYTHON" >&6; }
5290else
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }
5293fi
5294
5295
5296if test $HAS_HG != found -o $HAS_PYTHON != found
5297then
5298 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5299fi
5300
5301
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005302case $MACHDEP in
5303bsdos*|hp*|HP*)
5304 # install -d does not work on BSDI or HP-UX
5305 if test -z "$INSTALL"
5306 then
5307 INSTALL="${srcdir}/install-sh -c"
5308 fi
5309esac
5310ac_aux_dir=
5311for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005312 if test -f "$ac_dir/install-sh"; then
5313 ac_aux_dir=$ac_dir
5314 ac_install_sh="$ac_aux_dir/install-sh -c"
5315 break
5316 elif test -f "$ac_dir/install.sh"; then
5317 ac_aux_dir=$ac_dir
5318 ac_install_sh="$ac_aux_dir/install.sh -c"
5319 break
5320 elif test -f "$ac_dir/shtool"; then
5321 ac_aux_dir=$ac_dir
5322 ac_install_sh="$ac_aux_dir/shtool install -c"
5323 break
5324 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325done
5326if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005327 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005328fi
5329
5330# These three variables are undocumented and unsupported,
5331# and are intended to be withdrawn in a future Autoconf release.
5332# They can cause serious problems if a builder's source tree is in a directory
5333# whose full name contains unusual characters.
5334ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5335ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5336ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5337
5338
5339# Find a good install program. We prefer a C program (faster),
5340# so one script is as good as another. But avoid the broken or
5341# incompatible versions:
5342# SysV /etc/install, /usr/sbin/install
5343# SunOS /usr/etc/install
5344# IRIX /sbin/install
5345# AIX /bin/install
5346# AmigaOS /C/install, which installs bootblocks on floppy discs
5347# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5348# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5349# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5350# OS/2's system install, which has a completely different semantic
5351# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005352# Reject install programs that cannot install multiple files.
5353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5354$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355if test -z "$INSTALL"; then
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005356if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358else
5359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5360for as_dir in $PATH
5361do
5362 IFS=$as_save_IFS
5363 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 # Account for people who put trailing slashes in PATH elements.
5365case $as_dir/ in #((
5366 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005367 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369 /usr/ucb/* ) ;;
5370 *)
5371 # OSF1 and SCO ODT 3.0 have their own names for install.
5372 # Don't use installbsd from OSF since it installs stuff as root
5373 # by default.
5374 for ac_prog in ginstall scoinst install; do
5375 for ac_exec_ext in '' $ac_executable_extensions; do
5376 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5377 if test $ac_prog = install &&
5378 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5379 # AIX install. It has an incompatible calling convention.
5380 :
5381 elif test $ac_prog = install &&
5382 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5383 # program-specific install script used by HP pwplus--don't use.
5384 :
5385 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 rm -rf conftest.one conftest.two conftest.dir
5387 echo one > conftest.one
5388 echo two > conftest.two
5389 mkdir conftest.dir
5390 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5391 test -s conftest.one && test -s conftest.two &&
5392 test -s conftest.dir/conftest.one &&
5393 test -s conftest.dir/conftest.two
5394 then
5395 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5396 break 3
5397 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398 fi
5399 fi
5400 done
5401 done
5402 ;;
5403esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005404
5405 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406IFS=$as_save_IFS
5407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409
5410fi
5411 if test "${ac_cv_path_install+set}" = set; then
5412 INSTALL=$ac_cv_path_install
5413 else
5414 # As a last resort, use the slow shell script. Don't cache a
5415 # value for INSTALL within a source directory, because that will
5416 # break other packages using the cache if that directory is
5417 # removed, or if the value is a relative name.
5418 INSTALL=$ac_install_sh
5419 fi
5420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5422$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423
5424# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5425# It thinks the first close brace ends the variable substitution.
5426test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5427
5428test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5429
5430test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5431
5432
5433# Not every filesystem supports hard links
5434
5435if test -z "$LN" ; then
5436 case $ac_sys_system in
5437 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438 *) LN=ln;;
5439 esac
5440fi
5441
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005442# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005443
5444ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005445
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5448$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449
5450# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005451if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005452 withval=$with_pydebug;
5453if test "$withval" != no
5454then
5455
Matthias Kloseb9621712010-04-24 17:59:49 +00005456$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5459$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005461 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005462else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5463$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464fi
5465else
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5467$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468fi
5469
5470
5471# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5472# merged with this chunk of code?
5473
5474# Optimizer/debugger flags
5475# ------------------------
5476# (The following bit of code is complicated enough - please keep things
5477# indented properly. Just pretend you're editing Python code. ;-)
5478
5479# There are two parallel sets of case statements below, one that checks to
5480# see if OPT was set and one that does BASECFLAGS setting based upon
5481# compiler and platform. BASECFLAGS tweaks need to be made even if the
5482# user set OPT.
5483
5484# tweak OPT based on compiler and platform, only if the user didn't set
5485# it on the command line
5486
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005487if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488then
5489 case $GCC in
5490 yes)
5491 if test "$CC" != 'g++' ; then
5492 STRICT_PROTO="-Wstrict-prototypes"
5493 fi
5494 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5495 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5496 WRAP="-fwrapv"
5497 fi
5498 case $ac_cv_prog_cc_g in
5499 yes)
5500 if test "$Py_DEBUG" = 'true' ; then
5501 # Optimization messes up debuggers, so turn it off for
5502 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005503 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504 else
5505 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5506 fi
5507 ;;
5508 *)
5509 OPT="-O3 -Wall $STRICT_PROTO"
5510 ;;
5511 esac
5512 case $ac_sys_system in
5513 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5514 ;;
5515 esac
5516 ;;
5517
5518 *)
5519 OPT="-O"
5520 ;;
5521 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522fi
5523
5524
5525
5526# The -arch flags for universal builds on OSX
5527UNIVERSAL_ARCH_FLAGS=
5528
5529
5530# tweak BASECFLAGS based on compiler and platform
5531case $GCC in
5532yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005533 # Python doesn't violate C99 aliasing rules, but older versions of
5534 # GCC produce warnings for legal Python code. Enable
5535 # -fno-strict-aliasing on versions of GCC that support but produce
5536 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5538$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539 ac_save_cc="$CC"
5540 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005541 save_CFLAGS="$CFLAGS"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005542 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005543 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005544else
Matthias Kloseb9621712010-04-24 17:59:49 +00005545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005547
Matthias Kloseb159a552010-04-25 21:00:44 +00005548
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005549int
5550main ()
5551{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005552
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005553 ;
5554 return 0;
5555}
Matthias Kloseb159a552010-04-25 21:00:44 +00005556
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005558if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005559
5560 CC="$ac_save_cc -fstrict-aliasing"
5561 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005563/* end confdefs.h. */
5564
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005565 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005566int
5567main ()
5568{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005569double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005570 ;
5571 return 0;
5572}
Matthias Kloseb159a552010-04-25 21:00:44 +00005573
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005575if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005576
5577 ac_cv_no_strict_aliasing=no
5578
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579else
Matthias Kloseb159a552010-04-25 21:00:44 +00005580
5581 ac_cv_no_strict_aliasing=yes
5582
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005583fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005585
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005586else
Matthias Kloseb159a552010-04-25 21:00:44 +00005587
5588 ac_cv_no_strict_aliasing=no
5589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005592fi
5593
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005594 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5597$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005598 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599 then
5600 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5601 fi
5602
5603 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5604 # support. Without this, treatment of subnormals doesn't follow
5605 # the standard.
5606 case $ac_sys_machine in
5607 alpha*)
5608 BASECFLAGS="$BASECFLAGS -mieee"
5609 ;;
5610 esac
5611
5612 case $ac_sys_system in
5613 SCO_SV*)
5614 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5615 ;;
5616 # is there any other compiler on Darwin besides gcc?
5617 Darwin*)
5618 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5619 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005620 if test "${CC}" = gcc
5621 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5623$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005624 case "${UNIVERSALSDK}" in
5625 */MacOSX10.4u.sdk)
5626 # Build using 10.4 SDK, force usage of gcc when the
5627 # compiler is gcc, otherwise the user will get very
5628 # confusing error messages when building on OSX 10.6
5629 CC=gcc-4.0
5630 CPP=cpp-4.0
5631 ;;
5632 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5634$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005635 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636
5637
5638 if test "${enable_universalsdk}"; then
5639 UNIVERSAL_ARCH_FLAGS=""
5640 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5641 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5642 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005643 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5645 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005646 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005647 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
5649 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5650 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005651 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005652 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005654 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5655 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005656 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005657 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005658
5659 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5660 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005661 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005662 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005663
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005665 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 +00005666
5667 fi
5668
5669
Ronald Oussoren666028b2010-04-18 19:07:43 +00005670 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5671 if test "${UNIVERSALSDK}" != "/"
5672 then
5673 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5674 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005675 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 fi
5677 fi
5678
5679 # Calculate the right deployment target for this build.
5680 #
5681 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5682 if test ${cur_target} '>' 10.2; then
5683 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005684 if test ${enable_universalsdk}; then
5685 if test "${UNIVERSAL_ARCHS}" = "all"; then
5686 # Ensure that the default platform for a
5687 # 4-way universal build is OSX 10.5,
5688 # that's the first OS release where
5689 # 4-way builds make sense.
5690 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005691
5692 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5693 cur_target='10.5'
5694
5695 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5696 cur_target='10.5'
5697
5698 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5699 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005700 fi
5701 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005702 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005703 # On Intel macs default to a deployment
5704 # target of 10.4, that's the first OSX
5705 # release with Intel support.
5706 cur_target="10.4"
5707 fi
5708 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709 fi
5710 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5711
5712 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5713 # environment with a value that is the same as what we'll use
5714 # in the Makefile to ensure that we'll get the same compiler
5715 # environment during configure and build time.
5716 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5717 export MACOSX_DEPLOYMENT_TARGET
5718 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5719
5720 ;;
5721 OSF*)
5722 BASECFLAGS="$BASECFLAGS -mieee"
5723 ;;
5724 esac
5725 ;;
5726
5727*)
5728 case $ac_sys_system in
5729 OpenUNIX*|UnixWare*)
5730 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5731 ;;
5732 OSF*)
5733 BASECFLAGS="$BASECFLAGS -ieee -std"
5734 ;;
5735 SCO_SV*)
5736 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5737 ;;
5738 esac
5739 ;;
5740esac
5741
5742if test "$Py_DEBUG" = 'true'; then
5743 :
5744else
5745 OPT="-DNDEBUG $OPT"
5746fi
5747
5748if test "$ac_arch_flags"
5749then
5750 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5751fi
5752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753# Check whether GCC supports PyArg_ParseTuple format
5754if test "$GCC" = "yes"
5755then
Matthias Kloseb9621712010-04-24 17:59:49 +00005756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5757$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758 save_CFLAGS=$CFLAGS
5759 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761/* end confdefs.h. */
5762
5763 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764int
5765main ()
5766{
5767
5768 ;
5769 return 0;
5770}
Matthias Kloseb159a552010-04-25 21:00:44 +00005771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005773if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
Matthias Kloseb159a552010-04-25 21:00:44 +00005775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
Matthias Kloseb159a552010-04-25 21:00:44 +00005778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005779$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781else
Matthias Kloseb159a552010-04-25 21:00:44 +00005782
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005784$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785
5786fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5788 CFLAGS=$save_CFLAGS
5789fi
5790
5791# On some compilers, pthreads are available without further options
5792# (e.g. MacOS X). On some of these systems, the compiler will not
5793# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5794# So we have to see first whether pthreads are available without
5795# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5797$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005798if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800else
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802 ac_cv_pthread_is_default=no
5803else
Matthias Kloseb9621712010-04-24 17:59:49 +00005804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805/* end confdefs.h. */
5806
5807#include <pthread.h>
5808
5809void* routine(void* p){return NULL;}
5810
5811int main(){
5812 pthread_t p;
5813 if(pthread_create(&p,NULL,routine,NULL)!=0)
5814 return 1;
5815 (void)pthread_detach(p);
5816 return 0;
5817}
5818
5819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005820if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821
5822 ac_cv_pthread_is_default=yes
5823 ac_cv_kthread=no
5824 ac_cv_pthread=no
5825
5826else
Matthias Kloseb9621712010-04-24 17:59:49 +00005827 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831fi
5832
5833
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834fi
5835
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5837$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838
5839
5840if test $ac_cv_pthread_is_default = yes
5841then
5842 ac_cv_kpthread=no
5843else
5844# -Kpthread, if available, provides the right #defines
5845# and linker options to make pthread_create available
5846# Some compilers won't report that they do not support -Kpthread,
5847# so we need to run a program to see whether it really made the
5848# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5850$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005851if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005852 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853else
5854 ac_save_cc="$CC"
5855CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005856if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857 ac_cv_kpthread=no
5858else
Matthias Kloseb9621712010-04-24 17:59:49 +00005859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860/* end confdefs.h. */
5861
5862#include <pthread.h>
5863
5864void* routine(void* p){return NULL;}
5865
5866int main(){
5867 pthread_t p;
5868 if(pthread_create(&p,NULL,routine,NULL)!=0)
5869 return 1;
5870 (void)pthread_detach(p);
5871 return 0;
5872}
5873
5874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005875if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 ac_cv_kpthread=yes
5877else
Matthias Kloseb9621712010-04-24 17:59:49 +00005878 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
5883
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884CC="$ac_save_cc"
5885fi
5886
Matthias Kloseb9621712010-04-24 17:59:49 +00005887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5888$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
5890
5891if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5892then
5893# -Kthread, if available, provides the right #defines
5894# and linker options to make pthread_create available
5895# Some compilers won't report that they do not support -Kthread,
5896# so we need to run a program to see whether it really made the
5897# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5899$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005900if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005901 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902else
5903 ac_save_cc="$CC"
5904CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005905if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ac_cv_kthread=no
5907else
Matthias Kloseb9621712010-04-24 17:59:49 +00005908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909/* end confdefs.h. */
5910
5911#include <pthread.h>
5912
5913void* routine(void* p){return NULL;}
5914
5915int main(){
5916 pthread_t p;
5917 if(pthread_create(&p,NULL,routine,NULL)!=0)
5918 return 1;
5919 (void)pthread_detach(p);
5920 return 0;
5921}
5922
5923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005924if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 ac_cv_kthread=yes
5926else
Matthias Kloseb9621712010-04-24 17:59:49 +00005927 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5930 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931fi
5932
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933CC="$ac_save_cc"
5934fi
5935
Matthias Kloseb9621712010-04-24 17:59:49 +00005936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5937$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938fi
5939
5940if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5941then
5942# -pthread, if available, provides the right #defines
5943# and linker options to make pthread_create available
5944# Some compilers won't report that they do not support -pthread,
5945# so we need to run a program to see whether it really made the
5946# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5948$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02005949if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005950 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951else
5952 ac_save_cc="$CC"
5953CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005954if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 ac_cv_pthread=no
5956else
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958/* end confdefs.h. */
5959
5960#include <pthread.h>
5961
5962void* routine(void* p){return NULL;}
5963
5964int main(){
5965 pthread_t p;
5966 if(pthread_create(&p,NULL,routine,NULL)!=0)
5967 return 1;
5968 (void)pthread_detach(p);
5969 return 0;
5970}
5971
5972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005973if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 ac_cv_pthread=yes
5975else
Matthias Kloseb9621712010-04-24 17:59:49 +00005976 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980fi
5981
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982CC="$ac_save_cc"
5983fi
5984
Matthias Kloseb9621712010-04-24 17:59:49 +00005985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5986$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987fi
5988
5989# If we have set a CC compiler flag for thread support then
5990# check if it works for CXX, too.
5991ac_cv_cxx_thread=no
5992if test ! -z "$CXX"
5993then
Matthias Kloseb9621712010-04-24 17:59:49 +00005994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5995$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996ac_save_cxx="$CXX"
5997
5998if test "$ac_cv_kpthread" = "yes"
5999then
6000 CXX="$CXX -Kpthread"
6001 ac_cv_cxx_thread=yes
6002elif test "$ac_cv_kthread" = "yes"
6003then
6004 CXX="$CXX -Kthread"
6005 ac_cv_cxx_thread=yes
6006elif test "$ac_cv_pthread" = "yes"
6007then
6008 CXX="$CXX -pthread"
6009 ac_cv_cxx_thread=yes
6010fi
6011
6012if test $ac_cv_cxx_thread = yes
6013then
6014 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6015 $CXX -c conftest.$ac_ext 2>&5
6016 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6017 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6018 then
6019 ac_cv_cxx_thread=yes
6020 else
6021 ac_cv_cxx_thread=no
6022 fi
6023 rm -fr conftest*
6024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6026$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027fi
6028CXX="$ac_save_cxx"
6029
6030
6031# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6033$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006034if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036else
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038/* end confdefs.h. */
6039#include <stdlib.h>
6040#include <stdarg.h>
6041#include <string.h>
6042#include <float.h>
6043
6044int
6045main ()
6046{
6047
6048 ;
6049 return 0;
6050}
6051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006052if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053 ac_cv_header_stdc=yes
6054else
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6058
6059if test $ac_cv_header_stdc = yes; then
6060 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062/* end confdefs.h. */
6063#include <string.h>
6064
6065_ACEOF
6066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 $EGREP "memchr" >/dev/null 2>&1; then :
6068
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069else
6070 ac_cv_header_stdc=no
6071fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006072rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073
6074fi
6075
6076if test $ac_cv_header_stdc = yes; then
6077 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079/* end confdefs.h. */
6080#include <stdlib.h>
6081
6082_ACEOF
6083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 $EGREP "free" >/dev/null 2>&1; then :
6085
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086else
6087 ac_cv_header_stdc=no
6088fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006089rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090
6091fi
6092
6093if test $ac_cv_header_stdc = yes; then
6094 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096 :
6097else
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099/* end confdefs.h. */
6100#include <ctype.h>
6101#include <stdlib.h>
6102#if ((' ' & 0x0FF) == 0x020)
6103# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6104# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6105#else
6106# define ISLOWER(c) \
6107 (('a' <= (c) && (c) <= 'i') \
6108 || ('j' <= (c) && (c) <= 'r') \
6109 || ('s' <= (c) && (c) <= 'z'))
6110# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6111#endif
6112
6113#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6114int
6115main ()
6116{
6117 int i;
6118 for (i = 0; i < 256; i++)
6119 if (XOR (islower (i), ISLOWER (i))
6120 || toupper (i) != TOUPPER (i))
6121 return 2;
6122 return 0;
6123}
6124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006125if ac_fn_c_try_run "$LINENO"; then :
6126
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006127else
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132fi
6133
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134fi
6135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6137$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138if test $ac_cv_header_stdc = yes; then
6139
Matthias Kloseb9621712010-04-24 17:59:49 +00006140$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141
6142fi
6143
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006144for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6145fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006146ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006147shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006148unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006149sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6150sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006151sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006152sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006153sys/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 +00006154sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006155bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006156do :
6157 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6158ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006159if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006160 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006161#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006162_ACEOF
6163
6164fi
6165
Guido van Rossum627b2d71993-12-24 10:39:16 +00006166done
6167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006168ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006169for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006170 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6172$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006173if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006175else
Matthias Kloseb9621712010-04-24 17:59:49 +00006176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006177/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006178#include <sys/types.h>
6179#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006180
Martin v. Löwis11437992002-04-12 09:54:03 +00006181int
6182main ()
6183{
6184if ((DIR *) 0)
6185return 0;
6186 ;
6187 return 0;
6188}
6189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006190if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006191 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006192else
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006197eval ac_res=\$$as_ac_Header
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6199$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006200if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006201 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006202#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006203_ACEOF
6204
6205ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006206fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006208done
6209# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6210if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6212$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006213if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006214 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006215else
Martin v. Löwis11437992002-04-12 09:54:03 +00006216 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006220/* Override any GCC internal prototype to avoid an error.
6221 Use char because int might match the return type of a GCC
6222 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006223#ifdef __cplusplus
6224extern "C"
6225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006226char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006227int
6228main ()
6229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006230return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006231 ;
6232 return 0;
6233}
6234_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006235for ac_lib in '' dir; do
6236 if test -z "$ac_lib"; then
6237 ac_res="none required"
6238 else
6239 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006240 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006242 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006243 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006245rm -f core conftest.err conftest.$ac_objext \
6246 conftest$ac_exeext
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006247 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006250done
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006251if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253else
6254 ac_cv_search_opendir=no
6255fi
6256rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006257LIBS=$ac_func_search_save_LIBS
6258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6260$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006262if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006263 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006264
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006265fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006266
Michael W. Hudson54241132001-12-07 15:38:26 +00006267else
Matthias Kloseb9621712010-04-24 17:59:49 +00006268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6269$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006270if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006271 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006272else
6273 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006276
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006277/* Override any GCC internal prototype to avoid an error.
6278 Use char because int might match the return type of a GCC
6279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006280#ifdef __cplusplus
6281extern "C"
6282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006283char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006284int
6285main ()
6286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006287return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006288 ;
6289 return 0;
6290}
6291_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006292for ac_lib in '' x; do
6293 if test -z "$ac_lib"; then
6294 ac_res="none required"
6295 else
6296 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006297 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006298 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006299 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006300 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006302rm -f core conftest.err conftest.$ac_objext \
6303 conftest$ac_exeext
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006304 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006305 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006307done
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006308if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006310else
6311 ac_cv_search_opendir=no
6312fi
6313rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006314LIBS=$ac_func_search_save_LIBS
6315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6317$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006318ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006319if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006320 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006321
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006322fi
6323
6324fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006325
Matthias Kloseb9621712010-04-24 17:59:49 +00006326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6327$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006328if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006330else
Matthias Kloseb9621712010-04-24 17:59:49 +00006331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006332/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006333#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006334int
6335main ()
6336{
6337return makedev(0, 0);
6338 ;
6339 return 0;
6340}
6341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006342if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343 ac_cv_header_sys_types_h_makedev=yes
6344else
Matthias Kloseb9621712010-04-24 17:59:49 +00006345 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006347rm -f core conftest.err conftest.$ac_objext \
6348 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006349
6350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6352$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006353
6354if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006355ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006356if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006357
Matthias Kloseb9621712010-04-24 17:59:49 +00006358$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359
6360fi
6361
6362
6363
6364 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006365 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006366if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006367
Matthias Kloseb9621712010-04-24 17:59:49 +00006368$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006369
6370fi
6371
6372
6373 fi
6374fi
6375
Michael W. Hudson54241132001-12-07 15:38:26 +00006376
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006377# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006378for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006379do :
6380 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006381#ifdef HAVE_CURSES_H
6382#include <curses.h>
6383#endif
6384
Matthias Kloseb9621712010-04-24 17:59:49 +00006385"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006386if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006387 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006388#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006389_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006390
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006391fi
6392
6393done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006394
6395
Martin v. Löwis11017b12006-01-14 18:12:57 +00006396# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006397for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006398do :
6399 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 +00006400#ifdef HAVE_ASM_TYPES_H
6401#include <asm/types.h>
6402#endif
6403#ifdef HAVE_SYS_SOCKET_H
6404#include <sys/socket.h>
6405#endif
6406
Matthias Kloseb9621712010-04-24 17:59:49 +00006407"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006408if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006409 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006410#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006411_ACEOF
6412
6413fi
6414
6415done
6416
6417
Guido van Rossum627b2d71993-12-24 10:39:16 +00006418# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006419was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6421$as_echo_n "checking for clock_t in time.h... " >&6; }
6422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006423/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006424#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006425
6426_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006428 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006429 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006430else
Martin v. Löwis11437992002-04-12 09:54:03 +00006431
6432
Matthias Kloseb9621712010-04-24 17:59:49 +00006433$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006434
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006435
Guido van Rossum627b2d71993-12-24 10:39:16 +00006436fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006437rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006438
Matthias Kloseb9621712010-04-24 17:59:49 +00006439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6440$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006441
Neal Norwitz11690112002-07-30 01:08:28 +00006442# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6444$as_echo_n "checking for makedev... " >&6; }
6445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006446/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006447
Jesus Cea740f53a2010-04-28 11:35:30 +00006448#if defined(MAJOR_IN_MKDEV)
6449#include <sys/mkdev.h>
6450#elif defined(MAJOR_IN_SYSMACROS)
6451#include <sys/sysmacros.h>
6452#else
6453#include <sys/types.h>
6454#endif
6455
Neal Norwitz11690112002-07-30 01:08:28 +00006456int
6457main ()
6458{
Jesus Cea740f53a2010-04-28 11:35:30 +00006459
6460 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006461 ;
6462 return 0;
6463}
Matthias Kloseb159a552010-04-25 21:00:44 +00006464
Neal Norwitz11690112002-07-30 01:08:28 +00006465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006466if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006467 ac_cv_has_makedev=yes
6468else
Matthias Kloseb9621712010-04-24 17:59:49 +00006469 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006471rm -f core conftest.err conftest.$ac_objext \
6472 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006473if test "$ac_cv_has_makedev" = "no"; then
6474 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006476/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006477
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006478#define _OSF_SOURCE 1
6479#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006480
Neal Norwitz11690112002-07-30 01:08:28 +00006481int
6482main ()
6483{
6484 makedev(0, 0)
6485 ;
6486 return 0;
6487}
6488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006489if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006490 ac_cv_has_makedev=yes
6491else
Matthias Kloseb9621712010-04-24 17:59:49 +00006492 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006494rm -f core conftest.err conftest.$ac_objext \
6495 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006496 if test "$ac_cv_has_makedev" = "yes"; then
6497
Matthias Kloseb9621712010-04-24 17:59:49 +00006498$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006499
6500 fi
6501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6503$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006504if test "$ac_cv_has_makedev" = "yes"; then
6505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006507
6508fi
6509
Martin v. Löwis399a6892002-10-04 10:22:02 +00006510# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6511# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6512# defined, but the compiler does not support pragma redefine_extname,
6513# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6514# structures (such as rlimit64) without declaring them. As a
6515# work-around, disable LFS on such configurations
6516
6517use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6519$as_echo_n "checking Solaris LFS bug... " >&6; }
6520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006521/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006522
6523#define _LARGEFILE_SOURCE 1
6524#define _FILE_OFFSET_BITS 64
6525#include <sys/resource.h>
6526
Martin v. Löwis399a6892002-10-04 10:22:02 +00006527int
6528main ()
6529{
6530struct rlimit foo;
6531 ;
6532 return 0;
6533}
6534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006536 sol_lfs_bug=no
6537else
Matthias Kloseb9621712010-04-24 17:59:49 +00006538 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6542$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006543if test "$sol_lfs_bug" = "yes"; then
6544 use_lfs=no
6545fi
6546
6547if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006548# Two defines needed to enable largefile support on various platforms
6549# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006550case $ac_sys_system/$ac_sys_release in
6551AIX*)
6552
6553$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6554
6555 ;;
6556esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006557
Matthias Kloseb9621712010-04-24 17:59:49 +00006558$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006559
6560
Matthias Kloseb9621712010-04-24 17:59:49 +00006561$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006562
Martin v. Löwis399a6892002-10-04 10:22:02 +00006563fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006564
Guido van Rossum84e7b241996-08-19 21:59:00 +00006565# Add some code to confdefs.h so that the test for off_t works on SCO
6566cat >> confdefs.h <<\EOF
6567#if defined(SCO_DS)
6568#undef _OFF_T
6569#endif
6570EOF
6571
Guido van Rossumef2255b2000-03-10 22:30:29 +00006572# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006573ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006574if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006575
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006576else
Martin v. Löwis11437992002-04-12 09:54:03 +00006577
6578cat >>confdefs.h <<_ACEOF
6579#define mode_t int
6580_ACEOF
6581
6582fi
6583
Matthias Kloseb9621712010-04-24 17:59:49 +00006584ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006585if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006586
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006587else
Martin v. Löwis11437992002-04-12 09:54:03 +00006588
6589cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006590#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006591_ACEOF
6592
6593fi
6594
Matthias Kloseb9621712010-04-24 17:59:49 +00006595ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006596if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006597
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006598else
Martin v. Löwis11437992002-04-12 09:54:03 +00006599
6600cat >>confdefs.h <<_ACEOF
6601#define pid_t int
6602_ACEOF
6603
6604fi
6605
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006606
Martin v. Löwis11437992002-04-12 09:54:03 +00006607cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006608#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006609_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006610
Matthias Kloseb9621712010-04-24 17:59:49 +00006611ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006612if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006613
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006614else
Martin v. Löwis11437992002-04-12 09:54:03 +00006615
6616cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006617#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006618_ACEOF
6619
6620fi
6621
Matthias Kloseb9621712010-04-24 17:59:49 +00006622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6623$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006624if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006625 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006626else
Matthias Kloseb9621712010-04-24 17:59:49 +00006627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006628/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006629#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006630
6631_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006633 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006634 ac_cv_type_uid_t=yes
6635else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006636 ac_cv_type_uid_t=no
6637fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006638rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006639
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6642$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006643if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006644
Matthias Kloseb9621712010-04-24 17:59:49 +00006645$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006646
6647
Matthias Kloseb9621712010-04-24 17:59:49 +00006648$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006649
6650fi
6651
Matthias Kloseb9621712010-04-24 17:59:49 +00006652ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6653case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006654 no|yes) ;; #(
6655 *)
6656
Matthias Kloseb9621712010-04-24 17:59:49 +00006657$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006658
6659
6660cat >>confdefs.h <<_ACEOF
6661#define uint32_t $ac_cv_c_uint32_t
6662_ACEOF
6663;;
6664 esac
6665
Matthias Kloseb9621712010-04-24 17:59:49 +00006666ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6667case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006668 no|yes) ;; #(
6669 *)
6670
Matthias Kloseb9621712010-04-24 17:59:49 +00006671$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006672
6673
6674cat >>confdefs.h <<_ACEOF
6675#define uint64_t $ac_cv_c_uint64_t
6676_ACEOF
6677;;
6678 esac
6679
Matthias Kloseb9621712010-04-24 17:59:49 +00006680ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6681case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006682 no|yes) ;; #(
6683 *)
6684
6685cat >>confdefs.h <<_ACEOF
6686#define int32_t $ac_cv_c_int32_t
6687_ACEOF
6688;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006689esac
6690
Matthias Kloseb9621712010-04-24 17:59:49 +00006691ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6692case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006693 no|yes) ;; #(
6694 *)
6695
6696cat >>confdefs.h <<_ACEOF
6697#define int64_t $ac_cv_c_int64_t
6698_ACEOF
6699;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006700esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006701
Matthias Kloseb9621712010-04-24 17:59:49 +00006702ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006703if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006704
Matthias Kloseb9621712010-04-24 17:59:49 +00006705$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006706
6707fi
6708
Jack Jansendd19cf82001-12-06 22:36:17 +00006709
Michael W. Hudson54241132001-12-07 15:38:26 +00006710# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006711# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712# The cast to long int works around a bug in the HP C Compiler
6713# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6714# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6715# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6717$as_echo_n "checking size of int... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006718if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006719 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006720else
Matthias Kloseb9621712010-04-24 17:59:49 +00006721 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 +00006722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723else
Matthias Kloseb9621712010-04-24 17:59:49 +00006724 if test "$ac_cv_type_int" = yes; then
6725 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6726$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006727as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006728See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006729 else
6730 ac_cv_sizeof_int=0
6731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6736$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006737
6738
6739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006741#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006742_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006743
6744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745# The cast to long int works around a bug in the HP C Compiler
6746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6748# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6750$as_echo_n "checking size of long... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006751if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006752 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006753else
Matthias Kloseb9621712010-04-24 17:59:49 +00006754 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756else
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 if test "$ac_cv_type_long" = yes; then
6758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006760as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006761See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006762 else
6763 ac_cv_sizeof_long=0
6764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006766
Martin v. Löwis11437992002-04-12 09:54:03 +00006767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6769$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006770
6771
6772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006774#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006775_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006776
6777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006778# The cast to long int works around a bug in the HP C Compiler
6779# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6780# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6781# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6783$as_echo_n "checking size of void *... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006784if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006786else
Matthias Kloseb9621712010-04-24 17:59:49 +00006787 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 +00006788
Martin v. Löwis11437992002-04-12 09:54:03 +00006789else
Matthias Kloseb9621712010-04-24 17:59:49 +00006790 if test "$ac_cv_type_void_p" = yes; then
6791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006793as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006794See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006795 else
6796 ac_cv_sizeof_void_p=0
6797 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006799
Martin v. Löwis11437992002-04-12 09:54:03 +00006800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6802$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006803
6804
6805
Martin v. Löwis11437992002-04-12 09:54:03 +00006806cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006807#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006808_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006809
6810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811# The cast to long int works around a bug in the HP C Compiler
6812# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6813# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6814# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6816$as_echo_n "checking size of short... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006817if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006819else
Matthias Kloseb9621712010-04-24 17:59:49 +00006820 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 +00006821
Martin v. Löwis11437992002-04-12 09:54:03 +00006822else
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 if test "$ac_cv_type_short" = yes; then
6824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006826as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006827See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006828 else
6829 ac_cv_sizeof_short=0
6830 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006832
Martin v. Löwis11437992002-04-12 09:54:03 +00006833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6835$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836
6837
6838
Martin v. Löwis11437992002-04-12 09:54:03 +00006839cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006840#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006841_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006842
6843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006844# The cast to long int works around a bug in the HP C Compiler
6845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6847# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6849$as_echo_n "checking size of float... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006850if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006852else
Matthias Kloseb9621712010-04-24 17:59:49 +00006853 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 +00006854
Martin v. Löwis11437992002-04-12 09:54:03 +00006855else
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 if test "$ac_cv_type_float" = yes; then
6857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006859as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006860See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006861 else
6862 ac_cv_sizeof_float=0
6863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006865
Martin v. Löwis11437992002-04-12 09:54:03 +00006866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6868$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006869
6870
6871
Martin v. Löwis11437992002-04-12 09:54:03 +00006872cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006873#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006874_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006875
6876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006877# The cast to long int works around a bug in the HP C Compiler
6878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6880# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6882$as_echo_n "checking size of double... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006883if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006884 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006885else
Matthias Kloseb9621712010-04-24 17:59:49 +00006886 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 +00006887
Martin v. Löwis11437992002-04-12 09:54:03 +00006888else
Matthias Kloseb9621712010-04-24 17:59:49 +00006889 if test "$ac_cv_type_double" = yes; then
6890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006892as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006893See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894 else
6895 ac_cv_sizeof_double=0
6896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006898
Martin v. Löwis11437992002-04-12 09:54:03 +00006899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6901$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902
6903
6904
Martin v. Löwis11437992002-04-12 09:54:03 +00006905cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006906#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006907_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006908
6909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910# The cast to long int works around a bug in the HP C Compiler
6911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6913# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6915$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006916if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006917 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006918else
Matthias Kloseb9621712010-04-24 17:59:49 +00006919 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 +00006920
Martin v. Löwis11437992002-04-12 09:54:03 +00006921else
Matthias Kloseb9621712010-04-24 17:59:49 +00006922 if test "$ac_cv_type_fpos_t" = yes; then
6923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006925as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006926See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006927 else
6928 ac_cv_sizeof_fpos_t=0
6929 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006931
Martin v. Löwis11437992002-04-12 09:54:03 +00006932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6934$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006935
6936
6937
Martin v. Löwis11437992002-04-12 09:54:03 +00006938cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006939#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006940_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006941
Michael W. Hudson54241132001-12-07 15:38:26 +00006942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943# The cast to long int works around a bug in the HP C Compiler
6944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6948$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006949if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006951else
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 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 +00006953
Martin v. Löwis18e16552006-02-15 17:27:45 +00006954else
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 if test "$ac_cv_type_size_t" = yes; then
6956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006958as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006959See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006960 else
6961 ac_cv_sizeof_size_t=0
6962 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006964
Martin v. Löwis18e16552006-02-15 17:27:45 +00006965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6967$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006968
6969
6970
Martin v. Löwis18e16552006-02-15 17:27:45 +00006971cat >>confdefs.h <<_ACEOF
6972#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6973_ACEOF
6974
6975
Christian Heimes400adb02008-02-01 08:12:03 +00006976# The cast to long int works around a bug in the HP C Compiler
6977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6979# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6981$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006982if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006984else
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 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 +00006986
Christian Heimes400adb02008-02-01 08:12:03 +00006987else
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 if test "$ac_cv_type_pid_t" = yes; then
6989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006991as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02006992See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006993 else
6994 ac_cv_sizeof_pid_t=0
6995 fi
6996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006997
Christian Heimes400adb02008-02-01 08:12:03 +00006998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7000$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007001
7002
7003
7004cat >>confdefs.h <<_ACEOF
7005#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7006_ACEOF
7007
7008
Michael W. Hudson54241132001-12-07 15:38:26 +00007009
Matthias Kloseb9621712010-04-24 17:59:49 +00007010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7011$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007012have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007014/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007015
Martin v. Löwis11437992002-04-12 09:54:03 +00007016int
7017main ()
7018{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007019long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007020 ;
7021 return 0;
7022}
7023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007024if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007025
7026
Matthias Kloseb9621712010-04-24 17:59:49 +00007027$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007028
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007029 have_long_long=yes
7030
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7034$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007035if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007036# The cast to long int works around a bug in the HP C Compiler
7037# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7038# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7039# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7041$as_echo_n "checking size of long long... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007042if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007044else
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 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 +00007046
Martin v. Löwis11437992002-04-12 09:54:03 +00007047else
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 if test "$ac_cv_type_long_long" = yes; then
7049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007051as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007052See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007053 else
7054 ac_cv_sizeof_long_long=0
7055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007057
Martin v. Löwis11437992002-04-12 09:54:03 +00007058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7060$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007061
7062
7063
Martin v. Löwis11437992002-04-12 09:54:03 +00007064cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007065#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007066_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007067
Michael W. Hudson54241132001-12-07 15:38:26 +00007068
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007069fi
7070
Matthias Kloseb9621712010-04-24 17:59:49 +00007071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7072$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007073have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007075/* end confdefs.h. */
7076
7077int
7078main ()
7079{
7080long double x; x = (long double)0;
7081 ;
7082 return 0;
7083}
7084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007085if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007086
7087
Matthias Kloseb9621712010-04-24 17:59:49 +00007088$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007089
7090 have_long_double=yes
7091
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007092fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7095$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007096if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007097# The cast to long int works around a bug in the HP C Compiler
7098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7100# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7102$as_echo_n "checking size of long double... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007103if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007105else
Matthias Kloseb9621712010-04-24 17:59:49 +00007106 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 +00007107
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007108else
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 if test "$ac_cv_type_long_double" = yes; then
7110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007112as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007113See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007114 else
7115 ac_cv_sizeof_long_double=0
7116 fi
7117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7121$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007122
7123
7124
7125cat >>confdefs.h <<_ACEOF
7126#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7127_ACEOF
7128
7129
7130fi
7131
7132
Matthias Kloseb9621712010-04-24 17:59:49 +00007133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7134$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007135have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007137/* end confdefs.h. */
7138
7139int
7140main ()
7141{
7142_Bool x; x = (_Bool)0;
7143 ;
7144 return 0;
7145}
7146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007147if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007148
7149
Matthias Kloseb9621712010-04-24 17:59:49 +00007150$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007151
7152 have_c99_bool=yes
7153
Thomas Woutersb2137042007-02-01 18:02:27 +00007154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7157$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007158if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007159# The cast to long int works around a bug in the HP C Compiler
7160# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7161# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7162# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7164$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007165if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007166 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007167else
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 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 +00007169
Thomas Woutersb2137042007-02-01 18:02:27 +00007170else
Matthias Kloseb9621712010-04-24 17:59:49 +00007171 if test "$ac_cv_type__Bool" = yes; then
7172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007174as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007175See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007176 else
7177 ac_cv_sizeof__Bool=0
7178 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007180
Thomas Woutersb2137042007-02-01 18:02:27 +00007181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7183$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007184
7185
7186
Thomas Woutersb2137042007-02-01 18:02:27 +00007187cat >>confdefs.h <<_ACEOF
7188#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7189_ACEOF
7190
7191
7192fi
7193
Matthias Kloseb9621712010-04-24 17:59:49 +00007194ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007195 #include <stdint.h>
7196 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007197 #ifdef HAVE_INTTYPES_H
7198 #include <inttypes.h>
7199 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007200"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007201if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007202
7203cat >>confdefs.h <<_ACEOF
7204#define HAVE_UINTPTR_T 1
7205_ACEOF
7206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007207# The cast to long int works around a bug in the HP C Compiler
7208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7210# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7212$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007213if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 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 +00007217
Martin v. Löwis11437992002-04-12 09:54:03 +00007218else
Matthias Kloseb9621712010-04-24 17:59:49 +00007219 if test "$ac_cv_type_uintptr_t" = yes; then
7220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007222as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007223See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007224 else
7225 ac_cv_sizeof_uintptr_t=0
7226 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007228
Martin v. Löwis11437992002-04-12 09:54:03 +00007229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7231$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232
7233
7234
Martin v. Löwis11437992002-04-12 09:54:03 +00007235cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007236#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007237_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007238
Michael W. Hudson54241132001-12-07 15:38:26 +00007239
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007240fi
7241
Thomas Wouters89f507f2006-12-13 04:49:30 +00007242
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243# The cast to long int works around a bug in the HP C Compiler
7244# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7245# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7246# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7248$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007249if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007253#ifdef HAVE_SYS_TYPES_H
7254#include <sys/types.h>
7255#endif
7256
Matthias Kloseb9621712010-04-24 17:59:49 +00007257"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259else
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 if test "$ac_cv_type_off_t" = yes; then
7261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007263as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007264See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265 else
7266 ac_cv_sizeof_off_t=0
7267 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007269
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7272$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007273
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274
7275
Martin v. Löwis11437992002-04-12 09:54:03 +00007276cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007277#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007278_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007279
Michael W. Hudson54241132001-12-07 15:38:26 +00007280
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007281
Matthias Kloseb9621712010-04-24 17:59:49 +00007282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7283$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007284if test "$have_long_long" = yes
7285then
7286if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007287 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007288
Matthias Kloseb9621712010-04-24 17:59:49 +00007289$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007290
Matthias Kloseb9621712010-04-24 17:59:49 +00007291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7292$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007293else
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7295$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007296fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007297else
Matthias Kloseb9621712010-04-24 17:59:49 +00007298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7299$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007300fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007301
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007302# The cast to long int works around a bug in the HP C Compiler
7303# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7304# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7305# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7307$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007308if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007309 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007310else
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007312#ifdef HAVE_SYS_TYPES_H
7313#include <sys/types.h>
7314#endif
7315#ifdef HAVE_TIME_H
7316#include <time.h>
7317#endif
7318
Matthias Kloseb9621712010-04-24 17:59:49 +00007319"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007320
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007321else
Matthias Kloseb9621712010-04-24 17:59:49 +00007322 if test "$ac_cv_type_time_t" = yes; then
7323 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7324$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007325as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007326See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007327 else
7328 ac_cv_sizeof_time_t=0
7329 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007331
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7334$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007335
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007336
7337
Martin v. Löwis11437992002-04-12 09:54:03 +00007338cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007339#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007340_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007341
Michael W. Hudson54241132001-12-07 15:38:26 +00007342
7343
Trent Mick635f6fb2000-08-23 21:33:05 +00007344# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007345ac_save_cc="$CC"
7346if test "$ac_cv_kpthread" = "yes"
7347then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007348elif test "$ac_cv_kthread" = "yes"
7349then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007350elif test "$ac_cv_pthread" = "yes"
7351then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007352fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007353
Matthias Kloseb9621712010-04-24 17:59:49 +00007354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7355$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007356have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007358/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007359
7360 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007361int
7362main ()
7363{
Guido van Rossum12580492000-09-24 16:47:19 +00007364pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007365 ;
7366 return 0;
7367}
Matthias Kloseb159a552010-04-25 21:00:44 +00007368
Martin v. Löwis11437992002-04-12 09:54:03 +00007369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007370if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007371 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7375$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007376if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007378# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7379# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7380# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7382$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007383if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007384 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007385else
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007387#ifdef HAVE_PTHREAD_H
7388#include <pthread.h>
7389#endif
7390
Matthias Kloseb9621712010-04-24 17:59:49 +00007391"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 if test "$ac_cv_type_pthread_t" = yes; then
7395 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007397as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007398See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007399 else
7400 ac_cv_sizeof_pthread_t=0
7401 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007403
Trent Mick635f6fb2000-08-23 21:33:05 +00007404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7406$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007407
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007408
7409
Martin v. Löwis11437992002-04-12 09:54:03 +00007410cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007411#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007412_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007413
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007414
Trent Mick635f6fb2000-08-23 21:33:05 +00007415fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007416CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007417
Michael W. Hudson54241132001-12-07 15:38:26 +00007418
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007419case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007420 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007421 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7422 ;;
7423 Darwin/*)
7424 OTHER_LIBTOOL_OPT=""
7425 ;;
7426esac
7427
7428
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007429ARCH_RUN_32BIT=""
7430
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007431case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007432 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007433 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7434 if test "${enable_universalsdk}"; then
7435 :
7436 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007437 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007438 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007439 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007440 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007441 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007442 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007443 if test ${gcc_version} '<' 4.0
7444 then
7445 LIBTOOL_CRUFT="-lcc_dynamic"
7446 else
7447 LIBTOOL_CRUFT=""
7448 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007450 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007451else
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007453/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007454
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007455 #include <unistd.h>
7456 int main(int argc, char*argv[])
7457 {
7458 if (sizeof(long) == 4) {
7459 return 0;
7460 } else {
7461 return 1;
7462 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007463 }
7464
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007466if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007467 ac_osx_32bit=yes
7468else
Matthias Kloseb9621712010-04-24 17:59:49 +00007469 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7472 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007473fi
7474
7475
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007476 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007477 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007478 i386)
7479 MACOSX_DEFAULT_ARCH="i386"
7480 ;;
7481 ppc)
7482 MACOSX_DEFAULT_ARCH="ppc"
7483 ;;
7484 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007485 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007486 ;;
7487 esac
7488 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007489 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007490 i386)
7491 MACOSX_DEFAULT_ARCH="x86_64"
7492 ;;
7493 ppc)
7494 MACOSX_DEFAULT_ARCH="ppc64"
7495 ;;
7496 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007497 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007498 ;;
7499 esac
7500
7501 #ARCH_RUN_32BIT="true"
7502 fi
7503
7504 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007505 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007506 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007507esac
7508
Matthias Kloseb9621712010-04-24 17:59:49 +00007509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7510$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007511if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007512then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007513 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007515 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007516
Matthias Kloseb9621712010-04-24 17:59:49 +00007517$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007518
Matthias Kloseb9621712010-04-24 17:59:49 +00007519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7520$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007521 if test $enable_shared = "yes"
7522 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007523 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 +00007524 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007525else
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7527$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007528fi
7529
Matthias Kloseb9621712010-04-24 17:59:49 +00007530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7531$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007532case $ac_sys_system/$ac_sys_release in
7533 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007534
Matthias Kloseb9621712010-04-24 17:59:49 +00007535$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007536
Matthias Kloseb9621712010-04-24 17:59:49 +00007537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7538$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007539 ;;
7540 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7542$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007543 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007544esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007545
Guido van Rossum0a516c91994-09-12 10:58:40 +00007546# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007547
Michael W. Hudson54241132001-12-07 15:38:26 +00007548
7549
7550
7551
Benjamin Peterson99f03762010-04-11 22:15:28 +00007552
Thomas Wouters477c8d52006-05-27 19:21:47 +00007553
Georg Brandlb1441c72009-01-03 22:33:39 +00007554
Thomas Wouters477c8d52006-05-27 19:21:47 +00007555cat >>confdefs.h <<_ACEOF
7556#define SHLIB_EXT "$SO"
7557_ACEOF
7558
Guido van Rossum0a516c91994-09-12 10:58:40 +00007559# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007560# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007561# (Shared libraries in this instance are shared modules to be loaded into
7562# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7564$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007565if test -z "$LDSHARED"
7566then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007567 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007568 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007569 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007570 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007571 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007572 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007573 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007575 if test "$GCC" = "yes" ; then
7576 LDSHARED='$(CC) -shared'
7577 LDCXXSHARED='$(CXX) -shared'
7578 else
7579 LDSHARED='$(CC) -G'
7580 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007581 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007582 hp*|HP*)
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='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007588 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007589 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007590 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007591 LDSHARED='$(CC) -bundle'
7592 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007593 if test "$enable_framework" ; then
7594 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007595 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7596 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007597 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007598 else
7599 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007600 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007601 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007602 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007603 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007604 LDSHARED='$(CC) -bundle'
7605 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007606 if test "$enable_framework" ; then
7607 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007608 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7609 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007610 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007611 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007612 # No framework, use the Python app as bundle-loader
7613 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007614 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007615 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007616 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007617 Darwin/*)
7618 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7619 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007620
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007621 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007622 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007623 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007624 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007625 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007626 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7627 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007628 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007629 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007630 LDSHARED='$(CC) -bundle'
7631 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007632 if test "$enable_framework" ; then
7633 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007634 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7635 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007636 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007637 else
7638 # No framework, use the Python app as bundle-loader
7639 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7640 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007641 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007642 fi
7643 fi
7644 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007645 Linux*|GNU*|QNX*)
7646 LDSHARED='$(CC) -shared'
7647 LDCXXSHARED='$(CXX) -shared';;
7648 BSD/OS*/4*)
7649 LDSHARED="gcc -shared"
7650 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007651 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007652 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007653 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007654 LDSHARED='$(CC) -shared'
7655 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007656 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007657 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007658 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007659 OpenBSD*)
7660 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7661 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007662 LDSHARED='$(CC) -shared $(CCSHARED)'
7663 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007664 else
7665 case `uname -r` in
7666 [01].* | 2.[0-7] | 2.[0-7].*)
7667 LDSHARED="ld -Bshareable ${LDFLAGS}"
7668 ;;
7669 *)
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 ;;
7673 esac
7674 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007675 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007676 LDSHARED='$(CC) -shared'
7677 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007678 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007679 if test "$GCC" = "yes" ; then
7680 LDSHARED='$(CC) -shared'
7681 LDCXXSHARED='$(CXX) -shared'
7682 else
7683 LDSHARED='$(CC) -G'
7684 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007685 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007686 SCO_SV*)
7687 LDSHARED='$(CC) -Wl,-G,-Bexport'
7688 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7689 CYGWIN*)
7690 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7691 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007692 *) LDSHARED="ld";;
7693 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7696$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007697LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007698BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007699# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007700# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7702$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007703if test -z "$CCSHARED"
7704then
Guido van Rossum07397971997-04-29 21:49:50 +00007705 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007706 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007707 then CCSHARED="-fPIC";
7708 elif test `uname -p` = sparc;
7709 then CCSHARED="-xcode=pic32";
7710 else CCSHARED="-Kpic";
7711 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007712 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007713 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007714 else CCSHARED="+z";
7715 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007716 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007717 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007718 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007719 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007720 if test "$GCC" = "yes"
7721 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007722 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007723 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007724 SCO_SV*)
7725 if test "$GCC" = "yes"
7726 then CCSHARED="-fPIC"
7727 else CCSHARED="-Kpic -belf"
7728 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007729 IRIX*/6*) case $CC in
7730 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007731 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007732 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007733 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7736$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007737# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007738# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7740$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007741if test -z "$LINKFORSHARED"
7742then
Guido van Rossum07397971997-04-29 21:49:50 +00007743 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007744 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007745 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007746 LINKFORSHARED="-Wl,-E -Wl,+s";;
7747# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007748 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007749 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007750 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007752 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007753 if test "$enable_framework"
7754 then
Jack Jansenda49e192005-01-07 13:08:22 +00007755 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007756 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007757 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007758 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007759 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007760 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007761 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007762 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7763 then
7764 LINKFORSHARED="-Wl,--export-dynamic"
7765 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007766 SunOS/5*) case $CC in
7767 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007768 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007769 then
7770 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007771 fi;;
7772 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007773 CYGWIN*)
7774 if test $enable_shared = "no"
7775 then
7776 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7777 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007778 QNX*)
7779 # -Wl,-E causes the symbols to be added to the dynamic
7780 # symbol table so that they can be found when a module
7781 # is loaded. -N 2048K causes the stack size to be set
7782 # to 2048 kilobytes so that the stack doesn't overflow
7783 # when running test_compile.py.
7784 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007785 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7788$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007789
Michael W. Hudson54241132001-12-07 15:38:26 +00007790
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007791
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7793$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007794if test ! "$LIBRARY" = "$LDLIBRARY"
7795then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007796 case $ac_sys_system in
7797 CYGWIN*)
7798 # Cygwin needs CCSHARED when building extension DLLs
7799 # but not when building the interpreter DLL.
7800 CFLAGSFORSHARED='';;
7801 *)
7802 CFLAGSFORSHARED='$(CCSHARED)'
7803 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7806$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007807
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007808# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7809# library (with --enable-shared).
7810# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007811# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7812# if it is not required, since it creates a dependency of the shared library
7813# to LIBS. This, in turn, means that applications linking the shared libpython
7814# don't need to link LIBS explicitly. The default should be only changed
7815# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007816
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7818$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007819case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007820 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007821 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007822esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7824$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007825
7826
Guido van Rossum627b2d71993-12-24 10:39:16 +00007827# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7829$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007830if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007832else
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007834LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838/* Override any GCC internal prototype to avoid an error.
7839 Use char because int might match the return type of a GCC
7840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007841#ifdef __cplusplus
7842extern "C"
7843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007844char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007845int
7846main ()
7847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 ;
7850 return 0;
7851}
7852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007854 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007855else
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007858rm -f core conftest.err conftest.$ac_objext \
7859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007860LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7863$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007864if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 cat >>confdefs.h <<_ACEOF
7866#define HAVE_LIBDL 1
7867_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007868
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007869 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007870
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007871fi
7872 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7874$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007875if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007877else
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007879LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883/* Override any GCC internal prototype to avoid an error.
7884 Use char because int might match the return type of a GCC
7885 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007886#ifdef __cplusplus
7887extern "C"
7888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007889char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007890int
7891main ()
7892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007894 ;
7895 return 0;
7896}
7897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007900else
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007903rm -f core conftest.err conftest.$ac_objext \
7904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007905LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7908$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007909if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 cat >>confdefs.h <<_ACEOF
7911#define HAVE_LIBDLD 1
7912_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007913
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007914 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007915
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007916fi
7917 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007918
Georg Brandlb1441c72009-01-03 22:33:39 +00007919# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007920if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7922$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007923if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007925else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007926 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930/* Override any GCC internal prototype to avoid an error.
7931 Use char because int might match the return type of a GCC
7932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007933#ifdef __cplusplus
7934extern "C"
7935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007936char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 ;
7942 return 0;
7943}
7944_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945for ac_lib in '' pthread rt posix4; do
7946 if test -z "$ac_lib"; then
7947 ac_res="none required"
7948 else
7949 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007950 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955rm -f core conftest.err conftest.$ac_objext \
7956 conftest$ac_exeext
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007957 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960done
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007961if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963else
7964 ac_cv_search_sem_init=no
7965fi
7966rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007967LIBS=$ac_func_search_save_LIBS
7968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7970$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007972if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007974
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007975fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007976 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007977 # posix4 on Solaris 2.6
7978 # pthread (first!) on Linux
7979fi
7980
Martin v. Löwis19d17342003-06-14 21:03:05 +00007981# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7983$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02007984if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007986else
7987 ac_check_lib_save_LIBS=$LIBS
7988LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007990/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992/* Override any GCC internal prototype to avoid an error.
7993 Use char because int might match the return type of a GCC
7994 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007995#ifdef __cplusplus
7996extern "C"
7997#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007998char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007999int
8000main ()
8001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008003 ;
8004 return 0;
8005}
8006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008007if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008008 ac_cv_lib_intl_textdomain=yes
8009else
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008012rm -f core conftest.err conftest.$ac_objext \
8013 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008014LIBS=$ac_check_lib_save_LIBS
8015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8017$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008018if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008019
Matthias Kloseb9621712010-04-24 17:59:49 +00008020$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008021
Brett Cannonc6d936e2009-06-07 20:09:53 +00008022 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008023fi
8024
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008025
8026# checks for system dependent C++ extensions support
8027case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8029$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008032
Georg Brandl59e87bd2011-02-15 19:48:59 +00008033 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008034int
8035main ()
8036{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008037loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ;
8039 return 0;
8040}
Matthias Kloseb159a552010-04-25 21:00:44 +00008041
Martin v. Löwis11437992002-04-12 09:54:03 +00008042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008043if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008044
Matthias Kloseb159a552010-04-25 21:00:44 +00008045
Matthias Kloseb9621712010-04-24 17:59:49 +00008046$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008047
Matthias Kloseb159a552010-04-25 21:00:44 +00008048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008049$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008050
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008051else
Matthias Kloseb159a552010-04-25 21:00:44 +00008052
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008054$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008055
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057rm -f core conftest.err conftest.$ac_objext \
8058 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008059 *) ;;
8060esac
8061
Guido van Rossum70c7f481998-03-26 18:44:10 +00008062# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8064$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008065if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008067else
Martin v. Löwis11437992002-04-12 09:54:03 +00008068 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008069LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073/* Override any GCC internal prototype to avoid an error.
8074 Use char because int might match the return type of a GCC
8075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008076#ifdef __cplusplus
8077extern "C"
8078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008079char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008080int
8081main ()
8082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ;
8085 return 0;
8086}
8087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008088if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008090else
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093rm -f core conftest.err conftest.$ac_objext \
8094 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008095LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8098$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008099if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008100 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008101fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008102 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8104$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008105if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008107else
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008109LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113/* Override any GCC internal prototype to avoid an error.
8114 Use char because int might match the return type of a GCC
8115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008116#ifdef __cplusplus
8117extern "C"
8118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008119char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008120int
8121main ()
8122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 ;
8125 return 0;
8126}
8127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008133rm -f core conftest.err conftest.$ac_objext \
8134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008135LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8138$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008139if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008140 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008141fi
8142 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8145$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008148if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8151$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008152LIBS="$withval $LIBS"
8153
8154else
Matthias Kloseb9621712010-04-24 17:59:49 +00008155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8156$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157fi
8158
Guido van Rossum7f43da71994-08-01 12:15:30 +00008159
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008160if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008161 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8162set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8164$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008165if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008166 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008167else
8168 case $PKG_CONFIG in
8169 [\\/]* | ?:[\\/]*)
8170 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8171 ;;
8172 *)
8173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8174for as_dir in $PATH
8175do
8176 IFS=$as_save_IFS
8177 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8180 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008182 break 2
8183 fi
8184done
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008186IFS=$as_save_IFS
8187
8188 ;;
8189esac
8190fi
8191PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8192if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8194$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008195else
Matthias Kloseb9621712010-04-24 17:59:49 +00008196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8197$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008198fi
8199
8200
8201fi
8202if test -z "$ac_cv_path_PKG_CONFIG"; then
8203 ac_pt_PKG_CONFIG=$PKG_CONFIG
8204 # Extract the first word of "pkg-config", so it can be a program name with args.
8205set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8207$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008208if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008210else
8211 case $ac_pt_PKG_CONFIG in
8212 [\\/]* | ?:[\\/]*)
8213 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8214 ;;
8215 *)
8216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8217for as_dir in $PATH
8218do
8219 IFS=$as_save_IFS
8220 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008222 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8223 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008225 break 2
8226 fi
8227done
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008229IFS=$as_save_IFS
8230
8231 ;;
8232esac
8233fi
8234ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8235if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8237$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8240$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008241fi
8242
8243 if test "x$ac_pt_PKG_CONFIG" = x; then
8244 PKG_CONFIG=""
8245 else
8246 case $cross_compiling:$ac_tool_warned in
8247yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8249$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008250ac_tool_warned=yes ;;
8251esac
8252 PKG_CONFIG=$ac_pt_PKG_CONFIG
8253 fi
8254else
8255 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8256fi
8257
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008258
8259# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8261$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008262
8263# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008264if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008265 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008266else
8267 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008268fi
8269
8270
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8272$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008273
8274# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8276$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008277
8278# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008279if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008280 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008281else
8282 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008283fi
8284
8285
8286if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008287 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8288else
8289 LIBFFI_INCLUDEDIR=""
8290fi
8291
8292
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8294$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008295
Benjamin Peterson076ed002010-10-31 17:11:02 +00008296# Check for support for loadable sqlite extensions
8297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8298$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8299# Check whether --enable-loadable-sqlite-extensions was given.
8300if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8301 enableval=$enable_loadable_sqlite_extensions;
8302else
8303 enable_loadable_sqlite_extensions="no"
8304fi
8305
8306
8307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8308$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8309
Matthias Klose55708cc2009-04-30 08:06:49 +00008310# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8312$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008313
8314# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008315if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008316 withval=$with_dbmliborder;
8317if test x$with_dbmliborder = xyes
8318then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008319as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008320else
8321 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8322 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8323 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008324 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008325 fi
8326 done
8327fi
8328fi
8329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8331$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008332
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008333# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008334
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8337$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008339# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008340if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008341 withval=$with_signal_module;
8342fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008343
8344
8345if test -z "$with_signal_module"
8346then with_signal_module="yes"
8347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8349$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008350
8351if test "${with_signal_module}" = "yes"; then
8352 USE_SIGNAL_MODULE=""
8353 SIGNAL_OBJS=""
8354else
8355 USE_SIGNAL_MODULE="#"
8356 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8357fi
8358
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008359# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008360
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008361USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8364$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008365
Guido van Rossumec2f0731997-01-22 20:54:01 +00008366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008368if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8371$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008372LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008373if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008374 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008375fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008376else
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8378$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379fi
8380
Martin v. Löwis11437992002-04-12 09:54:03 +00008381
8382# Templates for things AC_DEFINEd more than once.
8383# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008384
8385
Martin v. Löwis11437992002-04-12 09:54:03 +00008386
8387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8389$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008392if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008393 withval=$with_threads;
8394fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008395
8396
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008397# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008400if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 withval=$with_thread; with_threads=$with_thread
8402fi
8403
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008404
8405if test -z "$with_threads"
8406then with_threads="yes"
8407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8409$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008410
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008411
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008412if test "$with_threads" = "no"
8413then
8414 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008415elif test "$ac_cv_pthread_is_default" = yes
8416then
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008418
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008419 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008421
8422 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008424elif test "$ac_cv_kpthread" = "yes"
8425then
8426 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008427 if test "$ac_cv_cxx_thread" = "yes"; then
8428 CXX="$CXX -Kpthread"
8429 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008430 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008431
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008432 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008433 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008434elif test "$ac_cv_kthread" = "yes"
8435then
8436 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008437 if test "$ac_cv_cxx_thread" = "yes"; then
8438 CXX="$CXX -Kthread"
8439 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008441
8442 posix_threads=yes
8443 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008444elif test "$ac_cv_pthread" = "yes"
8445then
8446 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008447 if test "$ac_cv_cxx_thread" = "yes"; then
8448 CXX="$CXX -pthread"
8449 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008451
8452 posix_threads=yes
8453 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008454else
8455 if test ! -z "$with_threads" -a -d "$with_threads"
8456 then LDFLAGS="$LDFLAGS -L$with_threads"
8457 fi
8458 if test ! -z "$withval" -a -d "$withval"
8459 then LDFLAGS="$LDFLAGS -L$withval"
8460 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008461
8462 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008463 # define _POSIX_THREADS in unistd.h. Some apparently don't
8464 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8466$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008468/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008469
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008470#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008471#ifdef _POSIX_THREADS
8472yes
8473#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008474
8475_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008478 unistd_defines_pthreads=yes
8479else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008480 unistd_defines_pthreads=no
8481fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008482rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8485$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008486
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008488
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008490if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008494
Martin v. Löwis11437992002-04-12 09:54:03 +00008495
Matthias Kloseb9621712010-04-24 17:59:49 +00008496$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008497
8498 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008499 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008500else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008503if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008505
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008510
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008511 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008512else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008513
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008514 # Just looking for pthread_create in libpthread is not enough:
8515 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8516 # So we really have to include pthread.h, and then link.
8517 _libs=$LIBS
8518 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8520$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008522/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008523#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008524
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008525void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008526int
8527main ()
8528{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008529
8530pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 ;
8532 return 0;
8533}
8534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008536
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8538$as_echo "yes" >&6; }
8539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008540
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008541 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008542 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008543else
Martin v. Löwis11437992002-04-12 09:54:03 +00008544
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008545 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008547if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008549
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008550 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008551 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008552else
Guido van Rossumad678af1998-10-02 14:42:15 +00008553
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8555$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008556if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008558else
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008560LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564/* Override any GCC internal prototype to avoid an error.
8565 Use char because int might match the return type of a GCC
8566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008567#ifdef __cplusplus
8568extern "C"
8569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008570char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008571int
8572main ()
8573{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ;
8576 return 0;
8577}
8578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008579if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008581else
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584rm -f core conftest.err conftest.$ac_objext \
8585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008586LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8589$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008590if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008592
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008593 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008594 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008595 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008596else
Greg Steinadf63d62000-07-05 10:38:09 +00008597
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8599$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008600if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008602else
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008604LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608/* Override any GCC internal prototype to avoid an error.
8609 Use char because int might match the return type of a GCC
8610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008611#ifdef __cplusplus
8612extern "C"
8613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008614char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008615int
8616main ()
8617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ;
8620 return 0;
8621}
8622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008625else
Matthias Kloseb9621712010-04-24 17:59:49 +00008626 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628rm -f core conftest.err conftest.$ac_objext \
8629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008630LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8633$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008634if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008636
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008637 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008638 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008639 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008640else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008641
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8643$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008644if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008646else
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008648LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652/* Override any GCC internal prototype to avoid an error.
8653 Use char because int might match the return type of a GCC
8654 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008655#ifdef __cplusplus
8656extern "C"
8657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008658char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
8661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ;
8664 return 0;
8665}
8666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008669else
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672rm -f core conftest.err conftest.$ac_objext \
8673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008674LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8677$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008678if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008680
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008681 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008682 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008683 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008684else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008685
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8687$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008688if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008690else
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008692LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696/* Override any GCC internal prototype to avoid an error.
8697 Use char because int might match the return type of a GCC
8698 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008699#ifdef __cplusplus
8700extern "C"
8701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008702char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008703int
8704main ()
8705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ;
8708 return 0;
8709}
8710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008712 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008713else
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716rm -f core conftest.err conftest.$ac_objext \
8717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008718LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8721$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008722if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008724
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008725 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008726 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008727 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008728else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008729
Martin v. Löwis130fb172001-07-19 11:00:41 +00008730 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008731fi
8732
Guido van Rossum627b2d71993-12-24 10:39:16 +00008733
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008734fi
8735
Guido van Rossum0be3e491997-05-22 20:33:33 +00008736fi
8737
Guido van Rossum49545951997-12-02 19:28:29 +00008738fi
8739
Guido van Rossumb93a8621998-05-07 13:27:32 +00008740fi
8741
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008743rm -f core conftest.err conftest.$ac_objext \
8744 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008745fi
8746
Martin v. Löwis11437992002-04-12 09:54:03 +00008747
8748fi
8749
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008750
Michael W. Hudson54241132001-12-07 15:38:26 +00008751
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8753$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008754if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008756else
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008758LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762/* Override any GCC internal prototype to avoid an error.
8763 Use char because int might match the return type of a GCC
8764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008765#ifdef __cplusplus
8766extern "C"
8767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008768char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008769int
8770main ()
8771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008772return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 ;
8774 return 0;
8775}
8776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008779else
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782rm -f core conftest.err conftest.$ac_objext \
8783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008784LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8787$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008788if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008790
Martin v. Löwis130fb172001-07-19 11:00:41 +00008791 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008792 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008793 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008794fi
8795
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008796
Neal Norwitza978ab02002-11-02 16:58:05 +00008797 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8799$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008800if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008802else
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008804LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808/* Override any GCC internal prototype to avoid an error.
8809 Use char because int might match the return type of a GCC
8810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008811#ifdef __cplusplus
8812extern "C"
8813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008814char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 ;
8820 return 0;
8821}
8822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008823if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008824 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008825else
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828rm -f core conftest.err conftest.$ac_objext \
8829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008830LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8833$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008834if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008836
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008837 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008838 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008839 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008840fi
8841
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008842 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008843
Martin v. Löwis130fb172001-07-19 11:00:41 +00008844 if test "$USE_THREAD_MODULE" != "#"
8845 then
8846 # If the above checks didn't disable threads, (at least) OSF1
8847 # needs this '-threads' argument during linking.
8848 case $ac_sys_system in
8849 OSF1) LDLAST=-threads;;
8850 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008851 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008852fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008853
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008854if test "$posix_threads" = "yes"; then
8855 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008856
Matthias Kloseb9621712010-04-24 17:59:49 +00008857$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008858
8859 fi
8860
8861 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8862 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008863 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008864$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008865
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008866 ;;
8867 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008868$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008869
8870 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008871 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008872$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008873
8874 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008875 esac
8876
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8878$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008879 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008881else
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008883 ac_cv_pthread_system_supported=no
8884else
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008886/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008887#include <pthread.h>
8888 void *foo(void *parm) {
8889 return NULL;
8890 }
8891 main() {
8892 pthread_attr_t attr;
8893 pthread_t id;
8894 if (pthread_attr_init(&attr)) exit(-1);
8895 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8896 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8897 exit(0);
8898 }
8899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008900if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008901 ac_cv_pthread_system_supported=yes
8902else
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008907fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008909
Guido van Rossum627b2d71993-12-24 10:39:16 +00008910fi
8911
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8913$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008914 if test "$ac_cv_pthread_system_supported" = "yes"; then
8915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008917
8918 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 for ac_func in pthread_sigmask
8920do :
8921 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02008922if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008923 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008924#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008925_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008926 case $ac_sys_system in
8927 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008928
Matthias Kloseb9621712010-04-24 17:59:49 +00008929$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008930
8931 ;;
8932 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008933fi
8934done
8935
8936fi
8937
8938
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008939# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008940
Matthias Kloseb9621712010-04-24 17:59:49 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8942$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008944if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8948$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008949 ipv6=no
8950 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8952$as_echo "yes" >&6; }
8953 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954
8955 ipv6=yes
8956 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008958else
Martin v. Löwis11437992002-04-12 09:54:03 +00008959
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008961
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8963$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964 ipv6=no
8965
8966else
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008968/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969 /* AF_INET6 available check */
8970#include <sys/types.h>
8971#include <sys/socket.h>
8972main()
8973{
8974 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8975 exit(1);
8976 else
8977 exit(0);
8978}
8979
Martin v. Löwis11437992002-04-12 09:54:03 +00008980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008981if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008982
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8984$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987else
Matthias Kloseb159a552010-04-25 21:00:44 +00008988
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008991 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008992
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996fi
8997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008999if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9001$as_echo_n "checking if RFC2553 API is available... " >&6; }
9002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009003/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009004
9005 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009006#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009007int
9008main ()
9009{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009010struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009011 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ;
9013 return 0;
9014}
Matthias Kloseb159a552010-04-25 21:00:44 +00009015
Martin v. Löwis11437992002-04-12 09:54:03 +00009016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009017if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009018
9019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009020$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009021 ipv6=yes
9022
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009023else
Matthias Kloseb159a552010-04-25 21:00:44 +00009024
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009026$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009027 ipv6=no
9028
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009031fi
9032
9033if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009035
9036fi
9037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038fi
9039
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040
9041ipv6type=unknown
9042ipv6lib=none
9043ipv6trylibc=no
9044
9045if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9047$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009048 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9049 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050 case $i in
9051 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009054
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055#include <netinet/in.h>
9056#ifdef IPV6_INRIA_VERSION
9057yes
9058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009059_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009062 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009064rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065
9066 ;;
9067 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009069/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009070
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071#include <netinet/in.h>
9072#ifdef __KAME__
9073yes
9074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009075_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078 ipv6type=$i;
9079 ipv6lib=inet6
9080 ipv6libdir=/usr/local/v6/lib
9081 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009082fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009083rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084
9085 ;;
9086 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009088/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009089
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090#include <features.h>
9091#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9092yes
9093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009094_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097 ipv6type=$i;
9098 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009100rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009101
9102 ;;
9103 linux-inet6)
9104 if test -d /usr/inet6; then
9105 ipv6type=$i
9106 ipv6lib=inet6
9107 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009108 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009109 fi
9110 ;;
9111 solaris)
9112 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009113 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114 ipv6type=$i
9115 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009116 fi
9117 fi
9118 ;;
9119 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009121/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009122
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123#include <sys/param.h>
9124#ifdef _TOSHIBA_INET6
9125yes
9126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009127_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009129 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130 ipv6type=$i;
9131 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009132 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009133fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009134rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135
9136 ;;
9137 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009139/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009140
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141#include </usr/local/v6/include/sys/v6config.h>
9142#ifdef __V6D__
9143yes
9144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009148 ipv6type=$i;
9149 ipv6lib=v6;
9150 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009151 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009152fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009153rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009154
9155 ;;
9156 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009158/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009159
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009160#include <sys/param.h>
9161#ifdef _ZETA_MINAMI_INET6
9162yes
9163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009164_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009166 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009167 ipv6type=$i;
9168 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009169 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009170fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009171rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009172
9173 ;;
9174 esac
9175 if test "$ipv6type" != "unknown"; then
9176 break
9177 fi
9178 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9180$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009181fi
9182
9183if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9184 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9185 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9186 echo "using lib$ipv6lib"
9187 else
9188 if test $ipv6trylibc = "yes"; then
9189 echo "using libc"
9190 else
9191 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9192 echo "You need to fetch lib$ipv6lib.a from appropriate"
9193 echo 'ipv6 kit and compile beforehand.'
9194 exit 1
9195 fi
9196 fi
9197fi
9198
Matthias Kloseb9621712010-04-24 17:59:49 +00009199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9200$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009202/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009203
9204 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009205int
9206main ()
9207{
9208FSIORefNum fRef = 0
9209 ;
9210 return 0;
9211}
Matthias Kloseb159a552010-04-25 21:00:44 +00009212
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009214if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009215
Matthias Kloseb159a552010-04-25 21:00:44 +00009216
Matthias Kloseb9621712010-04-24 17:59:49 +00009217$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009218
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9220$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009221
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009222else
Matthias Kloseb159a552010-04-25 21:00:44 +00009223
Matthias Kloseb9621712010-04-24 17:59:49 +00009224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9225$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009226
9227fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9229
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009230# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9232$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009235if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236 withval=$with_doc_strings;
9237fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009238
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009239
9240if test -z "$with_doc_strings"
9241then with_doc_strings="yes"
9242fi
9243if test "$with_doc_strings" != "no"
9244then
9245
Matthias Kloseb9621712010-04-24 17:59:49 +00009246$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009247
9248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9250$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009251
Antoine Pitrou042b1282010-08-13 21:15:58 +00009252# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9254$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009257if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009259if test "$withval" != no
9260then
9261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9265$as_echo "yes" >&6; }
9266else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9267$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009268fi
9269else
Matthias Kloseb9621712010-04-24 17:59:49 +00009270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9271$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272fi
9273
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009274
9275# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9277$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009279# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009280if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281 withval=$with_pymalloc;
9282fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009283
Neil Schemenauera35c6882001-02-27 04:45:05 +00009284
Neil Schemenauer16c22972002-03-22 15:34:49 +00009285if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009286then
9287 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009288 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009289fi
9290if test "$with_pymalloc" != "no"
9291then
Martin v. Löwis11437992002-04-12 09:54:03 +00009292
Matthias Kloseb9621712010-04-24 17:59:49 +00009293$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009294
9295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9297$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009298
Benjamin Peterson05159c42009-12-03 03:01:27 +00009299# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9301$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009302
9303# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009304if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009305 withval=$with_valgrind;
9306else
9307 with_valgrind=no
9308fi
9309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9311$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009312if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009314if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009315
Matthias Kloseb9621712010-04-24 17:59:49 +00009316$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009317
9318else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009319 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009320
9321fi
9322
9323
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009324 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009325fi
9326
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009327# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009328
Guido van Rossum98935bf2001-09-05 19:13:16 +00009329DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009330
Guido van Rossume97ee181999-12-20 21:27:22 +00009331# the dlopen() function means we might want to use dynload_shlib.o. some
9332# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009333for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009334do :
9335 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009336if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009338#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009339_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009340
Guido van Rossume97ee181999-12-20 21:27:22 +00009341fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009342done
Guido van Rossume97ee181999-12-20 21:27:22 +00009343
Michael W. Hudson54241132001-12-07 15:38:26 +00009344
Guido van Rossume97ee181999-12-20 21:27:22 +00009345# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9346# loading of modules.
9347
Matthias Kloseb9621712010-04-24 17:59:49 +00009348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9349$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009350if test -z "$DYNLOADFILE"
9351then
9352 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009353 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9354 if test "$ac_cv_func_dlopen" = yes
9355 then DYNLOADFILE="dynload_shlib.o"
9356 else DYNLOADFILE="dynload_aix.o"
9357 fi
9358 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009359 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009360 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9361 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009362 *)
9363 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9364 # out any dynamic loading
9365 if test "$ac_cv_func_dlopen" = yes
9366 then DYNLOADFILE="dynload_shlib.o"
9367 else DYNLOADFILE="dynload_stub.o"
9368 fi
9369 ;;
9370 esac
9371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9373$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009374if test "$DYNLOADFILE" != "dynload_stub.o"
9375then
Martin v. Löwis11437992002-04-12 09:54:03 +00009376
Matthias Kloseb9621712010-04-24 17:59:49 +00009377$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009378
9379fi
9380
Neil Schemenauer4e425612001-06-19 15:44:15 +00009381# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9382
Michael W. Hudson54241132001-12-07 15:38:26 +00009383
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9385$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009386if test -z "$MACHDEP_OBJS"
9387then
Jack Jansene578a632001-08-15 01:27:14 +00009388 MACHDEP_OBJS=$extra_machdep_objs
9389else
9390 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9393$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009394
Guido van Rossum627b2d71993-12-24 10:39:16 +00009395# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009396for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009397 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009398 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009399 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009400 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009401 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009402 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009403 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9404 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009405 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009406 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009407 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009408 truncate uname unsetenv utimes waitpid wait3 wait4 \
9409 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009410do :
9411 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9412ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009413if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009415#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009416_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009417
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009418fi
9419done
9420
Michael W. Hudson54241132001-12-07 15:38:26 +00009421
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009422# For some functions, having a definition is not sufficient, since
9423# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9425$as_echo_n "checking for chroot... " >&6; }
9426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009427/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009429int
9430main ()
9431{
9432void *x=chroot
9433 ;
9434 return 0;
9435}
9436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009438
Matthias Kloseb9621712010-04-24 17:59:49 +00009439$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009440
Matthias Kloseb159a552010-04-25 21:00:44 +00009441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009442$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009443else
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009446
9447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9450$as_echo_n "checking for link... " >&6; }
9451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009452/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009453#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009454int
9455main ()
9456{
9457void *x=link
9458 ;
9459 return 0;
9460}
9461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009463
Matthias Kloseb9621712010-04-24 17:59:49 +00009464$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009465
Matthias Kloseb159a552010-04-25 21:00:44 +00009466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009467$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009468else
Matthias Kloseb9621712010-04-24 17:59:49 +00009469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009471
9472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9475$as_echo_n "checking for symlink... " >&6; }
9476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009477/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009478#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009479int
9480main ()
9481{
9482void *x=symlink
9483 ;
9484 return 0;
9485}
9486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009490
Matthias Kloseb159a552010-04-25 21:00:44 +00009491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009492$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009493else
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009496
9497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9500$as_echo_n "checking for fchdir... " >&6; }
9501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009502/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009503#include <unistd.h>
9504int
9505main ()
9506{
9507void *x=fchdir
9508 ;
9509 return 0;
9510}
9511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009513
Matthias Kloseb9621712010-04-24 17:59:49 +00009514$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009515
Matthias Kloseb159a552010-04-25 21:00:44 +00009516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009517$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009518else
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9520$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009521
9522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9525$as_echo_n "checking for fsync... " >&6; }
9526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009527/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009528#include <unistd.h>
9529int
9530main ()
9531{
9532void *x=fsync
9533 ;
9534 return 0;
9535}
9536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009537if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009538
Matthias Kloseb9621712010-04-24 17:59:49 +00009539$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009540
Matthias Kloseb159a552010-04-25 21:00:44 +00009541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009542$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009546
9547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9550$as_echo_n "checking for fdatasync... " >&6; }
9551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009552/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009553#include <unistd.h>
9554int
9555main ()
9556{
9557void *x=fdatasync
9558 ;
9559 return 0;
9560}
9561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009565
Matthias Kloseb159a552010-04-25 21:00:44 +00009566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009567$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009568else
Matthias Kloseb9621712010-04-24 17:59:49 +00009569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9570$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009571
9572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9575$as_echo_n "checking for epoll... " >&6; }
9576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009577/* end confdefs.h. */
9578#include <sys/epoll.h>
9579int
9580main ()
9581{
9582void *x=epoll_create
9583 ;
9584 return 0;
9585}
9586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009587if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009588
Matthias Kloseb9621712010-04-24 17:59:49 +00009589$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009590
Matthias Kloseb159a552010-04-25 21:00:44 +00009591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009592$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009593else
Matthias Kloseb9621712010-04-24 17:59:49 +00009594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9595$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009596
9597fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9600$as_echo_n "checking for kqueue... " >&6; }
9601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009602/* end confdefs.h. */
9603
9604#include <sys/types.h>
9605#include <sys/event.h>
9606
9607int
9608main ()
9609{
9610int x=kqueue()
9611 ;
9612 return 0;
9613}
9614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009615if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009616
Matthias Kloseb9621712010-04-24 17:59:49 +00009617$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009618
Matthias Kloseb159a552010-04-25 21:00:44 +00009619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009620$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009621else
Matthias Kloseb9621712010-04-24 17:59:49 +00009622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9623$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009624
9625fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009627# On some systems (eg. FreeBSD 5), we would find a definition of the
9628# functions ctermid_r, setgroups in the library, but no prototype
9629# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9630# address to avoid compiler warnings and potential miscompilations
9631# because of the missing prototypes.
9632
Matthias Kloseb9621712010-04-24 17:59:49 +00009633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9634$as_echo_n "checking for ctermid_r... " >&6; }
9635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009636/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009637
Martin v. Löwisd5843682002-11-21 20:41:28 +00009638#include <stdio.h>
9639
Martin v. Löwisd5843682002-11-21 20:41:28 +00009640int
9641main ()
9642{
9643void* p = ctermid_r
9644 ;
9645 return 0;
9646}
9647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009649
Matthias Kloseb9621712010-04-24 17:59:49 +00009650$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009651
Matthias Kloseb159a552010-04-25 21:00:44 +00009652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009653$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009654else
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009657
9658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9660
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9662$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009663if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009664 $as_echo_n "(cached) " >&6
9665else
9666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009667/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009668#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009669int
9670main ()
9671{
9672void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009673
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009674 ;
9675 return 0;
9676}
9677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009678if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009679 ac_cv_flock_decl=yes
9680else
9681 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009682
9683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009685
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009686fi
9687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9688$as_echo "$ac_cv_flock_decl" >&6; }
9689if test "x${ac_cv_flock_decl}" = xyes; then
9690 for ac_func in flock
9691do :
9692 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009693if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009694 cat >>confdefs.h <<_ACEOF
9695#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009696_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009697
Antoine Pitroua3000072010-09-07 14:52:42 +00009698else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009700$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009701if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009702 $as_echo_n "(cached) " >&6
9703else
9704 ac_check_lib_save_LIBS=$LIBS
9705LIBS="-lbsd $LIBS"
9706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9707/* end confdefs.h. */
9708
9709/* Override any GCC internal prototype to avoid an error.
9710 Use char because int might match the return type of a GCC
9711 builtin and then its argument prototype would still apply. */
9712#ifdef __cplusplus
9713extern "C"
9714#endif
9715char flock ();
9716int
9717main ()
9718{
9719return flock ();
9720 ;
9721 return 0;
9722}
9723_ACEOF
9724if ac_fn_c_try_link "$LINENO"; then :
9725 ac_cv_lib_bsd_flock=yes
9726else
9727 ac_cv_lib_bsd_flock=no
9728fi
9729rm -f core conftest.err conftest.$ac_objext \
9730 conftest$ac_exeext conftest.$ac_ext
9731LIBS=$ac_check_lib_save_LIBS
9732fi
9733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9734$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009735if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009736 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009737
9738
9739$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9740
9741
9742fi
9743
9744
9745fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009746done
9747
Antoine Pitroua3000072010-09-07 14:52:42 +00009748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009749
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9751$as_echo_n "checking for getpagesize... " >&6; }
9752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009753/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009754
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009755#include <unistd.h>
9756
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009757int
9758main ()
9759{
9760void* p = getpagesize
9761 ;
9762 return 0;
9763}
9764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009765if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009766
Matthias Kloseb9621712010-04-24 17:59:49 +00009767$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009768
Matthias Kloseb159a552010-04-25 21:00:44 +00009769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009770$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009771else
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009774
9775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009777
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009778for ac_prog in true
9779do
9780 # Extract the first word of "$ac_prog", so it can be a program name with args.
9781set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9783$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009784if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009785 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009786else
9787 if test -n "$TRUE"; then
9788 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9789else
9790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791for as_dir in $PATH
9792do
9793 IFS=$as_save_IFS
9794 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796 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 +00009797 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 $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 +00009799 break 2
9800 fi
9801done
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009803IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009804
9805fi
9806fi
9807TRUE=$ac_cv_prog_TRUE
9808if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9810$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009811else
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009814fi
9815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009817 test -n "$TRUE" && break
9818done
9819test -n "$TRUE" || TRUE="/bin/true"
9820
9821
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9823$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009824if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009826else
9827 ac_check_lib_save_LIBS=$LIBS
9828LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009830/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832/* Override any GCC internal prototype to avoid an error.
9833 Use char because int might match the return type of a GCC
9834 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009835#ifdef __cplusplus
9836extern "C"
9837#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009838char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009839int
9840main ()
9841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843 ;
9844 return 0;
9845}
9846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009848 ac_cv_lib_c_inet_aton=yes
9849else
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009852rm -f core conftest.err conftest.$ac_objext \
9853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009854LIBS=$ac_check_lib_save_LIBS
9855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9857$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009858if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009859 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009860else
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9862$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009863if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009865else
9866 ac_check_lib_save_LIBS=$LIBS
9867LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009869/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871/* Override any GCC internal prototype to avoid an error.
9872 Use char because int might match the return type of a GCC
9873 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009874#ifdef __cplusplus
9875extern "C"
9876#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009877char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009878int
9879main ()
9880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009882 ;
9883 return 0;
9884}
9885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009887 ac_cv_lib_resolv_inet_aton=yes
9888else
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009891rm -f core conftest.err conftest.$ac_objext \
9892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009893LIBS=$ac_check_lib_save_LIBS
9894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9896$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009897if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009898 cat >>confdefs.h <<_ACEOF
9899#define HAVE_LIBRESOLV 1
9900_ACEOF
9901
9902 LIBS="-lresolv $LIBS"
9903
9904fi
9905
9906
9907fi
9908
9909
Christian Heimesd0764e22007-12-04 15:00:33 +00009910# On Tru64, chflags seems to be present, but calling it will
9911# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9913$as_echo_n "checking for chflags... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009914if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009916else
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009918 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009919else
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009921/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009922
Christian Heimesd0764e22007-12-04 15:00:33 +00009923#include <sys/stat.h>
9924#include <unistd.h>
9925int main(int argc, char*argv[])
9926{
9927 if(chflags(argv[0], 0) != 0)
9928 return 1;
9929 return 0;
9930}
Ned Deily3eb67d52011-06-28 00:00:28 -07009931
Christian Heimesd0764e22007-12-04 15:00:33 +00009932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009933if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009934 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009935else
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009940fi
9941
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009942
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9945$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009946if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009948if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009949 ac_cv_have_chflags="yes"
9950else
9951 ac_cv_have_chflags="no"
9952fi
9953
9954fi
9955if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009956
Matthias Kloseb9621712010-04-24 17:59:49 +00009957$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009958
9959fi
9960
Matthias Kloseb9621712010-04-24 17:59:49 +00009961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9962$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009963if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009964 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009965else
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009967 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009968else
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009970/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009971
Christian Heimesd0764e22007-12-04 15:00:33 +00009972#include <sys/stat.h>
9973#include <unistd.h>
9974int main(int argc, char*argv[])
9975{
9976 if(lchflags(argv[0], 0) != 0)
9977 return 1;
9978 return 0;
9979}
Ned Deily3eb67d52011-06-28 00:00:28 -07009980
Christian Heimesd0764e22007-12-04 15:00:33 +00009981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009982if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009983 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009984else
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009989fi
9990
9991
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9994$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009995if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natalibeed47e2011-07-22 23:48:44 +02009997if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009998 ac_cv_have_lchflags="yes"
9999else
10000 ac_cv_have_lchflags="no"
10001fi
10002
10003fi
10004if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010007
10008fi
10009
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010010case $ac_sys_system/$ac_sys_release in
10011Darwin/*)
10012 _CUR_CFLAGS="${CFLAGS}"
10013 _CUR_LDFLAGS="${LDFLAGS}"
10014 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10015 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10016 ;;
10017esac
10018
Matthias Kloseb9621712010-04-24 17:59:49 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10020$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010021if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010022 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010023else
10024 ac_check_lib_save_LIBS=$LIBS
10025LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010027/* end confdefs.h. */
10028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010029/* Override any GCC internal prototype to avoid an error.
10030 Use char because int might match the return type of a GCC
10031 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010032#ifdef __cplusplus
10033extern "C"
10034#endif
10035char inflateCopy ();
10036int
10037main ()
10038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010040 ;
10041 return 0;
10042}
10043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010044if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010045 ac_cv_lib_z_inflateCopy=yes
10046else
Matthias Kloseb9621712010-04-24 17:59:49 +000010047 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010049rm -f core conftest.err conftest.$ac_objext \
10050 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010051LIBS=$ac_check_lib_save_LIBS
10052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10054$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010055if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010058
10059fi
10060
10061
10062case $ac_sys_system/$ac_sys_release in
10063Darwin/*)
10064 CFLAGS="${_CUR_CFLAGS}"
10065 LDFLAGS="${_CUR_LDFLAGS}"
10066 ;;
10067esac
10068
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10070$as_echo_n "checking for hstrerror... " >&6; }
10071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010072/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010073
Martin v. Löwise9416172003-05-03 10:12:45 +000010074#include <netdb.h>
10075
Martin v. Löwise9416172003-05-03 10:12:45 +000010076int
10077main ()
10078{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010079void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010080 ;
10081 return 0;
10082}
10083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010085
Matthias Kloseb9621712010-04-24 17:59:49 +000010086$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010087
Matthias Kloseb159a552010-04-25 21:00:44 +000010088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010089$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010090else
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010093
10094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010095rm -f core conftest.err conftest.$ac_objext \
10096 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10099$as_echo_n "checking for inet_aton... " >&6; }
10100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010101/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010102
Martin v. Löwis86d66262006-02-17 08:40:11 +000010103#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010104#include <sys/socket.h>
10105#include <netinet/in.h>
10106#include <arpa/inet.h>
10107
Martin v. Löwise9416172003-05-03 10:12:45 +000010108int
10109main ()
10110{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010111void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010112 ;
10113 return 0;
10114}
10115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010117
Matthias Kloseb9621712010-04-24 17:59:49 +000010118$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010119
Matthias Kloseb159a552010-04-25 21:00:44 +000010120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010121$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010122else
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010125
10126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010127rm -f core conftest.err conftest.$ac_objext \
10128 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129
Matthias Kloseb9621712010-04-24 17:59:49 +000010130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10131$as_echo_n "checking for inet_pton... " >&6; }
10132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010133/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010134
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010135#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010136#include <sys/socket.h>
10137#include <netinet/in.h>
10138#include <arpa/inet.h>
10139
Martin v. Löwise9416172003-05-03 10:12:45 +000010140int
10141main ()
10142{
10143void* p = inet_pton
10144 ;
10145 return 0;
10146}
10147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010148if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010149
Matthias Kloseb9621712010-04-24 17:59:49 +000010150$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010151
Matthias Kloseb159a552010-04-25 21:00:44 +000010152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010153$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010154else
Matthias Kloseb9621712010-04-24 17:59:49 +000010155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10156$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010157
10158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010160
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010161# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10163$as_echo_n "checking for setgroups... " >&6; }
10164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010165/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010166
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010167#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010168#ifdef HAVE_GRP_H
10169#include <grp.h>
10170#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010171
Martin v. Löwisd5843682002-11-21 20:41:28 +000010172int
10173main ()
10174{
10175void* p = setgroups
10176 ;
10177 return 0;
10178}
10179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010181
Matthias Kloseb9621712010-04-24 17:59:49 +000010182$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010183
Matthias Kloseb159a552010-04-25 21:00:44 +000010184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010185$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010186else
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010189
10190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010192
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010193# check for openpty and forkpty
10194
10195for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010196do :
10197 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010198if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010200#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010201_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010202
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010203else
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10205$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010206if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010208else
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010210LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214/* Override any GCC internal prototype to avoid an error.
10215 Use char because int might match the return type of a GCC
10216 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010217#ifdef __cplusplus
10218extern "C"
10219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010220char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010221int
10222main ()
10223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 ;
10226 return 0;
10227}
10228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010231else
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010234rm -f core conftest.err conftest.$ac_objext \
10235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010236LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10239$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010240if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010242 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010243else
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10245$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010246if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010248else
10249 ac_check_lib_save_LIBS=$LIBS
10250LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010252/* end confdefs.h. */
10253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010254/* Override any GCC internal prototype to avoid an error.
10255 Use char because int might match the return type of a GCC
10256 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010257#ifdef __cplusplus
10258extern "C"
10259#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010260char openpty ();
10261int
10262main ()
10263{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010265 ;
10266 return 0;
10267}
10268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010269if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010270 ac_cv_lib_bsd_openpty=yes
10271else
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010274rm -f core conftest.err conftest.$ac_objext \
10275 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010276LIBS=$ac_check_lib_save_LIBS
10277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10279$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010280if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010282 LIBS="$LIBS -lbsd"
10283fi
10284
10285
10286fi
10287
Fred Drake8cef4cf2000-06-28 16:40:38 +000010288
10289fi
10290done
10291
10292for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010293do :
10294 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010295if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010297#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010298_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010299
Fred Drake8cef4cf2000-06-28 16:40:38 +000010300else
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10302$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010303if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010305else
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010307LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311/* Override any GCC internal prototype to avoid an error.
10312 Use char because int might match the return type of a GCC
10313 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314#ifdef __cplusplus
10315extern "C"
10316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010317char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010318int
10319main ()
10320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ;
10323 return 0;
10324}
10325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010328else
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010331rm -f core conftest.err conftest.$ac_objext \
10332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010333LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10336$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010337if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010339 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010340else
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10342$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010343if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010345else
10346 ac_check_lib_save_LIBS=$LIBS
10347LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010349/* end confdefs.h. */
10350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351/* Override any GCC internal prototype to avoid an error.
10352 Use char because int might match the return type of a GCC
10353 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010354#ifdef __cplusplus
10355extern "C"
10356#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010357char forkpty ();
10358int
10359main ()
10360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010361return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010362 ;
10363 return 0;
10364}
10365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010366if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010367 ac_cv_lib_bsd_forkpty=yes
10368else
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010371rm -f core conftest.err conftest.$ac_objext \
10372 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010373LIBS=$ac_check_lib_save_LIBS
10374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10376$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010377if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010379 LIBS="$LIBS -lbsd"
10380fi
10381
10382
10383fi
10384
Fred Drake8cef4cf2000-06-28 16:40:38 +000010385
10386fi
10387done
10388
Jack Jansendd19cf82001-12-06 22:36:17 +000010389
Christian Heimesb186d002008-03-18 15:15:01 +000010390# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010391for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010392do :
10393 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010394if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010395 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010396#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010397_ACEOF
10398
10399fi
10400done
10401
10402
Michael W. Hudson54241132001-12-07 15:38:26 +000010403# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010404for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010405do :
10406 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10407ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010408if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010409 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010410#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010411_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010412
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010413fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010414done
10415
Michael W. Hudson54241132001-12-07 15:38:26 +000010416
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010417ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010418if test "x$ac_cv_func_dup2" = x""yes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010419 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010420
Martin v. Löwis1142de32002-03-29 16:28:31 +000010421else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010423 *" dup2.$ac_objext "* ) ;;
10424 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010426esac
10427
Martin v. Löwis1142de32002-03-29 16:28:31 +000010428fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010429
10430ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010431if test "x$ac_cv_func_getcwd" = x""yes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010432 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10433
10434else
10435 case " $LIBOBJS " in
10436 *" getcwd.$ac_objext "* ) ;;
10437 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10438 ;;
10439esac
10440
10441fi
10442
10443ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010444if test "x$ac_cv_func_strdup" = x""yes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010445 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10446
10447else
10448 case " $LIBOBJS " in
10449 *" strdup.$ac_objext "* ) ;;
10450 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10451 ;;
10452esac
10453
10454fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010455
10456
10457for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010458do :
10459 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010460if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010462#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010465/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010466#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010467int
10468main ()
10469{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010470getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010471 ;
10472 return 0;
10473}
10474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010476
Matthias Kloseb9621712010-04-24 17:59:49 +000010477$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010478
Guido van Rossum627b2d71993-12-24 10:39:16 +000010479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010481
Guido van Rossum627b2d71993-12-24 10:39:16 +000010482fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010483done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010484
Jack Jansen150753c2003-03-29 22:07:47 +000010485for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010486do :
10487 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010488if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010489 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010490#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010493/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010494#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010495int
10496main ()
10497{
10498setpgrp(0,0);
10499 ;
10500 return 0;
10501}
10502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010503if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010504
Matthias Kloseb9621712010-04-24 17:59:49 +000010505$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010506
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010509
10510fi
10511done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010512
Thomas Wouters3a584202000-08-05 23:28:51 +000010513for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010514do :
10515 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010516if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010517 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010518#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010521/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010522#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010523int
10524main ()
10525{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010526gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 ;
10528 return 0;
10529}
10530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010531if ac_fn_c_try_compile "$LINENO"; then :
10532
Guido van Rossum627b2d71993-12-24 10:39:16 +000010533else
Skip Montanaro6dead952003-09-25 14:50:04 +000010534
Matthias Kloseb9621712010-04-24 17:59:49 +000010535$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010536
Martin v. Löwis11437992002-04-12 09:54:03 +000010537
Guido van Rossum627b2d71993-12-24 10:39:16 +000010538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010540
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010541fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010542done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010543
Michael W. Hudson54241132001-12-07 15:38:26 +000010544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10546$as_echo_n "checking for major... " >&6; }
10547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010548/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010549
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010550#if defined(MAJOR_IN_MKDEV)
10551#include <sys/mkdev.h>
10552#elif defined(MAJOR_IN_SYSMACROS)
10553#include <sys/sysmacros.h>
10554#else
10555#include <sys/types.h>
10556#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010557
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010558int
10559main ()
10560{
10561
10562 makedev(major(0),minor(0));
10563
10564 ;
10565 return 0;
10566}
10567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010569
10570
Matthias Kloseb9621712010-04-24 17:59:49 +000010571$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010572
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10574$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010575
10576else
Skip Montanaro6dead952003-09-25 14:50:04 +000010577
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010580
10581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010582rm -f core conftest.err conftest.$ac_objext \
10583 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010584
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010585# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010586# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10588$as_echo_n "checking for getaddrinfo... " >&6; }
10589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010590/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010591
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010592#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010593#include <sys/socket.h>
10594#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010595#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010596
Martin v. Löwis11437992002-04-12 09:54:03 +000010597int
10598main ()
10599{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010600getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010601 ;
10602 return 0;
10603}
10604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010605if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010606 have_getaddrinfo=yes
10607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010610rm -f core conftest.err conftest.$ac_objext \
10611 conftest$ac_exeext conftest.$ac_ext
10612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10613$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010614if test $have_getaddrinfo = yes
10615then
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10617$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010618 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010620else
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010622 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010623else
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010625/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010626
10627#include <sys/types.h>
10628#include <netdb.h>
10629#include <string.h>
10630#include <sys/socket.h>
10631#include <netinet/in.h>
10632
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010633int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010634{
10635 int passive, gaierr, inet4 = 0, inet6 = 0;
10636 struct addrinfo hints, *ai, *aitop;
10637 char straddr[INET6_ADDRSTRLEN], strport[16];
10638
10639 for (passive = 0; passive <= 1; passive++) {
10640 memset(&hints, 0, sizeof(hints));
10641 hints.ai_family = AF_UNSPEC;
10642 hints.ai_flags = passive ? AI_PASSIVE : 0;
10643 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010644 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010645 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10646 (void)gai_strerror(gaierr);
10647 goto bad;
10648 }
10649 for (ai = aitop; ai; ai = ai->ai_next) {
10650 if (ai->ai_addr == NULL ||
10651 ai->ai_addrlen == 0 ||
10652 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10653 straddr, sizeof(straddr), strport, sizeof(strport),
10654 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10655 goto bad;
10656 }
10657 switch (ai->ai_family) {
10658 case AF_INET:
10659 if (strcmp(strport, "54321") != 0) {
10660 goto bad;
10661 }
10662 if (passive) {
10663 if (strcmp(straddr, "0.0.0.0") != 0) {
10664 goto bad;
10665 }
10666 } else {
10667 if (strcmp(straddr, "127.0.0.1") != 0) {
10668 goto bad;
10669 }
10670 }
10671 inet4++;
10672 break;
10673 case AF_INET6:
10674 if (strcmp(strport, "54321") != 0) {
10675 goto bad;
10676 }
10677 if (passive) {
10678 if (strcmp(straddr, "::") != 0) {
10679 goto bad;
10680 }
10681 } else {
10682 if (strcmp(straddr, "::1") != 0) {
10683 goto bad;
10684 }
10685 }
10686 inet6++;
10687 break;
10688 case AF_UNSPEC:
10689 goto bad;
10690 break;
10691 default:
10692 /* another family support? */
10693 break;
10694 }
10695 }
10696 }
10697
10698 if (!(inet4 == 0 || inet4 == 2))
10699 goto bad;
10700 if (!(inet6 == 0 || inet6 == 2))
10701 goto bad;
10702
10703 if (aitop)
10704 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010705 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010706
10707 bad:
10708 if (aitop)
10709 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010710 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010711}
10712
Martin v. Löwis11437992002-04-12 09:54:03 +000010713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010714if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010715 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010716else
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010723fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010724
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10728$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10729
Mark Dickinson2df5d282009-12-31 21:22:50 +000010730if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010731then
10732 if test $ipv6 = yes
10733 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010734 echo 'Fatal: You must get working getaddrinfo() function.'
10735 echo ' or you can specify "--disable-ipv6"'.
10736 exit 1
10737 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010738else
Martin v. Löwis11437992002-04-12 09:54:03 +000010739
Matthias Kloseb9621712010-04-24 17:59:49 +000010740$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010741
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010742fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010743
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010744for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010745do :
10746 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010747if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010749#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010750_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010751
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010752fi
10753done
10754
Michael W. Hudson54241132001-12-07 15:38:26 +000010755
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010756# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10758$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010759if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010761else
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010763/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764#include <sys/types.h>
10765#include <sys/time.h>
10766#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010767
Martin v. Löwis11437992002-04-12 09:54:03 +000010768int
10769main ()
10770{
10771if ((struct tm *) 0)
10772return 0;
10773 ;
10774 return 0;
10775}
10776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010777if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010778 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010779else
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10785$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010786if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010789
10790fi
10791
Matthias Kloseb9621712010-04-24 17:59:49 +000010792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10793$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010794if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010796else
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010799#include <sys/types.h>
10800#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010801
Martin v. Löwis11437992002-04-12 09:54:03 +000010802int
10803main ()
10804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010805struct tm tm;
10806 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 ;
10809 return 0;
10810}
10811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010812if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010813 ac_cv_struct_tm=time.h
10814else
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10820$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010821if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010824
10825fi
10826
Matthias Kloseb9621712010-04-24 17:59:49 +000010827ac_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 +000010828#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010829
Matthias Kloseb9621712010-04-24 17:59:49 +000010830"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010831if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010832
10833cat >>confdefs.h <<_ACEOF
10834#define HAVE_STRUCT_TM_TM_ZONE 1
10835_ACEOF
10836
10837
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010838fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010839
Martin v. Löwis11437992002-04-12 09:54:03 +000010840if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10841
Matthias Kloseb9621712010-04-24 17:59:49 +000010842$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010843
10844else
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10846"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010847if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010849else
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010851fi
10852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010853cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010854#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010855_ACEOF
10856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10858$as_echo_n "checking for tzname... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010859if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861else
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010863/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010864#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010865#if !HAVE_DECL_TZNAME
10866extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010868
Martin v. Löwis11437992002-04-12 09:54:03 +000010869int
10870main ()
10871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010872return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010873 ;
10874 return 0;
10875}
10876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010877if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878 ac_cv_var_tzname=yes
10879else
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010882rm -f core conftest.err conftest.$ac_objext \
10883 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10886$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010887 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010890
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010891 fi
10892fi
10893
Matthias Kloseb9621712010-04-24 17:59:49 +000010894ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010895if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010896
10897cat >>confdefs.h <<_ACEOF
10898#define HAVE_STRUCT_STAT_ST_RDEV 1
10899_ACEOF
10900
10901
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010902fi
10903
Matthias Kloseb9621712010-04-24 17:59:49 +000010904ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010905if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010906
Martin v. Löwis11437992002-04-12 09:54:03 +000010907cat >>confdefs.h <<_ACEOF
10908#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10909_ACEOF
10910
10911
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010912fi
10913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010915if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010916
10917cat >>confdefs.h <<_ACEOF
10918#define HAVE_STRUCT_STAT_ST_FLAGS 1
10919_ACEOF
10920
10921
10922fi
10923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010925if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010926
10927cat >>confdefs.h <<_ACEOF
10928#define HAVE_STRUCT_STAT_ST_GEN 1
10929_ACEOF
10930
10931
10932fi
10933
Matthias Kloseb9621712010-04-24 17:59:49 +000010934ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010935if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010936
10937cat >>confdefs.h <<_ACEOF
10938#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10939_ACEOF
10940
10941
10942fi
10943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010945if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010946
Martin v. Löwis11437992002-04-12 09:54:03 +000010947cat >>confdefs.h <<_ACEOF
10948#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10949_ACEOF
10950
10951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010953
10954else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010956 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10958 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010959esac
10960
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010961fi
10962
Michael W. Hudson54241132001-12-07 15:38:26 +000010963
Martin v. Löwis11437992002-04-12 09:54:03 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10966$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020010967if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010969else
Matthias Kloseb159a552010-04-25 21:00:44 +000010970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010972/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010973#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010974int
10975main ()
10976{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010977return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 ;
10979 return 0;
10980}
10981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010982if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010983 ac_cv_header_time_altzone=yes
10984else
Matthias Kloseb9621712010-04-24 17:59:49 +000010985 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989fi
10990
Matthias Kloseb9621712010-04-24 17:59:49 +000010991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10992$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010993if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010996
10997fi
10998
Guido van Rossumda88dad1995-01-26 00:46:29 +000010999was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11001$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011003/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011004
11005#include <sys/types.h>
11006#include <sys/select.h>
11007#include <sys/time.h>
11008
Martin v. Löwis11437992002-04-12 09:54:03 +000011009int
11010main ()
11011{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011012;
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 ;
11014 return 0;
11015}
11016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011017if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011018
11019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011021
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011022 was_it_defined=yes
11023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11027$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011028
Matthias Kloseb9621712010-04-24 17:59:49 +000011029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11030$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011031if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011033else
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011035/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011036#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011037int
11038main ()
11039{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011040struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 ;
11042 return 0;
11043}
11044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011045if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011046 ac_cv_struct_addrinfo=yes
11047else
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11051fi
11052
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11054$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011055if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011056
Matthias Kloseb9621712010-04-24 17:59:49 +000011057$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011058
11059fi
11060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11062$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011063if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011065else
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011067/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011068
11069# include <sys/types.h>
11070# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011071int
11072main ()
11073{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011074struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 ;
11076 return 0;
11077}
11078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011079if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011080 ac_cv_struct_sockaddr_storage=yes
11081else
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11085fi
11086
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11088$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011089if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011090
Matthias Kloseb9621712010-04-24 17:59:49 +000011091$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011092
11093fi
11094
Guido van Rossum627b2d71993-12-24 10:39:16 +000011095# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11098$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011099if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +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öwis11437992002-04-12 09:54:03 +000011104$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011105int
11106main ()
11107{
11108static int test_array [1 - 2 * !(((char) -1) < 0)];
11109test_array [0] = 0
11110
11111 ;
11112 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011113}
Martin v. Löwis11437992002-04-12 09:54:03 +000011114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011115if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011116 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011117else
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11123$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011124if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011126
11127fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011128
Matthias Kloseb9621712010-04-24 17:59:49 +000011129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11130$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011131if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011133else
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011135/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011136
Martin v. Löwis11437992002-04-12 09:54:03 +000011137int
11138main ()
11139{
11140/* FIXME: Include the comments suggested by Paul. */
11141#ifndef __cplusplus
11142 /* Ultrix mips cc rejects this. */
11143 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011144 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011145 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146 char const *const *pcpcc;
11147 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 /* NEC SVR4.0.2 mips cc rejects this. */
11149 struct point {int x, y;};
11150 static struct point const zero = {0,0};
11151 /* AIX XL C 1.02.0.0 rejects this.
11152 It does not let you subtract one const X* pointer from another in
11153 an arm of an if-expression whose if-part is not a constant
11154 expression */
11155 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158 ++pcpcc;
11159 ppc = (char**) pcpcc;
11160 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 { /* SCO 3.2v4 cc rejects this. */
11162 char *t;
11163 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011164
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 }
11168 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11169 int x[] = {25, 17};
11170 const int *foo = &x[0];
11171 ++foo;
11172 }
11173 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11174 typedef const int *iptr;
11175 iptr p = 0;
11176 ++p;
11177 }
11178 { /* AIX XL C 1.02.0.0 rejects this saying
11179 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11180 struct s { int j; const int *ap[3]; };
11181 struct s *b; b->j = 5;
11182 }
11183 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11184 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011187 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011188#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011189
Martin v. Löwis11437992002-04-12 09:54:03 +000011190 ;
11191 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011192}
Martin v. Löwis11437992002-04-12 09:54:03 +000011193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011195 ac_cv_c_const=yes
11196else
Matthias Kloseb9621712010-04-24 17:59:49 +000011197 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11202$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011203if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206
11207fi
11208
Michael W. Hudson54241132001-12-07 15:38:26 +000011209
Guido van Rossumda88dad1995-01-26 00:46:29 +000011210works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11212$as_echo_n "checking for working volatile... " >&6; }
11213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011214/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011215
Martin v. Löwis11437992002-04-12 09:54:03 +000011216int
11217main ()
11218{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011219volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011220 ;
11221 return 0;
11222}
11223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011224if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011225 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011226else
Skip Montanaro6dead952003-09-25 14:50:04 +000011227
Matthias Kloseb9621712010-04-24 17:59:49 +000011228$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011229
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011230
Guido van Rossum627b2d71993-12-24 10:39:16 +000011231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11234$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011235
Guido van Rossumda88dad1995-01-26 00:46:29 +000011236works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11238$as_echo_n "checking for working signed char... " >&6; }
11239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011241
Martin v. Löwis11437992002-04-12 09:54:03 +000011242int
11243main ()
11244{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011245signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 ;
11247 return 0;
11248}
11249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011250if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011251 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011252else
Skip Montanaro6dead952003-09-25 14:50:04 +000011253
Matthias Kloseb9621712010-04-24 17:59:49 +000011254$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011255
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011256
Guido van Rossum7f43da71994-08-01 12:15:30 +000011257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11260$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011261
Guido van Rossumda88dad1995-01-26 00:46:29 +000011262have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11264$as_echo_n "checking for prototypes... " >&6; }
11265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011266/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011267int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011268int
11269main ()
11270{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011271return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011272 ;
11273 return 0;
11274}
11275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011279
Matthias Kloseb159a552010-04-25 21:00:44 +000011280 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11284$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011285
Guido van Rossumda88dad1995-01-26 00:46:29 +000011286works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11288$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011290/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011291
11292#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011293int foo(int x, ...) {
11294 va_list va;
11295 va_start(va, x);
11296 va_arg(va, int);
11297 va_arg(va, char *);
11298 va_arg(va, double);
11299 return 0;
11300}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011301
Martin v. Löwis11437992002-04-12 09:54:03 +000011302int
11303main ()
11304{
Guido van Rossum90eea071996-08-30 20:58:57 +000011305return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 ;
11307 return 0;
11308}
11309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011311
11312
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011314
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011315 works=yes
11316
Guido van Rossum627b2d71993-12-24 10:39:16 +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: $works" >&5
11320$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321
Martin v. Löwisd6320502004-08-12 13:45:08 +000011322# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11324$as_echo_n "checking for socketpair... " >&6; }
11325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011326/* end confdefs.h. */
11327
11328#include <sys/types.h>
11329#include <sys/socket.h>
11330
11331int
11332main ()
11333{
11334void *x=socketpair
11335 ;
11336 return 0;
11337}
11338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011342
Matthias Kloseb159a552010-04-25 21:00:44 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011344$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011345else
Matthias Kloseb9621712010-04-24 17:59:49 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011348
11349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011351
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011352# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11354$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011356/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011357#include <sys/types.h>
11358#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011362struct sockaddr x;
11363x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 ;
11365 return 0;
11366}
11367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011368if ac_fn_c_try_compile "$LINENO"; then :
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11370$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011371
Matthias Kloseb9621712010-04-24 17:59:49 +000011372$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011373
11374else
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011377
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011380
Guido van Rossumda88dad1995-01-26 00:46:29 +000011381va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11383$as_echo_n "checking whether va_list is an array... " >&6; }
11384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011385/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386
11387#ifdef HAVE_STDARG_PROTOTYPES
11388#include <stdarg.h>
11389#else
11390#include <varargs.h>
11391#endif
11392
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011396va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401if ac_fn_c_try_compile "$LINENO"; then :
11402
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011403else
Skip Montanaro6dead952003-09-25 14:50:04 +000011404
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Matthias Kloseb9621712010-04-24 17:59:49 +000011406$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
Guido van Rossumda88dad1995-01-26 00:46:29 +000011408 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011409
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11413$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011414
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011415# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
11417
Matthias Kloseb9621712010-04-24 17:59:49 +000011418ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011419if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11424$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011425 OLD_CFLAGS=$CFLAGS
11426 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011428/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011429
11430# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011431
Martin v. Löwis11437992002-04-12 09:54:03 +000011432int
11433main ()
11434{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011435
11436 char *name;
11437 struct hostent *he, *res;
11438 char buffer[2048];
11439 int buflen = 2048;
11440 int h_errnop;
11441
11442 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011443
11444 ;
11445 return 0;
11446}
11447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011449
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011451
Martin v. Löwis11437992002-04-12 09:54:03 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011454
Matthias Kloseb9621712010-04-24 17:59:49 +000011455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11456$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011457
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011458else
Skip Montanaro6dead952003-09-25 14:50:04 +000011459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461$as_echo "no" >&6; }
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11463$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011465/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011466
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011467# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011468
Martin v. Löwis11437992002-04-12 09:54:03 +000011469int
11470main ()
11471{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011472
11473 char *name;
11474 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011475 char buffer[2048];
11476 int buflen = 2048;
11477 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011478
Matthias Kloseb159a552010-04-25 21:00:44 +000011479 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011480
11481 ;
11482 return 0;
11483}
11484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011486
Matthias Kloseb9621712010-04-24 17:59:49 +000011487 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011488
Martin v. Löwis11437992002-04-12 09:54:03 +000011489
Matthias Kloseb159a552010-04-25 21:00:44 +000011490$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011491
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11493$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011494
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011495else
Skip Montanaro6dead952003-09-25 14:50:04 +000011496
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11498$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11500$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11502/* end confdefs.h. */
11503
11504# include <netdb.h>
11505
11506int
11507main ()
11508{
11509
11510 char *name;
11511 struct hostent *he;
11512 struct hostent_data data;
11513
11514 (void) gethostbyname_r(name, he, &data);
11515
11516 ;
11517 return 0;
11518}
11519_ACEOF
11520if ac_fn_c_try_compile "$LINENO"; then :
11521
11522 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11523
11524
11525$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11526
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11528$as_echo "yes" >&6; }
11529
11530else
11531
11532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11533$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011537
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011540
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011543 CFLAGS=$OLD_CFLAGS
11544
11545else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 for ac_func in gethostbyname
11548do :
11549 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011550if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011552#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011553_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011555fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011556done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011557
Michael W. Hudson54241132001-12-07 15:38:26 +000011558
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011559fi
11560
Michael W. Hudson54241132001-12-07 15:38:26 +000011561
11562
11563
11564
11565
11566
Guido van Rossum627b2d71993-12-24 10:39:16 +000011567# checks for system services
11568# (none yet)
11569
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011570# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011571ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011572if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011573
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011574else
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11576$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011577if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011578 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011579else
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011581LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585/* Override any GCC internal prototype to avoid an error.
11586 Use char because int might match the return type of a GCC
11587 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011588#ifdef __cplusplus
11589extern "C"
11590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011591char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011592int
11593main ()
11594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 ;
11597 return 0;
11598}
11599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011600if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011601 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011602else
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011605rm -f core conftest.err conftest.$ac_objext \
11606 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011607LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11610$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011611if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011612 cat >>confdefs.h <<_ACEOF
11613#define HAVE_LIBIEEE 1
11614_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011615
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011616 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011617
Guido van Rossum627b2d71993-12-24 10:39:16 +000011618fi
11619
Michael W. Hudson54241132001-12-07 15:38:26 +000011620
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011621fi
11622
Michael W. Hudson54241132001-12-07 15:38:26 +000011623
Guido van Rossum7f253911997-05-09 02:42:48 +000011624# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11626$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011629if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011631if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011632then
11633
Matthias Kloseb9621712010-04-24 17:59:49 +000011634$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11637$as_echo "yes" >&6; }
11638else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011640fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011641else
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11643$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011644fi
11645
Guido van Rossum7f253911997-05-09 02:42:48 +000011646
Guido van Rossum7f43da71994-08-01 12:15:30 +000011647# check for --with-libm=...
11648
Guido van Rossum563e7081996-09-10 18:20:48 +000011649case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011650Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011651*) LIBM=-lm
11652esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11654$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011657if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011658 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011659if test "$withval" = no
11660then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11662$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011663elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011664then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11666$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011667else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011668fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011669else
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11671$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011672fi
11673
Guido van Rossum7f43da71994-08-01 12:15:30 +000011674
11675# check for --with-libc=...
11676
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11678$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011681if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011682 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011683if test "$withval" = no
11684then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11686$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011687elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011688then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11690$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011691else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011692fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011693else
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11695$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696fi
11697
Guido van Rossum7f43da71994-08-01 12:15:30 +000011698
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699# **************************************************
11700# * Check for various properties of floating point *
11701# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011702
Matthias Kloseb9621712010-04-24 17:59:49 +000011703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11704$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011705if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707else
11708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710 ac_cv_little_endian_double=no
11711else
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713/* end confdefs.h. */
11714
11715#include <string.h>
11716int main() {
11717 double x = 9006104071832581.0;
11718 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11719 return 0;
11720 else
11721 return 1;
11722}
11723
11724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011725if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011726 ac_cv_little_endian_double=yes
11727else
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011732fi
11733
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734fi
11735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11737$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011738if test "$ac_cv_little_endian_double" = yes
11739then
11740
Matthias Kloseb9621712010-04-24 17:59:49 +000011741$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742
11743fi
11744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11746$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011747if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011749else
11750
Matthias Kloseb9621712010-04-24 17:59:49 +000011751if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011752 ac_cv_big_endian_double=no
11753else
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011755/* end confdefs.h. */
11756
11757#include <string.h>
11758int main() {
11759 double x = 9006104071832581.0;
11760 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11761 return 0;
11762 else
11763 return 1;
11764}
11765
11766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011767if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011768 ac_cv_big_endian_double=yes
11769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011774fi
11775
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011776fi
11777
Matthias Kloseb9621712010-04-24 17:59:49 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11779$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780if test "$ac_cv_big_endian_double" = yes
11781then
11782
Matthias Kloseb9621712010-04-24 17:59:49 +000011783$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011784
11785fi
11786
11787# Some ARM platforms use a mixed-endian representation for doubles.
11788# While Python doesn't currently have full support for these platforms
11789# (see e.g., issue 1762561), we can at least make sure that float <-> string
11790# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11792$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011793if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011795else
11796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011798 ac_cv_mixed_endian_double=no
11799else
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011801/* end confdefs.h. */
11802
11803#include <string.h>
11804int main() {
11805 double x = 9006104071832581.0;
11806 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11807 return 0;
11808 else
11809 return 1;
11810}
11811
11812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011813if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011814 ac_cv_mixed_endian_double=yes
11815else
Matthias Kloseb9621712010-04-24 17:59:49 +000011816 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011820fi
11821
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011822fi
11823
Matthias Kloseb9621712010-04-24 17:59:49 +000011824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11825$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011826if test "$ac_cv_mixed_endian_double" = yes
11827then
11828
Matthias Kloseb9621712010-04-24 17:59:49 +000011829$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830
11831fi
11832
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011833# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011834# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011835# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011836# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011837# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011838# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011839
11840# This inline assembler syntax may also work for suncc and icc,
11841# so we try it on all platforms.
11842
Matthias Kloseb9621712010-04-24 17:59:49 +000011843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11844$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846/* end confdefs.h. */
11847
11848int
11849main ()
11850{
11851
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011852 unsigned short cw;
11853 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11854 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011855
11856 ;
11857 return 0;
11858}
11859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011860if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011861 have_gcc_asm_for_x87=yes
11862else
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011864fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11867$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011868if test "$have_gcc_asm_for_x87" = yes
11869then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011870
Matthias Kloseb9621712010-04-24 17:59:49 +000011871$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011872
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011873fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011874
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011875# Detect whether system arithmetic is subject to x87-style double
11876# rounding issues. The result of this test has little meaning on non
11877# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11878# mode is round-to-nearest and double rounding issues are present, and
11879# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11881$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011882# $BASECFLAGS may affect the result
11883ac_save_cc="$CC"
11884CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011885if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011886 ac_cv_x87_double_rounding=no
11887else
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011889/* end confdefs.h. */
11890
11891#include <stdlib.h>
11892#include <math.h>
11893int main() {
11894 volatile double x, y, z;
11895 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11896 x = 0.99999999999999989; /* 1-2**-53 */
11897 y = 1./x;
11898 if (y != 1.)
11899 exit(0);
11900 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11901 x = 1e16;
11902 y = 2.99999;
11903 z = x + y;
11904 if (z != 1e16+4.)
11905 exit(0);
11906 /* both tests show evidence of double rounding */
11907 exit(1);
11908}
11909
11910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011911if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011912 ac_cv_x87_double_rounding=no
11913else
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11917 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011918fi
11919
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011920CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11922$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011923if test "$ac_cv_x87_double_rounding" = yes
11924then
11925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011927
11928fi
11929
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011930# ************************************
11931# * Check for mathematical functions *
11932# ************************************
11933
11934LIBS_SAVE=$LIBS
11935LIBS="$LIBS $LIBM"
11936
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011937for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11938do :
11939 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11940ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011941if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011942 cat >>confdefs.h <<_ACEOF
11943#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11944_ACEOF
11945
11946fi
11947done
11948
11949for ac_func in hypot lgamma log1p round tgamma
11950do :
11951 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11952ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011953if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011954 cat >>confdefs.h <<_ACEOF
11955#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11956_ACEOF
11957
11958fi
11959done
11960
11961ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11962"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011963if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011964 ac_have_decl=1
11965else
11966 ac_have_decl=0
11967fi
11968
11969cat >>confdefs.h <<_ACEOF
11970#define HAVE_DECL_ISINF $ac_have_decl
11971_ACEOF
11972ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11973"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011974if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011975 ac_have_decl=1
11976else
11977 ac_have_decl=0
11978fi
11979
11980cat >>confdefs.h <<_ACEOF
11981#define HAVE_DECL_ISNAN $ac_have_decl
11982_ACEOF
11983ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11984"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020011985if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011986 ac_have_decl=1
11987else
11988 ac_have_decl=0
11989fi
11990
11991cat >>confdefs.h <<_ACEOF
11992#define HAVE_DECL_ISFINITE $ac_have_decl
11993_ACEOF
11994
11995
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011996# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11997# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11999$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012000if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012002else
12003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012005 ac_cv_tanh_preserves_zero_sign=no
12006else
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012008/* end confdefs.h. */
12009
12010#include <math.h>
12011#include <stdlib.h>
12012int main() {
12013 /* return 0 if either negative zeros don't exist
12014 on this platform or if negative zeros exist
12015 and tanh(-0.) == -0. */
12016 if (atan2(0., -1.) == atan2(-0., -1.) ||
12017 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12018 else exit(1);
12019}
12020
12021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012022if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012023 ac_cv_tanh_preserves_zero_sign=yes
12024else
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12028 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012029fi
12030
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012031fi
12032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12034$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012035if test "$ac_cv_tanh_preserves_zero_sign" = yes
12036then
12037
Matthias Kloseb9621712010-04-24 17:59:49 +000012038$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012039
12040fi
12041
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012042if test "$ac_cv_func_log1p" = yes
12043then
12044 # On some versions of AIX, log1p(-0.) returns 0. instead of
12045 # -0. See issue #9920.
12046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12047$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012048 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012049 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012050else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012051
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012052 if test "$cross_compiling" = yes; then :
12053 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012054else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12056/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012057
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012058 #include <math.h>
12059 #include <stdlib.h>
12060 int main() {
12061 /* Fail if the signs of log1p(-0.) and -0. can be
12062 distinguished. */
12063 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12064 return 0;
12065 else
12066 return 1;
12067 }
12068
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012069_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012070if ac_fn_c_try_run "$LINENO"; then :
12071 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012072else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012073 ac_cv_log1p_drops_zero_sign=yes
12074fi
12075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12076 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012077fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012078
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012079fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012080
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12082$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12083fi
12084if test "$ac_cv_log1p_drops_zero_sign" = yes
12085then
12086
12087$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12088
12089fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012090
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012091LIBS=$LIBS_SAVE
12092
Mark Dickinsona614f042009-11-28 12:48:43 +000012093# For multiprocessing module, check that sem_open
12094# actually works. For FreeBSD versions <= 7.2,
12095# the kernel module that provides POSIX semaphores
12096# isn't loaded by default, so an attempt to call
12097# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12099$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012100if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012102else
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012104 ac_cv_posix_semaphores_enabled=yes
12105else
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012107/* end confdefs.h. */
12108
12109#include <unistd.h>
12110#include <fcntl.h>
12111#include <stdio.h>
12112#include <semaphore.h>
12113#include <sys/stat.h>
12114
12115int main(void) {
12116 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12117 if (a == SEM_FAILED) {
12118 perror("sem_open");
12119 return 1;
12120 }
12121 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012122 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012123 return 0;
12124}
12125
12126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012127if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012128 ac_cv_posix_semaphores_enabled=yes
12129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12133 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012134fi
12135
12136
Mark Dickinsona614f042009-11-28 12:48:43 +000012137fi
12138
Matthias Kloseb9621712010-04-24 17:59:49 +000012139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12140$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012141if test $ac_cv_posix_semaphores_enabled = no
12142then
12143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012145
12146fi
12147
Mark Dickinson10683072009-04-18 21:18:19 +000012148# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12150$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012151if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012155 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012156else
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012158/* end confdefs.h. */
12159
12160#include <unistd.h>
12161#include <fcntl.h>
12162#include <stdio.h>
12163#include <semaphore.h>
12164#include <sys/stat.h>
12165
12166int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012167 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012168 int count;
12169 int res;
12170 if(a==SEM_FAILED){
12171 perror("sem_open");
12172 return 1;
12173
12174 }
12175 res = sem_getvalue(a, &count);
12176 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012177 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012178 return res==-1 ? 1 : 0;
12179}
12180
Mark Dickinson10683072009-04-18 21:18:19 +000012181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012182if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012183 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012189fi
12190
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012192fi
12193
Matthias Kloseb9621712010-04-24 17:59:49 +000012194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12195$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012196if test $ac_cv_broken_sem_getvalue = yes
12197then
12198
Matthias Kloseb9621712010-04-24 17:59:49 +000012199$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012200
12201fi
12202
Mark Dickinsonbd792642009-03-18 20:06:12 +000012203# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12205$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012206# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012207if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012208 enableval=$enable_big_digits; case $enable_big_digits in
12209yes)
12210 enable_big_digits=30 ;;
12211no)
12212 enable_big_digits=15 ;;
1221315|30)
12214 ;;
12215*)
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012216 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 +000012217esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12219$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012220
12221cat >>confdefs.h <<_ACEOF
12222#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12223_ACEOF
12224
12225
12226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12228$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012229fi
12230
12231
Guido van Rossumef2255b2000-03-10 22:30:29 +000012232# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012233ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012234if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
12236
Matthias Kloseb9621712010-04-24 17:59:49 +000012237$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012238
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012239 wchar_h="yes"
12240
Guido van Rossumef2255b2000-03-10 22:30:29 +000012241else
Martin v. Löwis11437992002-04-12 09:54:03 +000012242 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012243
12244fi
12245
Michael W. Hudson54241132001-12-07 15:38:26 +000012246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012248# determine wchar_t size
12249if test "$wchar_h" = yes
12250then
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12254# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12256$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012257if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012259else
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12261"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012262
Martin v. Löwis11437992002-04-12 09:54:03 +000012263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 if test "$ac_cv_type_wchar_t" = yes; then
12265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012267as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012268See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269 else
12270 ac_cv_sizeof_wchar_t=0
12271 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273
Martin v. Löwis11437992002-04-12 09:54:03 +000012274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12276$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012277
12278
12279
Martin v. Löwis11437992002-04-12 09:54:03 +000012280cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012281#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012282_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012283
Michael W. Hudson54241132001-12-07 15:38:26 +000012284
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012285fi
12286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12288$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012289have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012291/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012292
12293#include <tcl.h>
12294#if TCL_UTF_MAX != 6
12295# error "NOT UCS4_TCL"
12296#endif
12297int
12298main ()
12299{
12300
12301 ;
12302 return 0;
12303}
12304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012306
12307
Matthias Kloseb9621712010-04-24 17:59:49 +000012308$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012309
12310 have_ucs4_tcl=yes
12311
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12315$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012316
Skip Montanaro6dead952003-09-25 14:50:04 +000012317# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012318if test "$wchar_h" = yes
12319then
12320 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12322$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012323 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012325else
12326
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012328 ac_cv_wchar_t_signed=yes
12329else
Matthias Kloseb9621712010-04-24 17:59:49 +000012330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012331/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012332
12333 #include <wchar.h>
12334 int main()
12335 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012336 /* Success: exit code 0 */
12337 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012338 }
12339
12340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012342 ac_cv_wchar_t_signed=yes
12343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12347 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012348fi
12349
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012350fi
12351
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12353$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012354fi
12355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12357$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012358
12359# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012360if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012361 withval=$with_wide_unicode;
12362if test "$withval" != no
12363then unicode_size="4"
12364else unicode_size="2"
12365fi
12366
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012367else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012368
Georg Brandl52d168a2008-01-07 18:10:24 +000012369case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012370 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012371 *) unicode_size="2" ;;
12372esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012373
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012374fi
12375
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012376
12377
Georg Brandl52d168a2008-01-07 18:10:24 +000012378case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012379 4)
12380 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12381
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012382 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012383 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012385 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012386esac
12387
Michael W. Hudson54241132001-12-07 15:38:26 +000012388
Martin v. Löwis11437992002-04-12 09:54:03 +000012389
Georg Brandl52d168a2008-01-07 18:10:24 +000012390# wchar_t is only usable if it maps to an unsigned type
12391if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012392 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012393then
12394 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012395
Matthias Kloseb9621712010-04-24 17:59:49 +000012396$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012397
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012399
Georg Brandl52d168a2008-01-07 18:10:24 +000012400elif test "$ac_cv_sizeof_short" = "$unicode_size"
12401then
12402 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012404
Georg Brandl52d168a2008-01-07 18:10:24 +000012405elif test "$ac_cv_sizeof_long" = "$unicode_size"
12406then
12407 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012409
Georg Brandl52d168a2008-01-07 18:10:24 +000012410else
12411 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12414$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012415
12416# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12418$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012419if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012421else
Matthias Kloseb9621712010-04-24 17:59:49 +000012422 ac_cv_c_bigendian=unknown
12423 # See if we're dealing with a universal compiler.
12424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12425/* end confdefs.h. */
12426#ifndef __APPLE_CC__
12427 not a universal capable compiler
12428 #endif
12429 typedef int dummy;
12430
Skip Montanaro6dead952003-09-25 14:50:04 +000012431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if ac_fn_c_try_compile "$LINENO"; then :
12433
12434 # Check for potential -arch flags. It is not universal unless
12435 # there are at least two -arch flags with different values.
12436 ac_arch=
12437 ac_prev=
12438 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12439 if test -n "$ac_prev"; then
12440 case $ac_word in
12441 i?86 | x86_64 | ppc | ppc64)
12442 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12443 ac_arch=$ac_word
12444 else
12445 ac_cv_c_bigendian=universal
12446 break
12447 fi
12448 ;;
12449 esac
12450 ac_prev=
12451 elif test "x$ac_word" = "x-arch"; then
12452 ac_prev=arch
12453 fi
12454 done
12455fi
12456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12457 if test $ac_cv_c_bigendian = unknown; then
12458 # See if sys/param.h defines the BYTE_ORDER macro.
12459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012460/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012461#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012463
Martin v. Löwis11437992002-04-12 09:54:03 +000012464int
12465main ()
12466{
Matthias Kloseb9621712010-04-24 17:59:49 +000012467#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12468 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12469 && LITTLE_ENDIAN)
12470 bogus endian macros
12471 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
12473 ;
12474 return 0;
12475}
12476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012477if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012478 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012480/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012481#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012483
Martin v. Löwis11437992002-04-12 09:54:03 +000012484int
12485main ()
12486{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012487#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 not big endian
12489 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012490
12491 ;
12492 return 0;
12493}
12494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012495if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012496 ac_cv_c_bigendian=yes
12497else
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012501fi
12502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12503 fi
12504 if test $ac_cv_c_bigendian = unknown; then
12505 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012507/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012508#include <limits.h>
12509
Martin v. Löwis11437992002-04-12 09:54:03 +000012510int
12511main ()
12512{
Matthias Kloseb9621712010-04-24 17:59:49 +000012513#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12514 bogus endian macros
12515 #endif
12516
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ;
12518 return 0;
12519}
12520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012521if ac_fn_c_try_compile "$LINENO"; then :
12522 # It does; now see whether it defined to _BIG_ENDIAN or not.
12523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12524/* end confdefs.h. */
12525#include <limits.h>
12526
12527int
12528main ()
12529{
12530#ifndef _BIG_ENDIAN
12531 not big endian
12532 #endif
12533
12534 ;
12535 return 0;
12536}
12537_ACEOF
12538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12544fi
12545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12546 fi
12547 if test $ac_cv_c_bigendian = unknown; then
12548 # Compile a test program.
12549 if test "$cross_compiling" = yes; then :
12550 # Try to guess by grepping values from an object file.
12551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12552/* end confdefs.h. */
12553short int ascii_mm[] =
12554 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12555 short int ascii_ii[] =
12556 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12557 int use_ascii (int i) {
12558 return ascii_mm[i] + ascii_ii[i];
12559 }
12560 short int ebcdic_ii[] =
12561 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12562 short int ebcdic_mm[] =
12563 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12564 int use_ebcdic (int i) {
12565 return ebcdic_mm[i] + ebcdic_ii[i];
12566 }
12567 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569int
12570main ()
12571{
12572return use_ascii (foo) == use_ebcdic (foo);
12573 ;
12574 return 0;
12575}
12576_ACEOF
12577if ac_fn_c_try_compile "$LINENO"; then :
12578 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12579 ac_cv_c_bigendian=yes
12580 fi
12581 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12582 if test "$ac_cv_c_bigendian" = unknown; then
12583 ac_cv_c_bigendian=no
12584 else
12585 # finding both strings is unlikely to happen, but who knows?
12586 ac_cv_c_bigendian=unknown
12587 fi
12588 fi
12589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012591else
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012593/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012595int
12596main ()
12597{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 /* Are we little or big endian? From Harbison&Steele. */
12600 union
12601 {
12602 long int l;
12603 char c[sizeof (long int)];
12604 } u;
12605 u.l = 1;
12606 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012607
12608 ;
12609 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012610}
Martin v. Löwis11437992002-04-12 09:54:03 +000012611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012612if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012613 ac_cv_c_bigendian=no
12614else
Matthias Kloseb9621712010-04-24 17:59:49 +000012615 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12618 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12624$as_echo "$ac_cv_c_bigendian" >&6; }
12625 case $ac_cv_c_bigendian in #(
12626 yes)
12627 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12628;; #(
12629 no)
12630 ;; #(
12631 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 ;; #(
12636 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012637 as_fn_error $? "unknown endianness
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012638 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012640
Michael W. Hudson54241132001-12-07 15:38:26 +000012641
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012642# ABI version string for Python extension modules. This appears between the
12643# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12644# from the following attributes which affect the ABI of this Python build (in
12645# this order):
12646#
12647# * The Python implementation (always 'cpython-' for us)
12648# * The major and minor version numbers
12649# * --with-pydebug (adds a 'd')
12650# * --with-pymalloc (adds a 'm')
12651# * --with-wide-unicode (adds a 'u')
12652#
12653# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012654# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12655# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012656
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12658$as_echo_n "checking ABIFLAGS... " >&6; }
12659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12660$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12662$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012663SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12665$as_echo "$SOABI" >&6; }
12666
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12668$as_echo_n "checking LDVERSION... " >&6; }
12669LDVERSION='$(VERSION)$(ABIFLAGS)'
12670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12671$as_echo "$LDVERSION" >&6; }
12672
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012673# SO is the extension of shared libraries `(including the dot!)
12674# -- usually .so, .sl on HP-UX, .dll on Cygwin
12675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12676$as_echo_n "checking SO... " >&6; }
12677if test -z "$SO"
12678then
12679 case $ac_sys_system in
12680 hp*|HP*)
12681 case `uname -m` in
12682 ia64) SO=.so;;
12683 *) SO=.sl;;
12684 esac
12685 ;;
12686 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012687 Linux*|GNU*)
12688 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012689 *) SO=.so;;
12690 esac
12691else
12692 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012693 echo
12694 echo '====================================================================='
12695 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012696 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012697 echo '+ Do you really mean to change the extension for shared libraries? +'
12698 echo '+ Continuing in 10 seconds to let you to ponder. +'
12699 echo '+ +'
12700 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012701 sleep 10
12702fi
12703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12704$as_echo "$SO" >&6; }
12705
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012706# Check whether right shifting a negative integer extends the sign bit
12707# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12709$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012710if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012712else
Martin v. Löwis11437992002-04-12 09:54:03 +000012713
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012715 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012719
12720int main()
12721{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012722 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012723}
12724
Martin v. Löwis11437992002-04-12 09:54:03 +000012725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012727 ac_cv_rshift_extends_sign=yes
12728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012733fi
12734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735fi
12736
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12738$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012739if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012740then
Martin v. Löwis11437992002-04-12 09:54:03 +000012741
Matthias Kloseb9621712010-04-24 17:59:49 +000012742$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012743
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012744fi
12745
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012746# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12748$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012749if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012751else
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
Matthias Kloseb9621712010-04-24 17:59:49 +000012753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012754/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012755#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012756int
12757main ()
12758{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012759
12760 FILE *f = fopen("/dev/null", "r");
12761 flockfile(f);
12762 getc_unlocked(f);
12763 funlockfile(f);
12764
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 ;
12766 return 0;
12767}
12768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012769if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012770 ac_cv_have_getc_unlocked=yes
12771else
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 ac_cv_have_getc_unlocked=no
12773fi
12774rm -f core conftest.err conftest.$ac_objext \
12775 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12779$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012780if test "$ac_cv_have_getc_unlocked" = yes
12781then
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012784
12785fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012786
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012787# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012788# save the value of LIBS so we don't actually link Python with readline
12789LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012790
Gregory P. Smith18820942008-09-07 06:24:49 +000012791# On some systems we need to link readline to a termcap compatible
12792# library. NOTE: Keep the precedence of listed libraries synchronised
12793# with setup.py.
12794py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12796$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012797for py_libtermcap in "" ncursesw ncurses curses termcap; do
12798 if test -z "$py_libtermcap"; then
12799 READLINE_LIBS="-lreadline"
12800 else
12801 READLINE_LIBS="-lreadline -l$py_libtermcap"
12802 fi
12803 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012805/* end confdefs.h. */
12806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012807/* Override any GCC internal prototype to avoid an error.
12808 Use char because int might match the return type of a GCC
12809 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012810#ifdef __cplusplus
12811extern "C"
12812#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012813char readline ();
12814int
12815main ()
12816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012818 ;
12819 return 0;
12820}
12821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012822if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012823 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012825rm -f core conftest.err conftest.$ac_objext \
12826 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012827 if test $py_cv_lib_readline = yes; then
12828 break
12829 fi
12830done
12831# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12832#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012833if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12835$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012836else
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12838$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012839
Matthias Kloseb9621712010-04-24 17:59:49 +000012840$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012841
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012842fi
12843
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012844# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12846$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012847if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012849else
12850 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012851LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012853/* end confdefs.h. */
12854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855/* Override any GCC internal prototype to avoid an error.
12856 Use char because int might match the return type of a GCC
12857 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012858#ifdef __cplusplus
12859extern "C"
12860#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012861char rl_callback_handler_install ();
12862int
12863main ()
12864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012866 ;
12867 return 0;
12868}
12869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012870if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012871 ac_cv_lib_readline_rl_callback_handler_install=yes
12872else
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012875rm -f core conftest.err conftest.$ac_objext \
12876 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012877LIBS=$ac_check_lib_save_LIBS
12878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12880$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012881if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012884
12885fi
12886
12887
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012888# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012890/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012891#include <readline/readline.h>
12892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012893if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012894 have_readline=yes
12895else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012896 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012897
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012898fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012899rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012900if test $have_readline = yes
12901then
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012903/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012904#include <readline/readline.h>
12905
12906_ACEOF
12907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012909
Matthias Kloseb9621712010-04-24 17:59:49 +000012910$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012911
12912fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012913rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012916/* end confdefs.h. */
12917#include <readline/readline.h>
12918
12919_ACEOF
12920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012924
12925fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012926rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012927
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012928fi
12929
Martin v. Löwis0daad592001-09-30 21:09:59 +000012930# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12932$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012933if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012935else
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012937LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941/* Override any GCC internal prototype to avoid an error.
12942 Use char because int might match the return type of a GCC
12943 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012944#ifdef __cplusplus
12945extern "C"
12946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012947char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012948int
12949main ()
12950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012951return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 ;
12953 return 0;
12954}
12955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012956if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012958else
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012961rm -f core conftest.err conftest.$ac_objext \
12962 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012963LIBS=$ac_check_lib_save_LIBS
12964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12966$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012967if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012970
Martin v. Löwis0daad592001-09-30 21:09:59 +000012971fi
12972
Michael W. Hudson54241132001-12-07 15:38:26 +000012973
Thomas Wouters89d996e2007-09-08 17:39:28 +000012974# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12976$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020012977if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012979else
12980 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012981LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012983/* end confdefs.h. */
12984
12985/* Override any GCC internal prototype to avoid an error.
12986 Use char because int might match the return type of a GCC
12987 builtin and then its argument prototype would still apply. */
12988#ifdef __cplusplus
12989extern "C"
12990#endif
12991char rl_completion_display_matches_hook ();
12992int
12993main ()
12994{
12995return rl_completion_display_matches_hook ();
12996 ;
12997 return 0;
12998}
12999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013000if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013001 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13002else
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013005rm -f core conftest.err conftest.$ac_objext \
13006 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013007LIBS=$ac_check_lib_save_LIBS
13008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13010$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013011if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013014
13015fi
13016
13017
Martin v. Löwis0daad592001-09-30 21:09:59 +000013018# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13020$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013021if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013023else
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013025LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013029/* Override any GCC internal prototype to avoid an error.
13030 Use char because int might match the return type of a GCC
13031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013032#ifdef __cplusplus
13033extern "C"
13034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013035char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013036int
13037main ()
13038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013039return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 ;
13041 return 0;
13042}
13043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013044if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013046else
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013049rm -f core conftest.err conftest.$ac_objext \
13050 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013051LIBS=$ac_check_lib_save_LIBS
13052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13054$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013055if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013058
Guido van Rossum353ae582001-07-10 16:45:32 +000013059fi
13060
Jack Jansendd19cf82001-12-06 22:36:17 +000013061
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013062# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013064/* end confdefs.h. */
13065#include <readline/readline.h>
13066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013067if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013068 have_readline=yes
13069else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013070 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013071
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013072fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013073rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013074if test $have_readline = yes
13075then
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013077/* end confdefs.h. */
13078#include <readline/readline.h>
13079
13080_ACEOF
13081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013085
13086fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013087rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013088
13089fi
13090
Martin v. Löwis82bca632006-02-10 20:49:30 +000013091# End of readline checks: restore LIBS
13092LIBS=$LIBS_no_readline
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13095$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013096if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013098else
Martin v. Löwis11437992002-04-12 09:54:03 +000013099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013101 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013102else
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013104/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013105
13106int main()
13107{
13108 int val1 = nice(1);
13109 if (val1 != -1 && val1 == nice(2))
13110 exit(0);
13111 exit(1);
13112}
13113
Martin v. Löwis11437992002-04-12 09:54:03 +000013114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013115if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013116 ac_cv_broken_nice=yes
13117else
Matthias Kloseb9621712010-04-24 17:59:49 +000013118 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13121 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013122fi
13123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013124fi
13125
Matthias Kloseb9621712010-04-24 17:59:49 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13127$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013128if test "$ac_cv_broken_nice" = yes
13129then
Martin v. Löwis11437992002-04-12 09:54:03 +000013130
Matthias Kloseb9621712010-04-24 17:59:49 +000013131$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013132
13133fi
13134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13136$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013137if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139else
Matthias Kloseb9621712010-04-24 17:59:49 +000013140 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013141 ac_cv_broken_poll=no
13142else
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013144/* end confdefs.h. */
13145
13146#include <poll.h>
13147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013148int main()
13149{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013150 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013151 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013152
13153 close (42);
13154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013155 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013156 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013157 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013158 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013159 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013160 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013161 return 1;
13162}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013163
13164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013166 ac_cv_broken_poll=yes
13167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13171 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013174fi
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13177$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013178if test "$ac_cv_broken_poll" = yes
13179then
13180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013182
13183fi
13184
Brett Cannon43802422005-02-10 20:48:03 +000013185# 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 +000013186# (which is not required by ISO C or UNIX spec) and/or if we support
13187# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013188ac_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 +000013189#include <$ac_cv_struct_tm>
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013192if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013193
13194cat >>confdefs.h <<_ACEOF
13195#define HAVE_STRUCT_TM_TM_ZONE 1
13196_ACEOF
13197
13198
13199fi
13200
13201if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013204
13205else
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13207"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013208if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013210else
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013212fi
13213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013215#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013216_ACEOF
13217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13219$as_echo_n "checking for tzname... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013220if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222else
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013224/* end confdefs.h. */
13225#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013226#if !HAVE_DECL_TZNAME
13227extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013228#endif
13229
13230int
13231main ()
13232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013234 ;
13235 return 0;
13236}
13237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013238if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013239 ac_cv_var_tzname=yes
13240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013243rm -f core conftest.err conftest.$ac_objext \
13244 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13247$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013248 if test $ac_cv_var_tzname = yes; then
13249
Matthias Kloseb9621712010-04-24 17:59:49 +000013250$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013251
13252 fi
13253fi
13254
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013255
Martin v. Löwis1d459062005-03-14 21:23:33 +000013256# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13258$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013259if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013261else
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013264 ac_cv_working_tzset=no
13265else
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013267/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013268
13269#include <stdlib.h>
13270#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013271#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013272
13273#if HAVE_TZNAME
13274extern char *tzname[];
13275#endif
13276
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013277int main()
13278{
Brett Cannon18367812003-09-19 00:59:16 +000013279 /* Note that we need to ensure that not only does tzset(3)
13280 do 'something' with localtime, but it works as documented
13281 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013282 This includes making sure that tzname is set properly if
13283 tm->tm_zone does not exist since it is the alternative way
13284 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013285
13286 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013287 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013288 */
13289
Martin v. Löwis1d459062005-03-14 21:23:33 +000013290 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013291 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13292
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013293 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013294 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013295 if (localtime(&groundhogday)->tm_hour != 0)
13296 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013297#if HAVE_TZNAME
13298 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13299 if (strcmp(tzname[0], "UTC") ||
13300 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13301 exit(1);
13302#endif
Brett Cannon18367812003-09-19 00:59:16 +000013303
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013304 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013305 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013306 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013307 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013308#if HAVE_TZNAME
13309 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13310 exit(1);
13311#endif
Brett Cannon18367812003-09-19 00:59:16 +000013312
13313 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13314 tzset();
13315 if (localtime(&groundhogday)->tm_hour != 11)
13316 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013317#if HAVE_TZNAME
13318 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13319 exit(1);
13320#endif
13321
13322#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013323 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13324 exit(1);
13325 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13326 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013327#endif
Brett Cannon18367812003-09-19 00:59:16 +000013328
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013329 exit(0);
13330}
13331
13332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013333if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013334 ac_cv_working_tzset=yes
13335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013340fi
13341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342fi
13343
Matthias Kloseb9621712010-04-24 17:59:49 +000013344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13345$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013346if test "$ac_cv_working_tzset" = yes
13347then
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013350
13351fi
13352
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013353# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13355$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013356if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013358else
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013360/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013361#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013362int
13363main ()
13364{
13365
13366struct stat st;
13367st.st_mtim.tv_nsec = 1;
13368
13369 ;
13370 return 0;
13371}
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013374 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13379fi
13380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13382$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013383if test "$ac_cv_stat_tv_nsec" = yes
13384then
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013387
13388fi
13389
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013390# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13392$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013393if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013397/* end confdefs.h. */
13398#include <sys/stat.h>
13399int
13400main ()
13401{
13402
13403struct stat st;
13404st.st_mtimespec.tv_nsec = 1;
13405
13406 ;
13407 return 0;
13408}
13409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013411 ac_cv_stat_tv_nsec2=yes
13412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13416fi
13417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13419$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013420if test "$ac_cv_stat_tv_nsec2" = yes
13421then
13422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013424
13425fi
13426
Jack Jansen666b1e72001-10-31 12:11:48 +000013427# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13429$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013430if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013431 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013432else
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013434/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013435#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013436int
13437main ()
13438{
Jack Jansen666b1e72001-10-31 12:11:48 +000013439
13440 int rtn;
13441 rtn = mvwdelch(0,0,0);
13442
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 ;
13444 return 0;
13445}
13446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013447if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013448 ac_cv_mvwdelch_is_expression=yes
13449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13453fi
13454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13456$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013457
13458if test "$ac_cv_mvwdelch_is_expression" = yes
13459then
Martin v. Löwis11437992002-04-12 09:54:03 +000013460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013462
13463fi
13464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13466$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013467if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013469else
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013471/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013472#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013473int
13474main ()
13475{
Jack Jansen666b1e72001-10-31 12:11:48 +000013476
13477 WINDOW *w;
13478 w->_flags = 0;
13479
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 ;
13481 return 0;
13482}
13483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013484if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013485 ac_cv_window_has_flags=yes
13486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13490fi
13491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13493$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013494
Jack Jansen666b1e72001-10-31 12:11:48 +000013495
13496if test "$ac_cv_window_has_flags" = yes
13497then
Martin v. Löwis11437992002-04-12 09:54:03 +000013498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013500
13501fi
13502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13504$as_echo_n "checking for is_term_resized... " >&6; }
13505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013506/* end confdefs.h. */
13507#include <curses.h>
13508int
13509main ()
13510{
13511void *x=is_term_resized
13512 ;
13513 return 0;
13514}
13515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013519
Matthias Kloseb159a552010-04-25 21:00:44 +000013520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013521$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13524$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013525
13526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13530$as_echo_n "checking for resize_term... " >&6; }
13531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013532/* end confdefs.h. */
13533#include <curses.h>
13534int
13535main ()
13536{
13537void *x=resize_term
13538 ;
13539 return 0;
13540}
13541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013542if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013545
Matthias Kloseb159a552010-04-25 21:00:44 +000013546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013547$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013548else
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13550$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013551
13552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13556$as_echo_n "checking for resizeterm... " >&6; }
13557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013558/* end confdefs.h. */
13559#include <curses.h>
13560int
13561main ()
13562{
13563void *x=resizeterm
13564 ;
13565 return 0;
13566}
13567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013568if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013571
Matthias Kloseb159a552010-04-25 21:00:44 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013573$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013574else
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13576$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013577
13578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13582$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013583
13584if test -r /dev/ptmx
13585then
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13587$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013590
Thomas Wouters89f507f2006-12-13 04:49:30 +000013591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13593$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013594fi
13595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13597$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013598
13599if test -r /dev/ptc
13600then
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13602$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013605
Thomas Wouters89f507f2006-12-13 04:49:30 +000013606else
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13608$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013609fi
13610
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013611if test "$have_long_long" = yes
13612then
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13614$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013615 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013617else
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013619 ac_cv_have_long_long_format=no
13620else
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013622/* end confdefs.h. */
13623
13624 #include <stdio.h>
13625 #include <stddef.h>
13626 #include <string.h>
13627
13628 #ifdef HAVE_SYS_TYPES_H
13629 #include <sys/types.h>
13630 #endif
13631
13632 int main()
13633 {
13634 char buffer[256];
13635
13636 if (sprintf(buffer, "%lld", (long long)123) < 0)
13637 return 1;
13638 if (strcmp(buffer, "123"))
13639 return 1;
13640
13641 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13642 return 1;
13643 if (strcmp(buffer, "-123"))
13644 return 1;
13645
13646 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13647 return 1;
13648 if (strcmp(buffer, "123"))
13649 return 1;
13650
13651 return 0;
13652 }
13653
13654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013655if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013656 ac_cv_have_long_long_format=yes
13657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013662fi
13663
13664
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013665fi
13666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13668$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013669fi
13670
Mark Dickinson89d7d412009-12-31 20:50:59 +000013671if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013672then
13673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013675
13676fi
13677
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013678if test $ac_sys_system = Darwin
13679then
13680 LIBS="$LIBS -framework CoreFoundation"
13681fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13684$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013685if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013689 ac_cv_have_size_t_format="cross -- assuming yes"
13690
Thomas Wouters477c8d52006-05-27 19:21:47 +000013691else
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013693/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013694
Thomas Wouters477c8d52006-05-27 19:21:47 +000013695#include <stdio.h>
13696#include <stddef.h>
13697#include <string.h>
13698
Christian Heimes2c181612007-12-17 20:04:13 +000013699#ifdef HAVE_SYS_TYPES_H
13700#include <sys/types.h>
13701#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013702
13703#ifdef HAVE_SSIZE_T
13704typedef ssize_t Py_ssize_t;
13705#elif SIZEOF_VOID_P == SIZEOF_LONG
13706typedef long Py_ssize_t;
13707#else
13708typedef int Py_ssize_t;
13709#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013710
Christian Heimes2c181612007-12-17 20:04:13 +000013711int main()
13712{
13713 char buffer[256];
13714
Thomas Wouters477c8d52006-05-27 19:21:47 +000013715 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13716 return 1;
13717
Thomas Wouters89f507f2006-12-13 04:49:30 +000013718 if (strcmp(buffer, "123"))
13719 return 1;
13720
13721 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13722 return 1;
13723
13724 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013725 return 1;
13726
13727 return 0;
13728}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013729
Thomas Wouters477c8d52006-05-27 19:21:47 +000013730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013731if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013732 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013733else
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013738fi
13739
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13742$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013743if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013746
13747fi
13748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013750#ifdef HAVE_SYS_TYPES_H
13751#include <sys/types.h>
13752#endif
13753#ifdef HAVE_SYS_SOCKET_H
13754#include <sys/socket.h>
13755#endif
13756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013758if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013759
Martin v. Löwis11437992002-04-12 09:54:03 +000013760else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013761
Matthias Kloseb9621712010-04-24 17:59:49 +000013762$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013763
13764fi
13765
Michael W. Hudson54241132001-12-07 15:38:26 +000013766
Matthias Kloseb9621712010-04-24 17:59:49 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13768$as_echo_n "checking for broken mbstowcs... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013769if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013771else
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013773 ac_cv_broken_mbstowcs=no
13774else
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013776/* end confdefs.h. */
13777
13778#include<stdlib.h>
13779int main() {
13780 size_t len = -1;
13781 const char *str = "text";
13782 len = mbstowcs(NULL, str, 0);
13783 return (len != 4);
13784}
13785
13786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013788 ac_cv_broken_mbstowcs=no
13789else
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013794fi
13795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013796fi
13797
Matthias Kloseb9621712010-04-24 17:59:49 +000013798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13799$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013800if test "$ac_cv_broken_mbstowcs" = yes
13801then
13802
Matthias Kloseb9621712010-04-24 17:59:49 +000013803$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013804
13805fi
13806
Antoine Pitrou042b1282010-08-13 21:15:58 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13808$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013809if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013810 $as_echo_n "(cached) " >&6
13811else
13812 if test "$cross_compiling" = yes; then :
13813 ac_cv_computed_gotos=no
13814else
13815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13816/* end confdefs.h. */
13817
13818int main(int argc, char **argv)
13819{
13820 static void *targets[1] = { &&LABEL1 };
13821 goto LABEL2;
13822LABEL1:
13823 return 0;
13824LABEL2:
13825 goto *targets[0];
13826 return 1;
13827}
13828
13829_ACEOF
13830if ac_fn_c_try_run "$LINENO"; then :
13831 ac_cv_computed_gotos=yes
13832else
13833 ac_cv_computed_gotos=no
13834fi
13835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13836 conftest.$ac_objext conftest.beam conftest.$ac_ext
13837fi
13838
13839fi
13840
13841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13842$as_echo "$ac_cv_computed_gotos" >&6; }
13843if test "$ac_cv_computed_gotos" = yes
13844then
13845
13846$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13847
13848fi
13849
Antoine Pitroub52ec782009-01-25 16:34:23 +000013850# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13852$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013853
13854# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013855if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013856 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013857if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013858then
13859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13863$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013864fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013865if test "$withval" = no
13866then
13867
13868$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13869
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13871$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013872fi
13873
Antoine Pitrou042b1282010-08-13 21:15:58 +000013874else
13875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13876$as_echo "no value specified" >&6; }
13877fi
13878
Antoine Pitroub52ec782009-01-25 16:34:23 +000013879
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013880case $ac_sys_system in
13881AIX*)
13882
13883$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13884 ;;
13885esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013886
Michael W. Hudson54241132001-12-07 15:38:26 +000013887
Jesus Cea6a792292010-05-03 21:18:48 +000013888case $ac_sys_system in
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013889 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 +000013890esac
13891
Gregory P. Smith138fa432010-12-13 08:00:52 +000013892ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013893if test "x$ac_cv_func_pipe2" = x""yes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013894
13895$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13896
13897fi
Jesus Cea6a792292010-05-03 21:18:48 +000013898
13899
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013900
13901
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013902for h in `(cd $srcdir;echo Python/thread_*.h)`
13903do
13904 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13905done
13906
Michael W. Hudson54241132001-12-07 15:38:26 +000013907
Neal Norwitzd24499d2005-12-18 21:36:39 +000013908SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13910$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013911for dir in $SRCDIRS; do
13912 if test ! -d $dir; then
13913 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013914 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013915done
Matthias Kloseb9621712010-04-24 17:59:49 +000013916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13917$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013918
Guido van Rossum627b2d71993-12-24 10:39:16 +000013919# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013920ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013921
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013922ac_config_files="$ac_config_files Modules/ld_so_aix"
13923
Martin v. Löwis11437992002-04-12 09:54:03 +000013924cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013925# This file is a shell script that caches the results of configure
13926# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013927# scripts and configure runs, see configure's option --config-cache.
13928# It is not useful on other systems. If it contains results you don't
13929# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013930#
Martin v. Löwis11437992002-04-12 09:54:03 +000013931# config.status only pays attention to the cache file if you give it
13932# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013933#
Skip Montanaro6dead952003-09-25 14:50:04 +000013934# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013935# loading this file, other *unset* `ac_cv_foo' will be assigned the
13936# following values.
13937
13938_ACEOF
13939
Guido van Rossumf78abae1997-01-21 22:02:36 +000013940# The following way of writing the cache mishandles newlines in values,
13941# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013943# Ultrix sh set writes to stderr and can't be redirected directly,
13944# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013945(
13946 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13947 eval ac_val=\$$ac_var
13948 case $ac_val in #(
13949 *${as_nl}*)
13950 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13952$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953 esac
13954 case $ac_var in #(
13955 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13957 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958 esac ;;
13959 esac
13960 done
13961
Martin v. Löwis11437992002-04-12 09:54:03 +000013962 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013963 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13964 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 # `set' does not quote correctly, so add quotes: double-quote
13966 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013967 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013968 "s/'/'\\\\''/g;
13969 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 *)
13972 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013973 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975 esac |
13976 sort
13977) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13983 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13985 :end' >>confcache
13986if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13987 if test -w "$cache_file"; then
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013988 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13990$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natalibeed47e2011-07-22 23:48:44 +020013991 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013992 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13994$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013995 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013996fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013997rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013998
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013999test "x$prefix" = xNONE && prefix=$ac_default_prefix
14000# Let make expand exec_prefix.
14001test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014002
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014003DEFS=-DHAVE_CONFIG_H
14004
Skip Montanaro6dead952003-09-25 14:50:04 +000014005ac_libobjs=
14006ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014007U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014008for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14009 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014011 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14013 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014014 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14015 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014016done
14017LIBOBJS=$ac_libobjs
14018
14019LTLIBOBJS=$ac_ltlibobjs
14020
14021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014024: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000014025ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014026ac_clean_files_save=$ac_clean_files
14027ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014028{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14029$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14030as_write_fail=0
14031cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014032#! $SHELL
14033# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014034# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014035# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014036# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014037
Martin v. Löwis11437992002-04-12 09:54:03 +000014038debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014039ac_cs_recheck=false
14040ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042SHELL=\${CONFIG_SHELL-$SHELL}
14043export SHELL
14044_ASEOF
14045cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14046## -------------------- ##
14047## M4sh Initialization. ##
14048## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014050# Be more Bourne compatible
14051DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014052if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 emulate sh
14054 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014056 # is contrary to our usage. Disable this feature.
14057 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014058 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014059else
Matthias Kloseb9621712010-04-24 17:59:49 +000014060 case `(set -o) 2>/dev/null` in #(
14061 *posix*) :
14062 set -o posix ;; #(
14063 *) :
14064 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014065esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014066fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014067
14068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069as_nl='
14070'
14071export as_nl
14072# Printing a long string crashes Solaris 7 /usr/bin/printf.
14073as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14074as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14075as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14076# Prefer a ksh shell builtin over an external printf program on Solaris,
14077# but without wasting forks for bash or zsh.
14078if test -z "$BASH_VERSION$ZSH_VERSION" \
14079 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14080 as_echo='print -r --'
14081 as_echo_n='print -rn --'
14082elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14083 as_echo='printf %s\n'
14084 as_echo_n='printf %s'
14085else
14086 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14087 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14088 as_echo_n='/usr/ucb/echo -n'
14089 else
14090 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14091 as_echo_n_body='eval
14092 arg=$1;
14093 case $arg in #(
14094 *"$as_nl"*)
14095 expr "X$arg" : "X\\(.*\\)$as_nl";
14096 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14097 esac;
14098 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14099 '
14100 export as_echo_n_body
14101 as_echo_n='sh -c $as_echo_n_body as_echo'
14102 fi
14103 export as_echo_body
14104 as_echo='sh -c $as_echo_body as_echo'
14105fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
14107# The user is always right.
14108if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 PATH_SEPARATOR=:
14110 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14111 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14112 PATH_SEPARATOR=';'
14113 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116
14117# IFS
14118# We need space, tab and new line, in precisely that order. Quoting is
14119# there to prevent editors from complaining about space-tab.
14120# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14121# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122IFS=" "" $as_nl"
14123
14124# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014125case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014126 *[\\/]* ) as_myself=$0 ;;
14127 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014128for as_dir in $PATH
14129do
14130 IFS=$as_save_IFS
14131 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14133 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136 ;;
14137esac
14138# We did not find ourselves, most probably we were run as `sh COMMAND'
14139# in which case we are not to be found in the path.
14140if test "x$as_myself" = x; then
14141 as_myself=$0
14142fi
14143if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14145 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146fi
14147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148# Unset variables that we do not need and which cause bugs (e.g. in
14149# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14150# suppresses any "Segmentation fault" message there. '((' could
14151# trigger a bug in pdksh 5.2.14.
14152for as_var in BASH_ENV ENV MAIL MAILPATH
14153do eval test x\${$as_var+set} = xset \
14154 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155done
14156PS1='$ '
14157PS2='> '
14158PS4='+ '
14159
14160# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014161LC_ALL=C
14162export LC_ALL
14163LANGUAGE=C
14164export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165
Matthias Kloseb9621712010-04-24 17:59:49 +000014166# CDPATH.
14167(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14168
14169
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014170# as_fn_error STATUS ERROR [LINENO LOG_FD]
14171# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014172# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14173# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014174# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014175as_fn_error ()
14176{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014177 as_status=$1; test $as_status -eq 0 && as_status=1
14178 if test "$4"; then
14179 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14180 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014182 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 as_fn_exit $as_status
14184} # as_fn_error
14185
14186
14187# as_fn_set_status STATUS
14188# -----------------------
14189# Set $? to STATUS, without forking.
14190as_fn_set_status ()
14191{
14192 return $1
14193} # as_fn_set_status
14194
14195# as_fn_exit STATUS
14196# -----------------
14197# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14198as_fn_exit ()
14199{
14200 set +e
14201 as_fn_set_status $1
14202 exit $1
14203} # as_fn_exit
14204
14205# as_fn_unset VAR
14206# ---------------
14207# Portably unset VAR.
14208as_fn_unset ()
14209{
14210 { eval $1=; unset $1;}
14211}
14212as_unset=as_fn_unset
14213# as_fn_append VAR VALUE
14214# ----------------------
14215# Append the text in VALUE to the end of the definition contained in VAR. Take
14216# advantage of any shell optimizations that allow amortized linear growth over
14217# repeated appends, instead of the typical quadratic growth present in naive
14218# implementations.
14219if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14220 eval 'as_fn_append ()
14221 {
14222 eval $1+=\$2
14223 }'
14224else
14225 as_fn_append ()
14226 {
14227 eval $1=\$$1\$2
14228 }
14229fi # as_fn_append
14230
14231# as_fn_arith ARG...
14232# ------------------
14233# Perform arithmetic evaluation on the ARGs, and store the result in the
14234# global $as_val. Take advantage of shells that can avoid forks. The arguments
14235# must be portable across $(()) and expr.
14236if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14237 eval 'as_fn_arith ()
14238 {
14239 as_val=$(( $* ))
14240 }'
14241else
14242 as_fn_arith ()
14243 {
14244 as_val=`expr "$@" || test $? -eq 1`
14245 }
14246fi # as_fn_arith
14247
14248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249if expr a : '\(a\)' >/dev/null 2>&1 &&
14250 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14251 as_expr=expr
14252else
14253 as_expr=false
14254fi
14255
14256if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14257 as_basename=basename
14258else
14259 as_basename=false
14260fi
14261
Matthias Kloseb9621712010-04-24 17:59:49 +000014262if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14263 as_dirname=dirname
14264else
14265 as_dirname=false
14266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268as_me=`$as_basename -- "$0" ||
14269$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14270 X"$0" : 'X\(//\)$' \| \
14271 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014272$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273 sed '/^.*\/\([^/][^/]*\)\/*$/{
14274 s//\1/
14275 q
14276 }
14277 /^X\/\(\/\/\)$/{
14278 s//\1/
14279 q
14280 }
14281 /^X\/\(\/\).*/{
14282 s//\1/
14283 q
14284 }
14285 s/.*/./; q'`
14286
Matthias Kloseb9621712010-04-24 17:59:49 +000014287# Avoid depending upon Character Ranges.
14288as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14289as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14290as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14291as_cr_digits='0123456789'
14292as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293
14294ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014295case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014298 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 xy) ECHO_C='\c';;
14300 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14301 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302 esac;;
14303*)
14304 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014306
Martin v. Löwis11437992002-04-12 09:54:03 +000014307rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308if test -d conf$$.dir; then
14309 rm -f conf$$.dir/conf$$.file
14310else
14311 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014314if (echo >conf$$.file) 2>/dev/null; then
14315 if ln -s conf$$.file conf$$ 2>/dev/null; then
14316 as_ln_s='ln -s'
14317 # ... but there are two gotchas:
14318 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14319 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14320 # In both cases, we have to default to `cp -p'.
14321 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14322 as_ln_s='cp -p'
14323 elif ln conf$$.file conf$$ 2>/dev/null; then
14324 as_ln_s=ln
14325 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014326 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014328else
14329 as_ln_s='cp -p'
14330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014331rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14332rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014333
Matthias Kloseb9621712010-04-24 17:59:49 +000014334
14335# as_fn_mkdir_p
14336# -------------
14337# Create "$as_dir" as a directory, including parents if necessary.
14338as_fn_mkdir_p ()
14339{
14340
14341 case $as_dir in #(
14342 -*) as_dir=./$as_dir;;
14343 esac
14344 test -d "$as_dir" || eval $as_mkdir_p || {
14345 as_dirs=
14346 while :; do
14347 case $as_dir in #(
14348 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14349 *) as_qdir=$as_dir;;
14350 esac
14351 as_dirs="'$as_qdir' $as_dirs"
14352 as_dir=`$as_dirname -- "$as_dir" ||
14353$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14354 X"$as_dir" : 'X\(//\)[^/]' \| \
14355 X"$as_dir" : 'X\(//\)$' \| \
14356 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14357$as_echo X"$as_dir" |
14358 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14359 s//\1/
14360 q
14361 }
14362 /^X\(\/\/\)[^/].*/{
14363 s//\1/
14364 q
14365 }
14366 /^X\(\/\/\)$/{
14367 s//\1/
14368 q
14369 }
14370 /^X\(\/\).*/{
14371 s//\1/
14372 q
14373 }
14374 s/.*/./; q'`
14375 test -d "$as_dir" && break
14376 done
14377 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014378 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014379
14380
14381} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014382if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014384else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014385 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014386 as_mkdir_p=false
14387fi
14388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014389if test -x / >/dev/null 2>&1; then
14390 as_test_x='test -x'
14391else
14392 if ls -dL / >/dev/null 2>&1; then
14393 as_ls_L_option=L
14394 else
14395 as_ls_L_option=
14396 fi
14397 as_test_x='
14398 eval sh -c '\''
14399 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014401 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 case $1 in #(
14403 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014405 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406 ???[sx]*):;;*)false;;esac;fi
14407 '\'' sh
14408 '
14409fi
14410as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
14412# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014413as_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 +000014414
14415# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014416as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
14418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014420## ----------------------------------- ##
14421## Main body of $CONFIG_STATUS script. ##
14422## ----------------------------------- ##
14423_ASEOF
14424test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14427# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014428# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014429# values after options handling.
14430ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014431This file was extended by python $as_me 3.2, which was
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014432generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
14434 CONFIG_FILES = $CONFIG_FILES
14435 CONFIG_HEADERS = $CONFIG_HEADERS
14436 CONFIG_LINKS = $CONFIG_LINKS
14437 CONFIG_COMMANDS = $CONFIG_COMMANDS
14438 $ $0 $@
14439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440on `(hostname || uname -n) 2>/dev/null | sed 1q`
14441"
14442
Martin v. Löwis11437992002-04-12 09:54:03 +000014443_ACEOF
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445case $ac_config_files in *"
14446"*) set x $ac_config_files; shift; ac_config_files=$*;;
14447esac
14448
14449case $ac_config_headers in *"
14450"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14451esac
14452
14453
14454cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014456config_files="$ac_config_files"
14457config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014462ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014463\`$as_me' instantiates files and other configuration actions
14464from templates according to the current configuration. Unless the files
14465and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Matthias Kloseb9621712010-04-24 17:59:49 +000014467Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014468
14469 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 --config print configuration, then exit
14472 -q, --quiet, --silent
14473 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014474 -d, --debug don't remove temporary files
14475 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 --file=FILE[:TEMPLATE]
14477 instantiate the configuration file FILE
14478 --header=FILE[:TEMPLATE]
14479 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
14481Configuration files:
14482$config_files
14483
14484Configuration headers:
14485$config_headers
14486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14491ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014492ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014493python config.status 3.2
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014494configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014497Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014498This config.status script is free software; the Free Software Foundation
14499gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500
14501ac_pwd='$ac_pwd'
14502srcdir='$srcdir'
14503INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014504test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014505_ACEOF
14506
Matthias Kloseb9621712010-04-24 17:59:49 +000014507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14508# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014509ac_need_defaults=:
14510while test $# != 0
14511do
14512 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014513 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14515 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014516 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014518 --*=)
14519 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14520 ac_optarg=
14521 ac_shift=:
14522 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014524 ac_option=$1
14525 ac_optarg=$2
14526 ac_shift=shift
14527 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 esac
14529
Skip Montanaro6dead952003-09-25 14:50:04 +000014530 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014532 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14533 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 $as_echo "$ac_cs_version"; exit ;;
14536 --config | --confi | --conf | --con | --co | --c )
14537 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 debug=: ;;
14540 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014541 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014542 case $ac_optarg in
14543 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014544 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 esac
14546 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014547 ac_need_defaults=false;;
14548 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014549 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 case $ac_optarg in
14551 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14552 esac
14553 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555 --he | --h)
14556 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014557 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014558Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014561 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14562 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14563 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014564
14565 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014566 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014567Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014568
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014571
14572 esac
14573 shift
14574done
14575
Skip Montanaro6dead952003-09-25 14:50:04 +000014576ac_configure_extra_args=
14577
14578if $ac_cs_silent; then
14579 exec 6>/dev/null
14580 ac_configure_extra_args="$ac_configure_extra_args --silent"
14581fi
14582
14583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014584cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014585if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14587 shift
14588 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14589 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014592fi
14593
Martin v. Löwis11437992002-04-12 09:54:03 +000014594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596exec 5>>config.log
14597{
14598 echo
14599 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14600## Running $as_me. ##
14601_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
Matthias Kloseb9621712010-04-24 17:59:49 +000014609cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610
14611# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014612for ac_config_target in $ac_config_targets
14613do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614 case $ac_config_target in
14615 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14616 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14617 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014618 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14619 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14621 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014622 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014623 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014624
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014625 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 esac
14627done
14628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630# If the user did not use the arguments to specify the items to instantiate,
14631# then the envvar interface is used. Set only those that are not.
14632# We use the long form for the default assignment because of an extremely
14633# bizarre bug on SunOS 4.1.3.
14634if $ac_need_defaults; then
14635 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14636 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14637fi
14638
Skip Montanaro6dead952003-09-25 14:50:04 +000014639# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014641# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642# Hook for its removal unless debugging.
14643# Note that there is a small window in which the directory will not be cleaned:
14644# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014645$debug ||
14646{
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014647 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648 trap 'exit_status=$?
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014649 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014651 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014652}
Martin v. Löwis11437992002-04-12 09:54:03 +000014653# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014654
Martin v. Löwis11437992002-04-12 09:54:03 +000014655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014657 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014658} ||
14659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660 tmp=./conf$$-$RANDOM
14661 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014662} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014663
Matthias Kloseb9621712010-04-24 17:59:49 +000014664# Set up the scripts for CONFIG_FILES section.
14665# No need to generate them if there are no CONFIG_FILES.
14666# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669
14670ac_cr=`echo X | tr X '\015'`
14671# On cygwin, bash can eat \r inside `` if the user requested igncr.
14672# But we know of no other shell where ac_cr would be empty at this
14673# point, so we can use a bashism as a fallback.
14674if test "x$ac_cr" = x; then
14675 eval ac_cr=\$\'\\r\'
14676fi
14677ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14678if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014679 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014680else
14681 ac_cs_awk_cr=$ac_cr
14682fi
14683
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014684echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014685_ACEOF
14686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014687
Matthias Kloseb9621712010-04-24 17:59:49 +000014688{
14689 echo "cat >conf$$subs.awk <<_ACEOF" &&
14690 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14691 echo "_ACEOF"
14692} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014693 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14694ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695ac_delim='%!_!# '
14696for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014698 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14701 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014702 break
14703 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014704 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705 else
14706 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708done
Matthias Kloseb9621712010-04-24 17:59:49 +000014709rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014712cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014714sed -n '
14715h
14716s/^/S["/; s/!.*/"]=/
14717p
14718g
14719s/^[^!]*!//
14720:repl
14721t repl
14722s/'"$ac_delim"'$//
14723t delim
14724:nl
14725h
14726s/\(.\{148\}\)..*/\1/
14727t more1
14728s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14729p
14730n
14731b repl
14732:more1
14733s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14734p
14735g
14736s/.\{148\}//
14737t nl
14738:delim
14739h
14740s/\(.\{148\}\)..*/\1/
14741t more2
14742s/["\\]/\\&/g; s/^/"/; s/$/"/
14743p
14744b
14745:more2
14746s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14747p
14748g
14749s/.\{148\}//
14750t delim
14751' <conf$$subs.awk | sed '
14752/^[^""]/{
14753 N
14754 s/\n//
14755}
14756' >>$CONFIG_STATUS || ac_write_fail=1
14757rm -f conf$$subs.awk
14758cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14759_ACAWK
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014760cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014761 for (key in S) S_is_set[key] = 1
14762 FS = ""
14763
14764}
14765{
14766 line = $ 0
14767 nfields = split(line, field, "@")
14768 substed = 0
14769 len = length(field[1])
14770 for (i = 2; i < nfields; i++) {
14771 key = field[i]
14772 keylen = length(key)
14773 if (S_is_set[key]) {
14774 value = S[key]
14775 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14776 len += length(value) + length(field[++i])
14777 substed = 1
14778 } else
14779 len += 1 + keylen
14780 }
14781
14782 print line
14783}
14784
14785_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014787cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14788if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14789 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14790else
14791 cat
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014792fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014793 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014794_ACEOF
14795
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014796# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14797# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798# trailing colons and then remove the whole line if VPATH becomes empty
14799# (actually we leave an empty line to preserve line numbers).
14800if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014801 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14802h
14803s///
14804s/^/:/
14805s/[ ]*$/:/
14806s/:\$(srcdir):/:/g
14807s/:\${srcdir}:/:/g
14808s/:@srcdir@:/:/g
14809s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014811x
14812s/\(=[ ]*\).*/\1/
14813G
14814s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815s/^[^=]*=[ ]*$//
14816}'
14817fi
14818
Matthias Kloseb9621712010-04-24 17:59:49 +000014819cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014820fi # test -n "$CONFIG_FILES"
14821
Matthias Kloseb9621712010-04-24 17:59:49 +000014822# Set up the scripts for CONFIG_HEADERS section.
14823# No need to generate them if there are no CONFIG_HEADERS.
14824# This happens for instance with `./config.status Makefile'.
14825if test -n "$CONFIG_HEADERS"; then
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014826cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014827BEGIN {
14828_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829
Matthias Kloseb9621712010-04-24 17:59:49 +000014830# Transform confdefs.h into an awk script `defines.awk', embedded as
14831# here-document in config.status, that substitutes the proper values into
14832# config.h.in to produce config.h.
14833
14834# Create a delimiter string that does not exist in confdefs.h, to ease
14835# handling of long lines.
14836ac_delim='%!_!# '
14837for ac_last_try in false false :; do
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014838 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14839 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 break
14841 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014842 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 else
14844 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14845 fi
14846done
14847
14848# For the awk script, D is an array of macro values keyed by name,
14849# likewise P contains macro parameters if any. Preserve backslash
14850# newline sequences.
14851
14852ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14853sed -n '
14854s/.\{148\}/&'"$ac_delim"'/g
14855t rset
14856:rset
14857s/^[ ]*#[ ]*define[ ][ ]*/ /
14858t def
14859d
14860:def
14861s/\\$//
14862t bsnl
14863s/["\\]/\\&/g
14864s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14865D["\1"]=" \3"/p
14866s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14867d
14868:bsnl
14869s/["\\]/\\&/g
14870s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14871D["\1"]=" \3\\\\\\n"\\/p
14872t cont
14873s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14874t cont
14875d
14876:cont
14877n
14878s/.\{148\}/&'"$ac_delim"'/g
14879t clear
14880:clear
14881s/\\$//
14882t bsnlc
14883s/["\\]/\\&/g; s/^/"/; s/$/"/p
14884d
14885:bsnlc
14886s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14887b cont
14888' <confdefs.h | sed '
14889s/'"$ac_delim"'/"\\\
14890"/g' >>$CONFIG_STATUS || ac_write_fail=1
14891
14892cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14893 for (key in D) D_is_set[key] = 1
14894 FS = ""
14895}
14896/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14897 line = \$ 0
14898 split(line, arg, " ")
14899 if (arg[1] == "#") {
14900 defundef = arg[2]
14901 mac1 = arg[3]
14902 } else {
14903 defundef = substr(arg[1], 2)
14904 mac1 = arg[2]
14905 }
14906 split(mac1, mac2, "(") #)
14907 macro = mac2[1]
14908 prefix = substr(line, 1, index(line, defundef) - 1)
14909 if (D_is_set[macro]) {
14910 # Preserve the white space surrounding the "#".
14911 print prefix "define", macro P[macro] D[macro]
14912 next
14913 } else {
14914 # Replace #undef with comments. This is necessary, for example,
14915 # in the case of _POSIX_SOURCE, which is predefined and required
14916 # on some systems where configure will not decide to define it.
14917 if (defundef == "undef") {
14918 print "/*", prefix defundef, macro, "*/"
14919 next
14920 }
14921 }
14922}
14923{ print }
14924_ACAWK
14925_ACEOF
14926cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014927 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014928fi # test -n "$CONFIG_HEADERS"
14929
14930
14931eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14932shift
14933for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934do
14935 case $ac_tag in
14936 :[FHLC]) ac_mode=$ac_tag; continue;;
14937 esac
14938 case $ac_mode$ac_tag in
14939 :[FHL]*:*);;
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014940 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 :[FH]-) ac_tag=-:-;;
14942 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14943 esac
14944 ac_save_IFS=$IFS
14945 IFS=:
14946 set x $ac_tag
14947 IFS=$ac_save_IFS
14948 shift
14949 ac_file=$1
14950 shift
14951
14952 case $ac_mode in
14953 :L) ac_source=$1;;
14954 :[FH])
14955 ac_file_inputs=
14956 for ac_f
14957 do
14958 case $ac_f in
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014959 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960 *) # Look for the file first in the build tree, then in the source tree
14961 # (if the path is not absolute). The absolute path cannot be DOS-style,
14962 # because $ac_f cannot contain `:'.
14963 test -f "$ac_f" ||
14964 case $ac_f in
14965 [\\/$]*) false;;
14966 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14967 esac ||
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014968 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14971 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972 done
14973
14974 # Let's still pretend it is `configure' which instantiates (i.e., don't
14975 # use $as_me), people would be surprised to read:
14976 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 configure_input='Generated from '`
14978 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14979 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980 if test x"$ac_file" != x-; then
14981 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014982 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14983$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014985 # Neutralize special characters interpreted by sed in replacement strings.
14986 case $configure_input in #(
14987 *\&* | *\|* | *\\* )
14988 ac_sed_conf_input=`$as_echo "$configure_input" |
14989 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14990 *) ac_sed_conf_input=$configure_input;;
14991 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014992
14993 case $ac_tag in
Charles-François Natalibeed47e2011-07-22 23:48:44 +020014994 *:-:* | *:-) cat >"$tmp/stdin" \
14995 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996 esac
14997 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 esac
14999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015001$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015002 X"$ac_file" : 'X\(//\)[^/]' \| \
15003 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015005$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15007 s//\1/
15008 q
15009 }
15010 /^X\(\/\/\)[^/].*/{
15011 s//\1/
15012 q
15013 }
15014 /^X\(\/\/\)$/{
15015 s//\1/
15016 q
15017 }
15018 /^X\(\/\).*/{
15019 s//\1/
15020 q
15021 }
15022 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ac_builddir=.
15025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026case "$ac_dir" in
15027.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15028*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015029 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032 case $ac_top_builddir_sub in
15033 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15034 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15035 esac ;;
15036esac
15037ac_abs_top_builddir=$ac_pwd
15038ac_abs_builddir=$ac_pwd$ac_dir_suffix
15039# for backward compatibility:
15040ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015041
15042case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045 ac_top_srcdir=$ac_top_builddir_sub
15046 ac_abs_top_srcdir=$ac_pwd ;;
15047 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049 ac_top_srcdir=$srcdir
15050 ac_abs_top_srcdir=$srcdir ;;
15051 *) # Relative name.
15052 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15053 ac_top_srcdir=$ac_top_build_prefix$srcdir
15054 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015055esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015057
Martin v. Löwis11437992002-04-12 09:54:03 +000015058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059 case $ac_mode in
15060 :F)
15061 #
15062 # CONFIG_FILE
15063 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015064
15065 case $INSTALL in
15066 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015068 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015069_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015072# If the template does not know about datarootdir, expand it.
15073# FIXME: This hack should be removed a few years after 2.60.
15074ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015075ac_sed_dataroot='
15076/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077 p
15078 q
15079}
15080/@datadir@/p
15081/@docdir@/p
15082/@infodir@/p
15083/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015084/@mandir@/p'
15085case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086*datarootdir*) ac_datarootdir_seen=yes;;
15087*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15089$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015091cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 ac_datarootdir_hack='
15093 s&@datadir@&$datadir&g
15094 s&@docdir@&$docdir&g
15095 s&@infodir@&$infodir&g
15096 s&@localedir@&$localedir&g
15097 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099esac
15100_ACEOF
15101
15102# Neutralize VPATH when `$srcdir' = `.'.
15103# Shell code in configure.ac might set extrasub.
15104# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015105cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15106ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015107$extrasub
15108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015109cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015110:t
15111/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015112s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015114s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115s&@srcdir@&$ac_srcdir&;t t
15116s&@abs_srcdir@&$ac_abs_srcdir&;t t
15117s&@top_srcdir@&$ac_top_srcdir&;t t
15118s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15119s&@builddir@&$ac_builddir&;t t
15120s&@abs_builddir@&$ac_abs_builddir&;t t
15121s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15122s&@INSTALL@&$ac_INSTALL&;t t
15123$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015124"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020015125eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15126 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natalibeed47e2011-07-22 23:48:44 +020015129 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15130 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 { $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 +000015132which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015133$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015134which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015135
Charles-François Natalibeed47e2011-07-22 23:48:44 +020015136 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 case $ac_file in
Charles-François Natalibeed47e2011-07-22 23:48:44 +020015138 -) cat "$tmp/out" && rm -f "$tmp/out";;
15139 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015141 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142 ;;
15143 :H)
15144 #
15145 # CONFIG_HEADER
15146 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 {
15149 $as_echo "/* $configure_input */" \
Charles-François Natalibeed47e2011-07-22 23:48:44 +020015150 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15151 } >"$tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015152 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natalibeed47e2011-07-22 23:48:44 +020015153 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015154 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15155$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 rm -f "$ac_file"
Charles-François Natalibeed47e2011-07-22 23:48:44 +020015158 mv "$tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015159 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 fi
15161 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015162 $as_echo "/* $configure_input */" \
Charles-François Natalibeed47e2011-07-22 23:48:44 +020015163 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015164 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168
15169 esac
15170
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015171
15172 case $ac_file$ac_mode in
15173 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15174
15175 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176done # for ac_tag
15177
Guido van Rossum627b2d71993-12-24 10:39:16 +000015178
Matthias Kloseb9621712010-04-24 17:59:49 +000015179as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015180_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015181ac_clean_files=$ac_clean_files_save
15182
Matthias Kloseb9621712010-04-24 17:59:49 +000015183test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015184 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015185
Martin v. Löwis11437992002-04-12 09:54:03 +000015186
15187# configure is writing to config.log, and then calls config.status.
15188# config.status does its own redirection, appending to config.log.
15189# Unfortunately, on DOS this fails, as config.log is still kept open
15190# by configure, so config.status won't be able to write to it; its
15191# output is simply discarded. So we exec the FD to /dev/null,
15192# effectively closing config.log, so it can be properly (re)opened and
15193# appended to by config.status. When coming back to configure, we
15194# need to make the FD available again.
15195if test "$no_create" != yes; then
15196 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015197 ac_config_status_args=
15198 test "$silent" = yes &&
15199 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015201 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 exec 5>>config.log
15203 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15204 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015205 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015206fi
15207if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15209$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015210fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015211
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015212
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015213echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015214if test ! -f Modules/Setup
15215then
15216 cp $srcdir/Modules/Setup.dist Modules/Setup
15217fi
15218
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015219echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015220if test ! -f Modules/Setup.local
15221then
15222 echo "# Edit this file for local setup changes" >Modules/Setup.local
15223fi
15224
15225echo "creating Makefile"
15226$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15227 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015228 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015229mv config.c Modules