blob: ed13d88b4a182ed9623ddefae6d2b82dc1c57515 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020094as_myself=
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.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +0200220 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
Antoine Pitroud3b2aef2011-07-27 01:22:41 +0200225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $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 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491 as_ln_s='cp -p'
492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
498 as_ln_s='cp -p'
499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000523 case $1 in #(
524 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000525 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_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 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
643INSTALL_DATA
644INSTALL_SCRIPT
645INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500646HAS_PYTHON
647DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000648ARFLAGS
649AR
650RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000651USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652GNULD
653LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000654LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000655RUNSHARED
656INSTSONAME
657LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000658PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000659BLDLIBRARY
660DLLLIBRARY
661LDLIBRARY
662LIBRARY
663BUILDEXEEXT
664EGREP
665GREP
666CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200667NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000668MAINCC
669CXX
670OBJEXT
671EXEEXT
672ac_ct_CC
673CPPFLAGS
674LDFLAGS
675CFLAGS
676CC
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CONFIGURE_MACOSX_DEPLOYMENT_TARGET
679SGI_ABI
680MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000681FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000682FRAMEWORKUNIXTOOLSPREFIX
683FRAMEWORKALTINSTALLLAST
684FRAMEWORKALTINSTALLFIRST
685FRAMEWORKINSTALLLAST
686FRAMEWORKINSTALLFIRST
687PYTHONFRAMEWORKINSTALLDIR
688PYTHONFRAMEWORKPREFIX
689PYTHONFRAMEWORKDIR
690PYTHONFRAMEWORKIDENTIFIER
691PYTHONFRAMEWORK
692LIPO_32BIT_FLAGS
693ARCH_RUN_32BIT
694UNIVERSALSDK
695CONFIG_ARGS
696SOVERSION
697VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500698HAS_HG
699HGBRANCH
700HGTAG
701HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702target_alias
703host_alias
704build_alias
705LIBS
706ECHO_T
707ECHO_N
708ECHO_C
709DEFS
710mandir
711localedir
712libdir
713psdir
714pdfdir
715dvidir
716htmldir
717infodir
718docdir
719oldincludedir
720includedir
721localstatedir
722sharedstatedir
723sysconfdir
724datadir
725datarootdir
726libexecdir
727sbindir
728bindir
729program_transform_name
730prefix
731exec_prefix
732PACKAGE_URL
733PACKAGE_BUGREPORT
734PACKAGE_STRING
735PACKAGE_VERSION
736PACKAGE_TARNAME
737PACKAGE_NAME
738PATH_SEPARATOR
739SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000741ac_user_opts='
742enable_option_checking
743enable_universalsdk
744with_universal_archs
745with_framework_name
746enable_framework
747with_gcc
748with_cxx_main
749with_suffix
750enable_shared
751enable_profiling
752with_pydebug
753with_libs
754with_system_expat
755with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000756enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_dbmliborder
758with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000759with_threads
760with_thread
761enable_ipv6
762with_doc_strings
763with_tsc
764with_pymalloc
765with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000766with_fpectl
767with_libm
768with_libc
769enable_big_digits
770with_wide_unicode
771with_computed_gotos
772'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773 ac_precious_vars='build_alias
774host_alias
775target_alias
776CC
777CFLAGS
778LDFLAGS
779LIBS
780CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200781CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782
Guido van Rossum627b2d71993-12-24 10:39:16 +0000783
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785ac_init_help=
786ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_unrecognized_opts=
788ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789# The variables have the same names as the options, with
790# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000791cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794no_recursion=
795prefix=NONE
796program_prefix=NONE
797program_suffix=NONE
798program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803x_includes=NONE
804x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000805
806# Installation directory options.
807# These are left unexpanded so users can "make install exec_prefix=/foo"
808# and all the variables that are supposed to be based on exec_prefix
809# by default will actually change.
810# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812bindir='${exec_prefix}/bin'
813sbindir='${exec_prefix}/sbin'
814libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815datarootdir='${prefix}/share'
816datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817sysconfdir='${prefix}/etc'
818sharedstatedir='${prefix}/com'
819localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820includedir='${prefix}/include'
821oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
823infodir='${datarootdir}/info'
824htmldir='${docdir}'
825dvidir='${docdir}'
826pdfdir='${docdir}'
827psdir='${docdir}'
828libdir='${exec_prefix}/lib'
829localedir='${datarootdir}/locale'
830mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836 # If the previous option needs an argument, assign it.
837 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 ac_prev=
840 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200844 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
845 *=) ac_optarg= ;;
846 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Accept the important Cygnus configure options, so we can diagnose typos.
850
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 case $ac_dashdash$ac_option in
852 --)
853 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855 -bindir | --bindir | --bindi | --bind | --bin | --bi)
856 ac_prev=bindir ;;
857 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859
860 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 -cache-file | --cache-file | --cache-fil | --cache-fi \
866 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
867 ac_prev=cache_file ;;
868 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
869 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 cache_file=$ac_optarg ;;
871
872 --config-cache | -C)
873 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
881 | --dataroo | --dataro | --datar)
882 ac_prev=datarootdir ;;
883 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
884 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
885 datarootdir=$ac_optarg ;;
886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000890 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200891 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000892 ac_useropt_orig=$ac_useropt
893 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
894 case $ac_user_opts in
895 *"
896"enable_$ac_useropt"
897"*) ;;
898 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
899 ac_unrecognized_sep=', ';;
900 esac
901 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902
903 -docdir | --docdir | --docdi | --doc | --do)
904 ac_prev=docdir ;;
905 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
906 docdir=$ac_optarg ;;
907
908 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
909 ac_prev=dvidir ;;
910 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
911 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
913 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000918 ac_useropt_orig=$ac_useropt
919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
920 case $ac_user_opts in
921 *"
922"enable_$ac_useropt"
923"*) ;;
924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
925 ac_unrecognized_sep=', ';;
926 esac
927 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
930 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
931 | --exec | --exe | --ex)
932 ac_prev=exec_prefix ;;
933 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
934 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
935 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Obsolete; use --with-gas.
940 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 -help | --help | --hel | --he | -h)
943 ac_init_help=long ;;
944 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
945 ac_init_help=recursive ;;
946 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
947 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
955 ac_prev=htmldir ;;
956 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
957 | --ht=*)
958 htmldir=$ac_optarg ;;
959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -includedir | --includedir | --includedi | --included | --include \
961 | --includ | --inclu | --incl | --inc)
962 ac_prev=includedir ;;
963 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
964 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -infodir | --infodir | --infodi | --infod | --info | --inf)
968 ac_prev=infodir ;;
969 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libdir | --libdir | --libdi | --libd)
973 ac_prev=libdir ;;
974 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
978 | --libexe | --libex | --libe)
979 ac_prev=libexecdir ;;
980 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
981 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 -localedir | --localedir | --localedi | --localed | --locale)
985 ac_prev=localedir ;;
986 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
987 localedir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 ac_prev=localstatedir ;;
992 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
997 ac_prev=mandir ;;
998 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --without-fp.
1003 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 no_create=yes ;;
1008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1011 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1014 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1015 | --oldin | --oldi | --old | --ol | --o)
1016 ac_prev=oldincludedir ;;
1017 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1018 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1019 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1023 ac_prev=prefix ;;
1024 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1028 | --program-pre | --program-pr | --program-p)
1029 ac_prev=program_prefix ;;
1030 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1031 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1035 | --program-suf | --program-su | --program-s)
1036 ac_prev=program_suffix ;;
1037 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1038 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -program-transform-name | --program-transform-name \
1042 | --program-transform-nam | --program-transform-na \
1043 | --program-transform-n | --program-transform- \
1044 | --program-transform | --program-transfor \
1045 | --program-transfo | --program-transf \
1046 | --program-trans | --program-tran \
1047 | --progr-tra | --program-tr | --program-t)
1048 ac_prev=program_transform_name ;;
1049 -program-transform-name=* | --program-transform-name=* \
1050 | --program-transform-nam=* | --program-transform-na=* \
1051 | --program-transform-n=* | --program-transform-=* \
1052 | --program-transform=* | --program-transfor=* \
1053 | --program-transfo=* | --program-transf=* \
1054 | --program-trans=* | --program-tran=* \
1055 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1059 ac_prev=pdfdir ;;
1060 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1061 pdfdir=$ac_optarg ;;
1062
1063 -psdir | --psdir | --psdi | --psd | --ps)
1064 ac_prev=psdir ;;
1065 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1066 psdir=$ac_optarg ;;
1067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1069 | -silent | --silent | --silen | --sile | --sil)
1070 silent=yes ;;
1071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1073 ac_prev=sbindir ;;
1074 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1075 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1079 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1080 | --sharedst | --shareds | --shared | --share | --shar \
1081 | --sha | --sh)
1082 ac_prev=sharedstatedir ;;
1083 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1084 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1085 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1086 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -site | --site | --sit)
1090 ac_prev=site ;;
1091 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1095 ac_prev=srcdir ;;
1096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1100 | --syscon | --sysco | --sysc | --sys | --sy)
1101 ac_prev=sysconfdir ;;
1102 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1103 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1112 verbose=yes ;;
1113
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 -version | --version | --versio | --versi | --vers | -V)
1115 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001121 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149 --x)
1150 # Obsolete; use --with-x.
1151 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1154 | --x-incl | --x-inc | --x-in | --x-i)
1155 ac_prev=x_includes ;;
1156 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1157 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1161 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1162 ac_prev=x_libraries ;;
1163 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1164 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001167 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1168Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 *=*)
1172 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1173 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 case $ac_envvar in #(
1175 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 export $ac_envvar ;;
1180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001186 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ;;
1188
1189 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001190done
1191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001194 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195fi
1196
Matthias Kloseb9621712010-04-24 17:59:49 +00001197if test -n "$ac_unrecognized_opts"; then
1198 case $enable_option_checking in
1199 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1202 esac
1203fi
1204
1205# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1207 datadir sysconfdir sharedstatedir localstatedir includedir \
1208 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1209 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 # Remove trailing slashes.
1213 case $ac_val in
1214 */ )
1215 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1216 eval $ac_var=\$ac_val;;
1217 esac
1218 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220 [\\/$]* | ?:[\\/]* ) continue;;
1221 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001224done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226# There might be people who depend on the old broken behavior: `$host'
1227# used to hold the argument of --host etc.
1228# FIXME: To remove some day.
1229build=$build_alias
1230host=$host_alias
1231target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Martin v. Löwis11437992002-04-12 09:54:03 +00001233# FIXME: To remove some day.
1234if test "x$host_alias" != x; then
1235 if test "x$build_alias" = x; then
1236 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1238 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 elif test "x$build_alias" != "x$host_alias"; then
1240 cross_compiling=yes
1241 fi
1242fi
1243
1244ac_tool_prefix=
1245test -n "$host_alias" && ac_tool_prefix=$host_alias-
1246
1247test "$silent" = yes && exec 6>/dev/null
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250ac_pwd=`pwd` && test -n "$ac_pwd" &&
1251ac_ls_di=`ls -di .` &&
1252ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256
1257
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258# Find the source files, if location was not specified.
1259if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 ac_confdir=`$as_dirname -- "$as_myself" ||
1263$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1264 X"$as_myself" : 'X\(//\)[^/]' \| \
1265 X"$as_myself" : 'X\(//\)$' \| \
1266 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1267$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)[^/].*/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\).*/{
1281 s//\1/
1282 q
1283 }
1284 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 srcdir=..
1288 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289else
1290 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292if test ! -r "$srcdir/$ac_unique_file"; then
1293 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001294 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1297ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 pwd)`
1300# When building in place, set srcdir=.
1301if test "$ac_abs_confdir" = "$ac_pwd"; then
1302 srcdir=.
1303fi
1304# Remove unnecessary trailing slashes from srcdir.
1305# Double slashes in file names in object file debugging info
1306# mess up M-x gdb in Emacs.
1307case $srcdir in
1308*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1309esac
1310for ac_var in $ac_precious_vars; do
1311 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1312 eval ac_env_${ac_var}_value=\$${ac_var}
1313 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1314 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1315done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317#
1318# Report the --help message.
1319#
1320if test "$ac_init_help" = "long"; then
1321 # Omit some internal or obsolete options to make the list less imposing.
1322 # This message is too long to be a string in the A/UX 3.1 sh.
1323 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001324\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
1326Usage: $0 [OPTION]... [VAR=VALUE]...
1327
1328To assign environment variables (e.g., CC, CFLAGS...), specify them as
1329VAR=VALUE. See below for descriptions of some of the useful variables.
1330
1331Defaults for the options are specified in brackets.
1332
1333Configuration:
1334 -h, --help display this help and exit
1335 --help=short display options specific to this package
1336 --help=recursive display the short help of all the included packages
1337 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --cache-file=FILE cache test results in FILE [disabled]
1340 -C, --config-cache alias for \`--cache-file=config.cache'
1341 -n, --no-create do not create output files
1342 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344Installation directories:
1345 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001347 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001349
1350By default, \`make install' will install all the files in
1351\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1352an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1353for instance \`--prefix=\$HOME'.
1354
1355For better control, use the options below.
1356
1357Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001358 --bindir=DIR user executables [EPREFIX/bin]
1359 --sbindir=DIR system admin executables [EPREFIX/sbin]
1360 --libexecdir=DIR program executables [EPREFIX/libexec]
1361 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1362 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1363 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1364 --libdir=DIR object code libraries [EPREFIX/lib]
1365 --includedir=DIR C header files [PREFIX/include]
1366 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1367 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1368 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1369 --infodir=DIR info documentation [DATAROOTDIR/info]
1370 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1371 --mandir=DIR man documentation [DATAROOTDIR/man]
1372 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1373 --htmldir=DIR html documentation [DOCDIR]
1374 --dvidir=DIR dvi documentation [DOCDIR]
1375 --pdfdir=DIR pdf documentation [DOCDIR]
1376 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001377_ACEOF
1378
1379 cat <<\_ACEOF
1380_ACEOF
1381fi
1382
1383if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001384 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001385 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001386 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 cat <<\_ACEOF
1388
1389Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001393 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001394 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-framework[=INSTALLDIR]
1396 Build (MacOSX|Darwin) framework
1397 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001398 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001399 --enable-loadable-sqlite-extensions
1400 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --enable-ipv6 Enable ipv6 (with ipv4) support
1402 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001403 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001404 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Optional Packages:
1407 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1408 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001409 --with-universal-archs=ARCH
1410 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001411 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001412 --with-framework-name=FRAMEWORK
1413 specify an alternate name of the framework built
1414 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-cxx-main=<compiler>
1417 compile main() and link python executable with C++
1418 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-suffix=.exe set executable suffix
1420 --with-pydebug build with Py_DEBUG defined
1421 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001422 --with-system-expat build pyexpat module using an installed expat
1423 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001424 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001425 --with-dbmliborder=db1:db2:...
1426 order to check db backends for dbm. Valid value is a
1427 colon separated string with the backend names
1428 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with(out)-threads[=DIRECTORY]
1431 disable/enable thread support
1432 --with(out)-thread[=DIRECTORY]
1433 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001435 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001437 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with-fpectl enable SIGFPE catching
1439 --with-libm=STRING math library
1440 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001441 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001442 --with(out)-computed-gotos
1443 Use computed gotos in evaluation loop (enabled by
1444 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446Some influential environment variables:
1447 CC C compiler command
1448 CFLAGS C compiler flags
1449 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1450 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 CPP C preprocessor
1455
1456Use these variables to override the choices made by `configure' or to help
1457it to find libraries and programs with nonstandard names/locations.
1458
Georg Brandle2e15612009-05-20 18:25:10 +00001459Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001462fi
1463
1464if test "$ac_init_help" = "recursive"; then
1465 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 test -d "$ac_dir" ||
1468 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1469 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_builddir=.
1471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472case "$ac_dir" in
1473.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1474*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 case $ac_top_builddir_sub in
1479 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1480 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1481 esac ;;
1482esac
1483ac_abs_top_builddir=$ac_pwd
1484ac_abs_builddir=$ac_pwd$ac_dir_suffix
1485# for backward compatibility:
1486ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 ac_top_srcdir=$ac_top_builddir_sub
1492 ac_abs_top_srcdir=$ac_pwd ;;
1493 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 ac_top_srcdir=$srcdir
1496 ac_abs_top_srcdir=$srcdir ;;
1497 *) # Relative name.
1498 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1499 ac_top_srcdir=$ac_top_build_prefix$srcdir
1500 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001501esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 cd "$ac_dir" || { ac_status=$?; continue; }
1505 # Check for guested configure.
1506 if test -f "$ac_srcdir/configure.gnu"; then
1507 echo &&
1508 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1509 elif test -f "$ac_srcdir/configure"; then
1510 echo &&
1511 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001513 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 fi || ac_status=$?
1515 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 done
1517fi
1518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001520if $ac_init_version; then
1521 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001522python configure 3.3
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001523generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001525Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526This configure script is free software; the Free Software Foundation
1527gives unlimited permission to copy, distribute and modify it.
1528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001531
1532## ------------------------ ##
1533## Autoconf initialization. ##
1534## ------------------------ ##
1535
1536# ac_fn_c_try_compile LINENO
1537# --------------------------
1538# Try to compile conftest.$ac_ext, and return whether this succeeded.
1539ac_fn_c_try_compile ()
1540{
1541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1542 rm -f conftest.$ac_objext
1543 if { { ac_try="$ac_compile"
1544case "(($ac_try" in
1545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1546 *) ac_try_echo=$ac_try;;
1547esac
1548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1549$as_echo "$ac_try_echo"; } >&5
1550 (eval "$ac_compile") 2>conftest.err
1551 ac_status=$?
1552 if test -s conftest.err; then
1553 grep -v '^ *+' conftest.err >conftest.er1
1554 cat conftest.er1 >&5
1555 mv -f conftest.er1 conftest.err
1556 fi
1557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1558 test $ac_status = 0; } && {
1559 test -z "$ac_c_werror_flag" ||
1560 test ! -s conftest.err
1561 } && test -s conftest.$ac_objext; then :
1562 ac_retval=0
1563else
1564 $as_echo "$as_me: failed program was:" >&5
1565sed 's/^/| /' conftest.$ac_ext >&5
1566
1567 ac_retval=1
1568fi
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001569 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 as_fn_set_status $ac_retval
1571
1572} # ac_fn_c_try_compile
1573
Matthias Kloseb9621712010-04-24 17:59:49 +00001574# ac_fn_c_try_link LINENO
1575# -----------------------
1576# Try to link conftest.$ac_ext, and return whether this succeeded.
1577ac_fn_c_try_link ()
1578{
1579 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580 rm -f conftest.$ac_objext conftest$ac_exeext
1581 if { { ac_try="$ac_link"
1582case "(($ac_try" in
1583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1584 *) ac_try_echo=$ac_try;;
1585esac
1586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1587$as_echo "$ac_try_echo"; } >&5
1588 (eval "$ac_link") 2>conftest.err
1589 ac_status=$?
1590 if test -s conftest.err; then
1591 grep -v '^ *+' conftest.err >conftest.er1
1592 cat conftest.er1 >&5
1593 mv -f conftest.er1 conftest.err
1594 fi
1595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1596 test $ac_status = 0; } && {
1597 test -z "$ac_c_werror_flag" ||
1598 test ! -s conftest.err
1599 } && test -s conftest$ac_exeext && {
1600 test "$cross_compiling" = yes ||
1601 $as_test_x conftest$ac_exeext
1602 }; then :
1603 ac_retval=0
1604else
1605 $as_echo "$as_me: failed program was:" >&5
1606sed 's/^/| /' conftest.$ac_ext >&5
1607
1608 ac_retval=1
1609fi
1610 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1611 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1612 # interfere with the next link command; also delete a directory that is
1613 # left behind by Apple's compiler. We do this before executing the actions.
1614 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001615 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 as_fn_set_status $ac_retval
1617
1618} # ac_fn_c_try_link
1619
Matthias Kloseb9621712010-04-24 17:59:49 +00001620# ac_fn_c_try_cpp LINENO
1621# ----------------------
1622# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1623ac_fn_c_try_cpp ()
1624{
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626 if { { ac_try="$ac_cpp conftest.$ac_ext"
1627case "(($ac_try" in
1628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1629 *) ac_try_echo=$ac_try;;
1630esac
1631eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1632$as_echo "$ac_try_echo"; } >&5
1633 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1634 ac_status=$?
1635 if test -s conftest.err; then
1636 grep -v '^ *+' conftest.err >conftest.er1
1637 cat conftest.er1 >&5
1638 mv -f conftest.er1 conftest.err
1639 fi
1640 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001641 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1643 test ! -s conftest.err
1644 }; then :
1645 ac_retval=0
1646else
1647 $as_echo "$as_me: failed program was:" >&5
1648sed 's/^/| /' conftest.$ac_ext >&5
1649
1650 ac_retval=1
1651fi
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001652 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001653 as_fn_set_status $ac_retval
1654
1655} # ac_fn_c_try_cpp
1656
1657# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1658# -------------------------------------------------------
1659# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1660# the include files in INCLUDES and setting the cache variable VAR
1661# accordingly.
1662ac_fn_c_check_header_mongrel ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001665 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1667$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001668if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 $as_echo_n "(cached) " >&6
1670fi
1671eval ac_res=\$$3
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1673$as_echo "$ac_res" >&6; }
1674else
1675 # Is the header compilable?
1676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1677$as_echo_n "checking $2 usability... " >&6; }
1678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1679/* end confdefs.h. */
1680$4
1681#include <$2>
1682_ACEOF
1683if ac_fn_c_try_compile "$LINENO"; then :
1684 ac_header_compiler=yes
1685else
1686 ac_header_compiler=no
1687fi
1688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1690$as_echo "$ac_header_compiler" >&6; }
1691
1692# Is the header present?
1693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1694$as_echo_n "checking $2 presence... " >&6; }
1695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1696/* end confdefs.h. */
1697#include <$2>
1698_ACEOF
1699if ac_fn_c_try_cpp "$LINENO"; then :
1700 ac_header_preproc=yes
1701else
1702 ac_header_preproc=no
1703fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001704rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1706$as_echo "$ac_header_preproc" >&6; }
1707
1708# So? What about this header?
1709case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1710 yes:no: )
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1712$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1714$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1715 ;;
1716 no:yes:* )
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1718$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1720$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1722$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1724$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1726$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001727( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001728## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001729## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 ) | sed "s/^/$as_me: WARNING: /" >&2
1731 ;;
1732esac
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1734$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001735if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001736 $as_echo_n "(cached) " >&6
1737else
1738 eval "$3=\$ac_header_compiler"
1739fi
1740eval ac_res=\$$3
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1742$as_echo "$ac_res" >&6; }
1743fi
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001744 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001745
1746} # ac_fn_c_check_header_mongrel
1747
1748# ac_fn_c_try_run LINENO
1749# ----------------------
1750# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1751# that executables *can* be run.
1752ac_fn_c_try_run ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1755 if { { ac_try="$ac_link"
1756case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_link") 2>&5
1763 ac_status=$?
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1766 { { case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_try") 2>&5
1773 ac_status=$?
1774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775 test $ac_status = 0; }; }; then :
1776 ac_retval=0
1777else
1778 $as_echo "$as_me: program exited with status $ac_status" >&5
1779 $as_echo "$as_me: failed program was:" >&5
1780sed 's/^/| /' conftest.$ac_ext >&5
1781
1782 ac_retval=$ac_status
1783fi
1784 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 as_fn_set_status $ac_retval
1787
1788} # ac_fn_c_try_run
1789
1790# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1791# -------------------------------------------------------
1792# Tests whether HEADER exists and can be compiled using the include files in
1793# INCLUDES, setting the cache variable VAR accordingly.
1794ac_fn_c_check_header_compile ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1798$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001799if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001800 $as_echo_n "(cached) " >&6
1801else
1802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804$4
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_compile "$LINENO"; then :
1808 eval "$3=yes"
1809else
1810 eval "$3=no"
1811fi
1812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1813fi
1814eval ac_res=\$$3
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1816$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818
1819} # ac_fn_c_check_header_compile
1820
Matthias Kloseb9621712010-04-24 17:59:49 +00001821# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1822# -------------------------------------------
1823# Tests whether TYPE exists after having included INCLUDES, setting cache
1824# variable VAR accordingly.
1825ac_fn_c_check_type ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001830if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 eval "$3=no"
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h. */
1836$4
1837int
1838main ()
1839{
1840if (sizeof ($2))
1841 return 0;
1842 ;
1843 return 0;
1844}
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h. */
1849$4
1850int
1851main ()
1852{
1853if (sizeof (($2)))
1854 return 0;
1855 ;
1856 return 0;
1857}
1858_ACEOF
1859if ac_fn_c_try_compile "$LINENO"; then :
1860
1861else
1862 eval "$3=yes"
1863fi
1864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001872
1873} # ac_fn_c_check_type
1874
1875# ac_fn_c_find_uintX_t LINENO BITS VAR
1876# ------------------------------------
1877# Finds an unsigned integer type with width BITS, setting cache variable VAR
1878# accordingly.
1879ac_fn_c_find_uintX_t ()
1880{
1881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1883$as_echo_n "checking for uint$2_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001884if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 $as_echo_n "(cached) " >&6
1886else
1887 eval "$3=no"
1888 # Order is important - never check a type that is potentially smaller
1889 # than half of the expected target width.
1890 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1891 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$ac_includes_default
1895int
1896main ()
1897{
1898static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1899test_array [0] = 0
1900
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906 case $ac_type in #(
1907 uint$2_t) :
1908 eval "$3=yes" ;; #(
1909 *) :
1910 eval "$3=\$ac_type" ;;
1911esac
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001914 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001915
1916else
1917 break
1918fi
1919 done
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_find_uintX_t
1927
1928# ac_fn_c_find_intX_t LINENO BITS VAR
1929# -----------------------------------
1930# Finds a signed integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_intX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1936$as_echo_n "checking for int$2_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in int$2_t 'int' 'long int' \
1944 'long long int' 'short int' 'signed char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001948 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001952static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001963 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001964int
1965main ()
1966{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001967static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001968 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1969test_array [0] = 0
1970
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976
1977else
1978 case $ac_type in #(
1979 int$2_t) :
1980 eval "$3=yes" ;; #(
1981 *) :
1982 eval "$3=\$ac_type" ;;
1983esac
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001988 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990else
1991 break
1992fi
1993 done
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000} # ac_fn_c_find_intX_t
2001
2002# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2003# --------------------------------------------
2004# Tries to find the compile-time value of EXPR in a program that includes
2005# INCLUDES, setting VAR accordingly. Returns whether the value could be
2006# computed
2007ac_fn_c_compute_int ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 if test "$cross_compiling" = yes; then
2011 # Depending upon the size, compute the lo and hi bounds.
2012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) >= 0)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_lo=0 ac_mid=0
2027 while :; do
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2035test_array [0] = 0
2036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_hi=$ac_mid; break
2043else
2044 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2045 if test $ac_lo -le $ac_mid; then
2046 ac_lo= ac_hi=
2047 break
2048 fi
2049 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 done
2053else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) < 0)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_hi=-1 ac_mid=-1
2069 while :; do
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2077test_array [0] = 0
2078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2111test_array [0] = 0
2112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid
2119else
2120 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123done
2124case $ac_lo in #((
2125?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2126'') ac_retval=1 ;;
2127esac
2128 else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132static long int longval () { return $2; }
2133static unsigned long int ulongval () { return $2; }
2134#include <stdio.h>
2135#include <stdlib.h>
2136int
2137main ()
2138{
2139
2140 FILE *f = fopen ("conftest.val", "w");
2141 if (! f)
2142 return 1;
2143 if (($2) < 0)
2144 {
2145 long int i = longval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%ld", i);
2149 }
2150 else
2151 {
2152 unsigned long int i = ulongval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%lu", i);
2156 }
2157 /* Do not output a trailing newline, as this causes \r\n confusion
2158 on some platforms. */
2159 return ferror (f) || fclose (f) != 0;
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_run "$LINENO"; then :
2166 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2167else
2168 ac_retval=1
2169fi
2170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2171 conftest.$ac_objext conftest.beam conftest.$ac_ext
2172rm -f conftest.val
2173
2174 fi
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 as_fn_set_status $ac_retval
2177
2178} # ac_fn_c_compute_int
2179
2180# ac_fn_c_check_func LINENO FUNC VAR
2181# ----------------------------------
2182# Tests whether FUNC exists, setting the cache variable VAR accordingly
2183ac_fn_c_check_func ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2187$as_echo_n "checking for $2... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002188if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 $as_echo_n "(cached) " >&6
2190else
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2195#define $2 innocuous_$2
2196
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $2 (); below.
2199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2200 <limits.h> exists even on freestanding compilers. */
2201
2202#ifdef __STDC__
2203# include <limits.h>
2204#else
2205# include <assert.h>
2206#endif
2207
2208#undef $2
2209
2210/* Override any GCC internal prototype to avoid an error.
2211 Use char because int might match the return type of a GCC
2212 builtin and then its argument prototype would still apply. */
2213#ifdef __cplusplus
2214extern "C"
2215#endif
2216char $2 ();
2217/* The GNU C library defines this for functions which it implements
2218 to always fail with ENOSYS. Some functions are actually named
2219 something starting with __ and the normal name is an alias. */
2220#if defined __stub_$2 || defined __stub___$2
2221choke me
2222#endif
2223
2224int
2225main ()
2226{
2227return $2 ();
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_link "$LINENO"; then :
2233 eval "$3=yes"
2234else
2235 eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext \
2238 conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002244
2245} # ac_fn_c_check_func
2246
2247# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2248# ----------------------------------------------------
2249# Tries to find if the field MEMBER exists in type AGGR, after including
2250# INCLUDES, setting cache variable VAR accordingly.
2251ac_fn_c_check_member ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2255$as_echo_n "checking for $2.$3... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002256if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$5
2278int
2279main ()
2280{
2281static $2 ac_aggr;
2282if (sizeof ac_aggr.$3)
2283return 0;
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_compile "$LINENO"; then :
2289 eval "$4=yes"
2290else
2291 eval "$4=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$4
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002301
2302} # ac_fn_c_check_member
2303
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002304# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2305# ---------------------------------------------
2306# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2307# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002308ac_fn_c_check_decl ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002311 as_decl_name=`echo $2|sed 's/ *(.*//'`
2312 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2314$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002315if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002316 $as_echo_n "(cached) " >&6
2317else
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$4
2321int
2322main ()
2323{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002324#ifndef $as_decl_name
2325#ifdef __cplusplus
2326 (void) $as_decl_use;
2327#else
2328 (void) $as_decl_name;
2329#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002330#endif
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$3=yes"
2338else
2339 eval "$3=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$3
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002346 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002347
2348} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002350This file contains any messages produced by compilers while
2351running configure, to aid debugging if configure makes a mistake.
2352
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002353It was created by python $as_me 3.3, which was
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002354generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
2356 $ $0 $@
2357
2358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002360{
2361cat <<_ASUNAME
2362## --------- ##
2363## Platform. ##
2364## --------- ##
2365
2366hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2367uname -m = `(uname -m) 2>/dev/null || echo unknown`
2368uname -r = `(uname -r) 2>/dev/null || echo unknown`
2369uname -s = `(uname -s) 2>/dev/null || echo unknown`
2370uname -v = `(uname -v) 2>/dev/null || echo unknown`
2371
2372/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2373/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2374
2375/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2376/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2377/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002379/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2380/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2381/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2382
2383_ASUNAME
2384
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002390 $as_echo "PATH: $as_dir"
2391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394} >&5
2395
2396cat >&5 <<_ACEOF
2397
2398
2399## ----------- ##
2400## Core tests. ##
2401## ----------- ##
2402
2403_ACEOF
2404
2405
2406# Keep a trace of the command line.
2407# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_configure_args0=
2413ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_must_keep_next=false
2415for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002416do
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 for ac_arg
2418 do
2419 case $ac_arg in
2420 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2422 | -silent | --silent | --silen | --sile | --sil)
2423 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 esac
2427 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 case $ac_arg in
2435 *=* | --config-cache | -C | -disable-* | --disable-* \
2436 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2437 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2438 | -with-* | --with-* | -without-* | --without-* | --x)
2439 case "$ac_configure_args0 " in
2440 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 esac
2442 ;;
2443 -* ) ac_must_keep_next=true ;;
2444 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 ;;
2448 esac
2449 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002450done
Matthias Kloseb9621712010-04-24 17:59:49 +00002451{ ac_configure_args0=; unset ac_configure_args0;}
2452{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454# When interrupted or exit'd, cleanup temporary files, and complete
2455# config.log. We remove comments because anyway the quotes in there
2456# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457# WARNING: Use '\'' to represent an apostrophe within the trap.
2458# 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 +00002459trap 'exit_status=$?
2460 # Save into config.log some information that might help in debugging.
2461 {
2462 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002463
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002465## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002466## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 echo
2468 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469(
2470 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2471 eval ac_val=\$$ac_var
2472 case $ac_val in #(
2473 *${as_nl}*)
2474 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac
2478 case $ac_var in #(
2479 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2481 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 "s/'\''/'\''\\\\'\'''\''/g;
2490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac |
2496 sort
2497)
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002499
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_vars
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513
2514 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 echo
2519 for ac_var in $ac_subst_files
2520 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 eval ac_val=\$$ac_var
2522 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 done | sort
2527 echo
2528 fi
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 fi
2538 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$as_me: caught signal $ac_signal"
2540 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 rm -f core *.core core.conftest.* &&
2543 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002546for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002547 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549ac_signal=0
2550
2551# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Matthias Kloseb9621712010-04-24 17:59:49 +00002554$as_echo "/* confdefs.h */" > confdefs.h
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556# Predefined preprocessor variables.
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_NAME "$PACKAGE_NAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_VERSION "$PACKAGE_VERSION"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_STRING "$PACKAGE_STRING"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576_ACEOF
2577
Matthias Kloseb9621712010-04-24 17:59:49 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_URL "$PACKAGE_URL"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
2583# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002584# Prefer an explicitly selected file to automatically selected ones.
2585ac_site_file1=NONE
2586ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 # We do not want a PATH search for config.site.
2589 case $CONFIG_SITE in #((
2590 -*) ac_site_file1=./$CONFIG_SITE;;
2591 */*) ac_site_file1=$CONFIG_SITE;;
2592 *) ac_site_file1=./$CONFIG_SITE;;
2593 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$prefix/share/config.site
2596 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597else
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 ac_site_file1=$ac_default_prefix/share/config.site
2599 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002601for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602do
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 test "x$ac_site_file" = xNONE && continue
2604 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2606$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002608 . "$ac_site_file" \
2609 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2611as_fn_error $? "failed to load site script $ac_site_file
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002612See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 fi
2614done
2615
2616if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 # Some versions of bash will fail to source /dev/null (special files
2618 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2619 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2621$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2624 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2629$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 >$cache_file
2631fi
2632
2633# Check that the precious variables saved in the cache have kept the same
2634# value.
2635ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2638 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2640 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $ac_old_set,$ac_new_set in
2642 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2644$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 +00002645 ac_cache_corrupted=: ;;
2646 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2648$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_cache_corrupted=: ;;
2650 ,);;
2651 *)
2652 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 # differences in whitespace do not lead to failure.
2654 ac_old_val_w=`echo x $ac_old_val`
2655 ac_new_val_w=`echo x $ac_new_val`
2656 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2658$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2659 ac_cache_corrupted=:
2660 else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2662$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2663 eval $ac_var=\$ac_old_val
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2666$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2668$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 fi;;
2670 esac
2671 # Pass precious variables to config.status.
2672 if test "$ac_new_set" = set; then
2673 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 *) ac_arg=$ac_var=$ac_new_val ;;
2676 esac
2677 case " $ac_configure_args " in
2678 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 esac
2681 fi
2682done
2683if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2687$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002688 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002690## -------------------- ##
2691## Main body of script. ##
2692## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693
Guido van Rossum7f43da71994-08-01 12:15:30 +00002694ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Michael W. Hudson54241132001-12-07 15:38:26 +00002701
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702
2703
2704
2705
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002706if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002707then
2708# Extract the first word of "hg", so it can be a program name with args.
2709set dummy hg; ac_word=$2
2710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2711$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002712if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713 $as_echo_n "(cached) " >&6
2714else
2715 if test -n "$HAS_HG"; then
2716 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2717else
2718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2719for as_dir in $PATH
2720do
2721 IFS=$as_save_IFS
2722 test -z "$as_dir" && as_dir=.
2723 for ac_exec_ext in '' $ac_executable_extensions; do
2724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2725 ac_cv_prog_HAS_HG="found"
2726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2727 break 2
2728 fi
2729done
2730 done
2731IFS=$as_save_IFS
2732
2733 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2734fi
2735fi
2736HAS_HG=$ac_cv_prog_HAS_HG
2737if test -n "$HAS_HG"; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2739$as_echo "$HAS_HG" >&6; }
2740else
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2742$as_echo "no" >&6; }
2743fi
2744
2745
2746else
2747HAS_HG=no-repository
2748fi
2749if test $HAS_HG = found
2750then
2751 HGVERSION="hg id -i \$(srcdir)"
2752 HGTAG="hg id -t \$(srcdir)"
2753 HGBRANCH="hg id -b \$(srcdir)"
2754else
2755 HGVERSION=""
2756 HGTAG=""
2757 HGBRANCH=""
2758fi
2759
2760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
2763
Martin v. Löwis11437992002-04-12 09:54:03 +00002764
Benjamin Petersond23f8222009-04-05 19:13:16 +00002765if test "$prefix" != "/"; then
2766 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2767fi
2768
2769
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002772# We don't use PACKAGE_ variables, and they cause conflicts
2773# with other autoconf-based packages that include Python.h
2774grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2775rm confdefs.h
2776mv confdefs.h.new confdefs.h
2777
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002778
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002779VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002780
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002781# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002782
2783SOVERSION=1.0
2784
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002785# The later defininition of _XOPEN_SOURCE disables certain features
2786# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2787
Matthias Kloseb9621712010-04-24 17:59:49 +00002788$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002789
2790
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002791# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2792# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2793# them.
2794
Matthias Kloseb9621712010-04-24 17:59:49 +00002795$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002796
2797
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002798# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2799# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2800# them.
2801
Matthias Kloseb9621712010-04-24 17:59:49 +00002802$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002803
2804
Martin v. Löwisd6320502004-08-12 13:45:08 +00002805# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2806# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2807
Matthias Kloseb9621712010-04-24 17:59:49 +00002808$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002809
2810
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002811# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2812# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2813# them.
2814
Matthias Kloseb9621712010-04-24 17:59:49 +00002815$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002816
2817
2818
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002819define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002820
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002821# Arguments passed to configure.
2822
2823CONFIG_ARGS="$ac_configure_args"
2824
Matthias Kloseb9621712010-04-24 17:59:49 +00002825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2826$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002828if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002830 case $enableval in
2831 yes)
2832 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002833 if test ! -d "${enableval}"
2834 then
2835 enableval=/
2836 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002837 ;;
2838 esac
2839 case $enableval in
2840 no)
2841 UNIVERSALSDK=
2842 enable_universalsdk=
2843 ;;
2844 *)
2845 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002846 if test ! -d "${UNIVERSALSDK}"
2847 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002848 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002849 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 ;;
2851 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002852
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002853
Thomas Wouters477c8d52006-05-27 19:21:47 +00002854else
2855
2856 UNIVERSALSDK=
2857 enable_universalsdk=
2858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002860
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002861if test -n "${UNIVERSALSDK}"
2862then
Matthias Kloseb9621712010-04-24 17:59:49 +00002863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2864$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002865else
Matthias Kloseb9621712010-04-24 17:59:49 +00002866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2867$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002868fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002871
2872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002873UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002874
Matthias Kloseb9621712010-04-24 17:59:49 +00002875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2876$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002877
2878# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002879if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002880 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2882$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002883 UNIVERSAL_ARCHS="$withval"
2884
2885else
2886
Matthias Kloseb9621712010-04-24 17:59:49 +00002887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2888$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002889
2890fi
2891
2892
2893
2894
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002895
2896# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002897if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002898 withval=$with_framework_name;
2899 PYTHONFRAMEWORK=${withval}
2900 PYTHONFRAMEWORKDIR=${withval}.framework
2901 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2902
2903else
2904
2905 PYTHONFRAMEWORK=Python
2906 PYTHONFRAMEWORKDIR=Python.framework
2907 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2908
2909fi
2910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002911# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002912if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002913 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002914 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002916 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002917 esac
2918 case $enableval in
2919 no)
2920 PYTHONFRAMEWORK=
2921 PYTHONFRAMEWORKDIR=no-framework
2922 PYTHONFRAMEWORKPREFIX=
2923 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924 FRAMEWORKINSTALLFIRST=
2925 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002926 FRAMEWORKALTINSTALLFIRST=
2927 FRAMEWORKALTINSTALLLAST=
2928 if test "x${prefix}" = "xNONE"; then
2929 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2930 else
2931 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2932 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002933 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002934 ;;
2935 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002936 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002937 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002939 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002940 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2941 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002942 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002943
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002944 if test "x${prefix}" = "xNONE" ; then
2945 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002946
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002947 else
2948 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2949 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002950
2951 case "${enableval}" in
2952 /System*)
2953 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2954 if test "${prefix}" = "NONE" ; then
2955 # See below
2956 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2957 fi
2958 ;;
2959
2960 /Library*)
2961 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2962 ;;
2963
2964 */Library/Frameworks)
2965 MDIR="`dirname "${enableval}"`"
2966 MDIR="`dirname "${MDIR}"`"
2967 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2968
2969 if test "${prefix}" = "NONE"; then
2970 # User hasn't specified the
2971 # --prefix option, but wants to install
2972 # the framework in a non-default location,
2973 # ensure that the compatibility links get
2974 # installed relative to that prefix as well
2975 # instead of in /usr/local.
2976 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2977 fi
2978 ;;
2979
2980 *)
2981 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2982 ;;
2983 esac
2984
Jack Jansen127e56e2001-09-11 14:41:54 +00002985 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002986
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002987 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002988 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002993 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2994
2995 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2996
Jack Jansene578a632001-08-15 01:27:14 +00002997 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
Guido van Rossum563e7081996-09-10 18:20:48 +00002999else
Martin v. Löwis11437992002-04-12 09:54:03 +00003000
Jack Jansene578a632001-08-15 01:27:14 +00003001 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003002 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003003 PYTHONFRAMEWORKPREFIX=
3004 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003005 FRAMEWORKINSTALLFIRST=
3006 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003007 FRAMEWORKALTINSTALLFIRST=
3008 FRAMEWORKALTINSTALLLAST=
3009 if test "x${prefix}" = "xNONE" ; then
3010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3011 else
3012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3013 fi
Jack Jansene578a632001-08-15 01:27:14 +00003014 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003015
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017fi
3018
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019
3020
Michael W. Hudson54241132001-12-07 15:38:26 +00003021
3022
3023
3024
Jack Jansene578a632001-08-15 01:27:14 +00003025
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003026
3027
3028
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003029
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003030
Jack Jansene578a632001-08-15 01:27:14 +00003031##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003032## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003033## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003034##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003035# Set name for machine-dependent library files
3036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3038$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003039if test -z "$MACHDEP"
3040then
Guido van Rossum563e7081996-09-10 18:20:48 +00003041 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003042 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003043 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003044 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003045 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003046 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003047 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003048 ac_md_system=`echo $ac_sys_system |
3049 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3050 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003051 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003052 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003053
Guido van Rossum07397971997-04-29 21:49:50 +00003054 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003055 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003056 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003057 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003058 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003059 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003060 esac
3061fi
Guido van Rossum91922671997-10-09 20:24:13 +00003062
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003063# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3064# disable features if it is defined, without any means to access these
3065# features as extensions. For these systems, we skip the definition of
3066# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3067# some feature, make sure there is no alternative way to access this
3068# feature. Also, when using wildcards, make sure you have verified the
3069# need for not defining _XOPEN_SOURCE on all systems matching the
3070# wildcard, and that the wildcard does not include future systems
3071# (which may remove their limitations).
3072case $ac_sys_system/$ac_sys_release in
3073 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3074 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003075 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003076 # In addition, Stefan Krah confirms that issue #1244610 exists through
3077 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003078 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003079 define_xopen_source=no
3080 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3081 # also defined. This can be overridden by defining _BSD_SOURCE
3082 # As this has a different meaning on Linux, only define it on OpenBSD
3083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003085
3086 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003087 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003088 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3089 # also defined. This can be overridden by defining _BSD_SOURCE
3090 # As this has a different meaning on Linux, only define it on OpenBSD
3091
Matthias Kloseb9621712010-04-24 17:59:49 +00003092$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003093
3094 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003095 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3096 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3097 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003098 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 +00003099 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003100 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3101 # request to enable features supported by the standard as a request
3102 # to disable features not supported by the standard. The best way
3103 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3104 # entirely and define __EXTENSIONS__ instead.
3105 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003106 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003107 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3108 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003109 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003110 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003111 define_xopen_source=no;;
3112 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003113 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003114 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003115 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003116 # On FreeBSD 4, the math functions C89 does not cover are never defined
3117 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3118 FreeBSD/4.*)
3119 define_xopen_source=no;;
3120 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3121 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3122 # identifies itself as Darwin/7.*
3123 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3124 # disables platform specific features beyond repair.
3125 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3126 # has no effect, don't bother defining them
3127 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003128 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003129 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003130 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003131 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3132 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3133 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003134 AIX/4)
3135 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003136 AIX/5)
3137 if test `uname -r` -eq 1; then
3138 define_xopen_source=no
3139 fi
3140 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003141 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3142 # defining NI_NUMERICHOST.
3143 QNX/6.3.2)
3144 define_xopen_source=no
3145 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003146
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003147esac
3148
3149if test $define_xopen_source = yes
3150then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003151
Matthias Kloseb9621712010-04-24 17:59:49 +00003152$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003153
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003154
3155 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3156 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3157 # several APIs are not declared. Since this is also needed in some
3158 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003159
Matthias Kloseb9621712010-04-24 17:59:49 +00003160$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003161
3162
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003163
Matthias Kloseb9621712010-04-24 17:59:49 +00003164$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003165
3166
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003167fi
3168
Guido van Rossum91922671997-10-09 20:24:13 +00003169#
3170# SGI compilers allow the specification of the both the ABI and the
3171# ISA on the command line. Depending on the values of these switches,
3172# different and often incompatable code will be generated.
3173#
3174# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3175# thus supply support for various ABI/ISA combinations. The MACHDEP
3176# variable is also adjusted.
3177#
3178
3179if test ! -z "$SGI_ABI"
3180then
3181 CC="cc $SGI_ABI"
3182 LDFLAGS="$SGI_ABI $LDFLAGS"
3183 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3186$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003187
Jack Jansen6b08a402004-06-03 12:41:45 +00003188# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3189# it may influence the way we can build extensions, so distutils
3190# needs to check it
3191
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Jack Jansen6b08a402004-06-03 12:41:45 +00003193CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003195
Matthias Kloseb9621712010-04-24 17:59:49 +00003196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3197$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003198ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3200$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003201
Guido van Rossum627b2d71993-12-24 10:39:16 +00003202# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003203
3204# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3205# for debug/optimization stuff. BASECFLAGS is for flags that are required
3206# just to get things to compile and link. Users are free to override OPT
3207# when running configure or make. The build should not break if they do.
3208# BASECFLAGS should generally not be messed with, however.
3209
3210# XXX shouldn't some/most/all of this code be merged with the stuff later
3211# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3213$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003216if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003218 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003219 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003220 without_gcc=yes;;
3221 yes) CC=gcc
3222 without_gcc=no;;
3223 *) CC=$withval
3224 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003225 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003226else
Martin v. Löwis11437992002-04-12 09:54:03 +00003227
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003229 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003230 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003231 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003232 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233fi
3234
Matthias Kloseb9621712010-04-24 17:59:49 +00003235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3236$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003237
Guido van Rossum8b131c51995-03-09 14:10:13 +00003238# If the user switches compilers, we can't believe the cache
3239if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3240then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003241 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003242(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003243fi
3244
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003245# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3246# when the compiler supports them, but we don't always want -O2, and
3247# we set -g later.
3248if test -z "$CFLAGS"; then
3249 CFLAGS=
3250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003251ac_ext=c
3252ac_cpp='$CPP $CPPFLAGS'
3253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3255ac_compiler_gnu=$ac_cv_c_compiler_gnu
3256if test -n "$ac_tool_prefix"; then
3257 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3258set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003261if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003263else
3264 if test -n "$CC"; then
3265 ac_cv_prog_CC="$CC" # Let the user override the test.
3266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in $PATH
3269do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003272 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273 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 +00003274 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003275 $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 +00003276 break 2
3277 fi
3278done
Matthias Kloseb9621712010-04-24 17:59:49 +00003279 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003281
Jack Jansendd19cf82001-12-06 22:36:17 +00003282fi
3283fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003284CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003285if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3287$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003288else
Matthias Kloseb9621712010-04-24 17:59:49 +00003289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003291fi
3292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293
Martin v. Löwis11437992002-04-12 09:54:03 +00003294fi
3295if test -z "$ac_cv_prog_CC"; then
3296 ac_ct_CC=$CC
3297 # Extract the first word of "gcc", so it can be a program name with args.
3298set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3300$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003301if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003303else
3304 if test -n "$ac_ct_CC"; then
3305 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3306else
3307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308for as_dir in $PATH
3309do
3310 IFS=$as_save_IFS
3311 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003312 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003313 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 +00003314 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003315 $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 +00003316 break 2
3317 fi
3318done
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003320IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003321
3322fi
3323fi
3324ac_ct_CC=$ac_cv_prog_ac_ct_CC
3325if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3327$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003328else
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3330$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003331fi
3332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333 if test "x$ac_ct_CC" = x; then
3334 CC=""
3335 else
3336 case $cross_compiling:$ac_tool_warned in
3337yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003338{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3339$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003340ac_tool_warned=yes ;;
3341esac
3342 CC=$ac_ct_CC
3343 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003344else
3345 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003346fi
3347
Jack Jansendd19cf82001-12-06 22:36:17 +00003348if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349 if test -n "$ac_tool_prefix"; then
3350 # 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 +00003351set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003354if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003355 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003356else
3357 if test -n "$CC"; then
3358 ac_cv_prog_CC="$CC" # Let the user override the test.
3359else
Martin v. Löwis11437992002-04-12 09:54:03 +00003360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361for as_dir in $PATH
3362do
3363 IFS=$as_save_IFS
3364 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003365 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003366 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 +00003367 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 $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 +00003369 break 2
3370 fi
3371done
Matthias Kloseb9621712010-04-24 17:59:49 +00003372 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003373IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003374
3375fi
3376fi
3377CC=$ac_cv_prog_CC
3378if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3380$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003381else
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3383$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003384fi
3385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003386
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003388fi
3389if test -z "$CC"; then
3390 # Extract the first word of "cc", so it can be a program name with args.
3391set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3393$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003394if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003396else
3397 if test -n "$CC"; then
3398 ac_cv_prog_CC="$CC" # Let the user override the test.
3399else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003400 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3402for as_dir in $PATH
3403do
3404 IFS=$as_save_IFS
3405 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003407 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 +00003408 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3409 ac_prog_rejected=yes
3410 continue
3411 fi
3412 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003413 $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 +00003414 break 2
3415 fi
3416done
Matthias Kloseb9621712010-04-24 17:59:49 +00003417 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003418IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003419
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003420if test $ac_prog_rejected = yes; then
3421 # We found a bogon in the path, so make sure we never use it.
3422 set dummy $ac_cv_prog_CC
3423 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003425 # We chose a different compiler from the bogus one.
3426 # However, it has the same basename, so the bogon will be chosen
3427 # first if we set CC to just the basename; use the full file name.
3428 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003429 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003430 fi
3431fi
3432fi
3433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003434CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003435if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3437$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003438else
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3440$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003441fi
3442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444fi
3445if test -z "$CC"; then
3446 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 do
3449 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3452$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003453if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003455else
3456 if test -n "$CC"; then
3457 ac_cv_prog_CC="$CC" # Let the user override the test.
3458else
Martin v. Löwis11437992002-04-12 09:54:03 +00003459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3460for as_dir in $PATH
3461do
3462 IFS=$as_save_IFS
3463 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003464 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465 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 +00003466 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003467 $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 +00003468 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003470done
Matthias Kloseb9621712010-04-24 17:59:49 +00003471 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003473
3474fi
3475fi
3476CC=$ac_cv_prog_CC
3477if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3479$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003480else
Matthias Kloseb9621712010-04-24 17:59:49 +00003481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3482$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003483fi
3484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 test -n "$CC" && break
3487 done
3488fi
3489if test -z "$CC"; then
3490 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003492do
3493 # Extract the first word of "$ac_prog", so it can be a program name with args.
3494set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3496$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003497if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003498 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003499else
3500 if test -n "$ac_ct_CC"; then
3501 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3502else
3503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3504for as_dir in $PATH
3505do
3506 IFS=$as_save_IFS
3507 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003508 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 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 +00003510 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003511 $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 +00003512 break 2
3513 fi
3514done
Matthias Kloseb9621712010-04-24 17:59:49 +00003515 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003516IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003517
Martin v. Löwis11437992002-04-12 09:54:03 +00003518fi
3519fi
3520ac_ct_CC=$ac_cv_prog_ac_ct_CC
3521if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3523$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003524else
Matthias Kloseb9621712010-04-24 17:59:49 +00003525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3526$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003527fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 test -n "$ac_ct_CC" && break
3531done
Michael W. Hudson54241132001-12-07 15:38:26 +00003532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533 if test "x$ac_ct_CC" = x; then
3534 CC=""
3535 else
3536 case $cross_compiling:$ac_tool_warned in
3537yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003540ac_tool_warned=yes ;;
3541esac
3542 CC=$ac_ct_CC
3543 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003544fi
3545
3546fi
3547
3548
Matthias Kloseb9621712010-04-24 17:59:49 +00003549test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003551as_fn_error $? "no acceptable C compiler found in \$PATH
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003552See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003553
3554# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003555$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3556set X $ac_compile
3557ac_compiler=$2
3558for ac_option in --version -v -V -qversion; do
3559 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560case "(($ac_try" in
3561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3562 *) ac_try_echo=$ac_try;;
3563esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3565$as_echo "$ac_try_echo"; } >&5
3566 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 if test -s conftest.err; then
3569 sed '10a\
3570... rest of stderr output deleted ...
3571 10q' conftest.err >conftest.er1
3572 cat conftest.er1 >&5
3573 fi
3574 rm -f conftest.er1 conftest.err
3575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3576 test $ac_status = 0; }
3577done
Martin v. Löwis11437992002-04-12 09:54:03 +00003578
Matthias Kloseb9621712010-04-24 17:59:49 +00003579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003580/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582int
3583main ()
3584{
3585
3586 ;
3587 return 0;
3588}
3589_ACEOF
3590ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003591ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003592# Try to create an executable without -o first, disregard a.out.
3593# It will help us diagnose broken compilers, and finding out an intuition
3594# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3596$as_echo_n "checking whether the C compiler works... " >&6; }
3597ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3598
3599# The possible output files:
3600ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602ac_rmfiles=
3603for ac_file in $ac_files
3604do
3605 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3608 esac
3609done
3610rm -f $ac_rmfiles
3611
Matthias Kloseb9621712010-04-24 17:59:49 +00003612if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613case "(($ac_try" in
3614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3615 *) ac_try_echo=$ac_try;;
3616esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003617eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3618$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3622 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3624# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3625# in a Makefile. We should not override ac_cv_exeext if it was cached,
3626# so that the user can short-circuit this test for compilers unknown to
3627# Autoconf.
3628for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003629do
3630 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003633 ;;
3634 [ab].out )
3635 # We found the default executable, but exeext='' is most
3636 # certainly right.
3637 break;;
3638 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003640 then :; else
3641 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3642 fi
3643 # We set ac_cv_exeext here because the later test for it is not
3644 # safe: cross compilers may not add the suffix if given an `-o'
3645 # argument, so we may need to know it at that point already.
3646 # Even if this section looks crufty: it has the advantage of
3647 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003648 break;;
3649 * )
3650 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 esac
3652done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653test "$ac_cv_exeext" = no && ac_cv_exeext=
3654
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003655else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656 ac_file=''
3657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003658if test -z "$ac_file"; then :
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
3661$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003662sed 's/^/| /' conftest.$ac_ext >&5
3663
Matthias Kloseb9621712010-04-24 17:59:49 +00003664{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003666as_fn_error 77 "C compiler cannot create executables
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003667See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003668else
3669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3670$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3673$as_echo_n "checking for C compiler default output file name... " >&6; }
3674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3675$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003677
Matthias Kloseb9621712010-04-24 17:59:49 +00003678rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003679ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3681$as_echo_n "checking for suffix of executables... " >&6; }
3682if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683case "(($ac_try" in
3684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3685 *) ac_try_echo=$ac_try;;
3686esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3688$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3692 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003693 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3694# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3695# work properly (i.e., refer to `conftest.exe'), while it won't with
3696# `rm'.
3697for ac_file in conftest.exe conftest conftest.*; do
3698 test -f "$ac_file" || continue
3699 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003701 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3702 break;;
3703 * ) break;;
3704 esac
3705done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003706else
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003709as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003710See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003712rm -f conftest conftest$ac_cv_exeext
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3714$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003715
3716rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003717EXEEXT=$ac_cv_exeext
3718ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3720/* end confdefs.h. */
3721#include <stdio.h>
3722int
3723main ()
3724{
3725FILE *f = fopen ("conftest.out", "w");
3726 return ferror (f) || fclose (f) != 0;
3727
3728 ;
3729 return 0;
3730}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003732ac_clean_files="$ac_clean_files conftest.out"
3733# Check that the compiler produces executables we can run. If not, either
3734# the compiler is broken, or we cross compile.
3735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3736$as_echo_n "checking whether we are cross compiling... " >&6; }
3737if test "$cross_compiling" != yes; then
3738 { { ac_try="$ac_link"
3739case "(($ac_try" in
3740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3741 *) ac_try_echo=$ac_try;;
3742esac
3743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3744$as_echo "$ac_try_echo"; } >&5
3745 (eval "$ac_link") 2>&5
3746 ac_status=$?
3747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3748 test $ac_status = 0; }
3749 if { ac_try='./conftest$ac_cv_exeext'
3750 { { case "(($ac_try" in
3751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3752 *) ac_try_echo=$ac_try;;
3753esac
3754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3755$as_echo "$ac_try_echo"; } >&5
3756 (eval "$ac_try") 2>&5
3757 ac_status=$?
3758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3759 test $ac_status = 0; }; }; then
3760 cross_compiling=no
3761 else
3762 if test "$cross_compiling" = maybe; then
3763 cross_compiling=yes
3764 else
3765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003767as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003768If you meant to cross compile, use \`--host'.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003769See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 fi
3771 fi
3772fi
3773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3774$as_echo "$cross_compiling" >&6; }
3775
3776rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3777ac_clean_files=$ac_clean_files_save
3778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3779$as_echo_n "checking for suffix of object files... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003780if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $as_echo_n "(cached) " >&6
3782else
3783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003784/* end confdefs.h. */
3785
3786int
3787main ()
3788{
3789
3790 ;
3791 return 0;
3792}
3793_ACEOF
3794rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003795if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796case "(($ac_try" in
3797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3798 *) ac_try_echo=$ac_try;;
3799esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3801$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003803 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3805 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 for ac_file in conftest.o conftest.obj conftest.*; do
3807 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3811 break;;
3812 esac
3813done
3814else
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003816sed 's/^/| /' conftest.$ac_ext >&5
3817
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003820as_fn_error $? "cannot compute suffix of object files: cannot compile
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003821See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003823rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3826$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003827OBJEXT=$ac_cv_objext
3828ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3830$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003831if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003833else
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837int
3838main ()
3839{
3840#ifndef __GNUC__
3841 choke me
3842#endif
3843
3844 ;
3845 return 0;
3846}
3847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003848if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_compiler_gnu=yes
3850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003854ac_cv_c_compiler_gnu=$ac_compiler_gnu
3855
3856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3858$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3859if test $ac_compiler_gnu = yes; then
3860 GCC=yes
3861else
3862 GCC=
3863fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003864ac_test_CFLAGS=${CFLAGS+set}
3865ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3867$as_echo_n "checking whether $CC accepts -g... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003868if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003870else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871 ac_save_c_werror_flag=$ac_c_werror_flag
3872 ac_c_werror_flag=yes
3873 ac_cv_prog_cc_g=no
3874 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003877
Martin v. Löwis11437992002-04-12 09:54:03 +00003878int
3879main ()
3880{
3881
3882 ;
3883 return 0;
3884}
3885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003886if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003887 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888else
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 CFLAGS=""
3890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891/* end confdefs.h. */
3892
3893int
3894main ()
3895{
3896
3897 ;
3898 return 0;
3899}
3900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003901if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902
Matthias Kloseb9621712010-04-24 17:59:49 +00003903else
3904 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907/* end confdefs.h. */
3908
3909int
3910main ()
3911{
3912
3913 ;
3914 return 0;
3915}
3916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003917if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3925 ac_c_werror_flag=$ac_save_c_werror_flag
3926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3928$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003929if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003930 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003931elif test $ac_cv_prog_cc_g = yes; then
3932 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003933 CFLAGS="-g -O2"
3934 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003935 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936 fi
3937else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003938 if test "$GCC" = yes; then
3939 CFLAGS="-O2"
3940 else
3941 CFLAGS=
3942 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3945$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02003946if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003948else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003950ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003952/* end confdefs.h. */
3953#include <stdarg.h>
3954#include <stdio.h>
3955#include <sys/types.h>
3956#include <sys/stat.h>
3957/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3958struct buf { int x; };
3959FILE * (*rcsopen) (struct buf *, struct stat *, int);
3960static char *e (p, i)
3961 char **p;
3962 int i;
3963{
3964 return p[i];
3965}
3966static char *f (char * (*g) (char **, int), char **p, ...)
3967{
3968 char *s;
3969 va_list v;
3970 va_start (v,p);
3971 s = g (p, va_arg (v,int));
3972 va_end (v);
3973 return s;
3974}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003975
3976/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3977 function prototypes and stuff, but not '\xHH' hex character constants.
3978 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003980 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3981 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003983int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3986 inside strings and character constants. */
3987#define FOO(x) 'x'
3988int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3989
Skip Montanaro6dead952003-09-25 14:50:04 +00003990int test (int i, double x);
3991struct s1 {int (*f) (int a);};
3992struct s2 {int (*f) (double a);};
3993int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3994int argc;
3995char **argv;
3996int
3997main ()
3998{
3999return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4000 ;
4001 return 0;
4002}
4003_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4005 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004006do
4007 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004008 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011rm -f core conftest.err conftest.$ac_objext
4012 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004013done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004015CC=$ac_save_CC
4016
4017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018# AC_CACHE_VAL
4019case "x$ac_cv_prog_cc_c89" in
4020 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4022$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4025$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004026 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4029$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004030esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004031if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004032
Matthias Kloseb9621712010-04-24 17:59:49 +00004033fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004034
Martin v. Löwis11437992002-04-12 09:54:03 +00004035ac_ext=c
4036ac_cpp='$CPP $CPPFLAGS'
4037ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4038ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4039ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004041
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042
4043
Matthias Kloseb9621712010-04-24 17:59:49 +00004044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4045$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004048if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004050
4051 case $withval in
4052 no) with_cxx_main=no
4053 MAINCC='$(CC)';;
4054 yes) with_cxx_main=yes
4055 MAINCC='$(CXX)';;
4056 *) with_cxx_main=yes
4057 MAINCC=$withval
4058 if test -z "$CXX"
4059 then
4060 CXX=$withval
4061 fi;;
4062 esac
4063else
4064
4065 with_cxx_main=no
4066 MAINCC='$(CC)'
4067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004068fi
4069
Matthias Kloseb9621712010-04-24 17:59:49 +00004070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4071$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004072
4073preset_cxx="$CXX"
4074if test -z "$CXX"
4075then
4076 case "$CC" in
4077 gcc) # Extract the first word of "g++", so it can be a program name with args.
4078set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4080$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004081if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004083else
4084 case $CXX in
4085 [\\/]* | ?:[\\/]*)
4086 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4087 ;;
4088 *)
4089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4090for as_dir in notfound
4091do
4092 IFS=$as_save_IFS
4093 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004095 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 +00004096 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004098 break 2
4099 fi
4100done
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004103
4104 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4105 ;;
4106esac
4107fi
4108CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004109if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4111$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004112else
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4114$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117 ;;
4118 cc) # Extract the first word of "c++", so it can be a program name with args.
4119set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4121$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004122if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124else
4125 case $CXX in
4126 [\\/]* | ?:[\\/]*)
4127 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4128 ;;
4129 *)
4130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4131for as_dir in notfound
4132do
4133 IFS=$as_save_IFS
4134 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136 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 +00004137 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004139 break 2
4140 fi
4141done
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144
4145 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4146 ;;
4147esac
4148fi
4149CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004150if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4152$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4155$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004157
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004158 ;;
4159 esac
4160 if test "$CXX" = "notfound"
4161 then
4162 CXX=""
4163 fi
4164fi
4165if test -z "$CXX"
4166then
4167 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4168do
4169 # Extract the first word of "$ac_prog", so it can be a program name with args.
4170set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4172$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004173if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004175else
4176 if test -n "$CXX"; then
4177 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4178else
4179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4180for as_dir in $PATH
4181do
4182 IFS=$as_save_IFS
4183 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185 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 +00004186 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004188 break 2
4189 fi
4190done
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004193
4194fi
4195fi
4196CXX=$ac_cv_prog_CXX
4197if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4199$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004200else
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4202$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004203fi
4204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004206 test -n "$CXX" && break
4207done
4208test -n "$CXX" || CXX="notfound"
4209
4210 if test "$CXX" = "notfound"
4211 then
4212 CXX=""
4213 fi
4214fi
4215if test "$preset_cxx" != "$CXX"
4216then
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004218
4219 By default, distutils will build C++ extension modules with \"$CXX\".
4220 If this is not intended, then set CXX on the configure command line.
4221 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004222$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004223
4224 By default, distutils will build C++ extension modules with \"$CXX\".
4225 If this is not intended, then set CXX on the configure command line.
4226 " >&2;}
4227fi
4228
4229
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4231$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4232save_LDFLAGS="$LDFLAGS"
4233LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004234
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4236/* end confdefs.h. */
4237
4238int
4239main ()
4240{
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
4246if ac_fn_c_try_link "$LINENO"; then :
4247 NO_AS_NEEDED="-Wl,--no-as-needed"
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4249$as_echo "yes" >&6; }
4250else
4251 NO_AS_NEEDED=""
4252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4253$as_echo "no" >&6; }
4254fi
4255rm -f core conftest.err conftest.$ac_objext \
4256 conftest$ac_exeext conftest.$ac_ext
4257LDFLAGS="$save_LDFLAGS"
4258
4259
4260
4261# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004262ac_ext=c
4263ac_cpp='$CPP $CPPFLAGS'
4264ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4265ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4266ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4268$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004269# On Suns, sometimes $CPP names a directory.
4270if test -n "$CPP" && test -d "$CPP"; then
4271 CPP=
4272fi
4273if test -z "$CPP"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004274 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004276else
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 # Double quotes because CPP needs to be expanded
4278 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4279 do
4280 ac_preproc_ok=false
4281for ac_c_preproc_warn_flag in '' yes
4282do
4283 # Use a header file that comes with gcc, so configuring glibc
4284 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004285 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4286 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004287 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004288 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004290/* end confdefs.h. */
4291#ifdef __STDC__
4292# include <limits.h>
4293#else
4294# include <assert.h>
4295#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004298if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004299
Matthias Kloseb9621712010-04-24 17:59:49 +00004300else
Martin v. Löwis11437992002-04-12 09:54:03 +00004301 # Broken: fails on valid input.
4302continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004303fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004304rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004310#include <ac_nonexistent.h>
4311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004312if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004313 # Broken: success on invalid input.
4314continue
4315else
Martin v. Löwis11437992002-04-12 09:54:03 +00004316 # Passes both tests.
4317ac_preproc_ok=:
4318break
4319fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004320rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004321
4322done
4323# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004324rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004325if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 break
4327fi
4328
4329 done
4330 ac_cv_prog_CPP=$CPP
4331
4332fi
4333 CPP=$ac_cv_prog_CPP
4334else
4335 ac_cv_prog_CPP=$CPP
4336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4338$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004339ac_preproc_ok=false
4340for ac_c_preproc_warn_flag in '' yes
4341do
4342 # Use a header file that comes with gcc, so configuring glibc
4343 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004344 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4345 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004346 # On the NeXT, cc -E runs the code through the compiler's parser,
4347 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004349/* end confdefs.h. */
4350#ifdef __STDC__
4351# include <limits.h>
4352#else
4353# include <assert.h>
4354#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004355 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004358
Matthias Kloseb9621712010-04-24 17:59:49 +00004359else
Martin v. Löwis11437992002-04-12 09:54:03 +00004360 # Broken: fails on valid input.
4361continue
4362fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004363rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004369#include <ac_nonexistent.h>
4370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004371if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004372 # Broken: success on invalid input.
4373continue
4374else
Martin v. Löwis11437992002-04-12 09:54:03 +00004375 # Passes both tests.
4376ac_preproc_ok=:
4377break
4378fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004379rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004380
4381done
4382# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004383rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004384if $ac_preproc_ok; then :
4385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386else
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004389as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004390See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004391fi
4392
4393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
4398
4399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4401$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004402if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004404else
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 # Loop through the user's path and test for each of PROGNAME-LIST
4408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4410do
4411 IFS=$as_save_IFS
4412 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004413 for ac_prog in grep ggrep; do
4414 for ac_exec_ext in '' $ac_executable_extensions; do
4415 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4416 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4417# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 # Check for GNU $ac_path_GREP
4419case `"$ac_path_GREP" --version 2>&1` in
4420*GNU*)
4421 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4422*)
4423 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425 while :
4426 do
4427 cat "conftest.in" "conftest.in" >"conftest.tmp"
4428 mv "conftest.tmp" "conftest.in"
4429 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004430 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4432 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004433 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4435 # Best one so far, save it but keep looking for a better one
4436 ac_cv_path_GREP="$ac_path_GREP"
4437 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004438 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 # 10*(2^10) chars as input seems more than enough
4440 test $ac_count -gt 10 && break
4441 done
4442 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4443esac
4444
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 $ac_path_GREP_found && break 3
4446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004448 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004449IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004450 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004451 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 +00004452 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004453else
4454 ac_cv_path_GREP=$GREP
4455fi
4456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4459$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460 GREP="$ac_cv_path_GREP"
4461
4462
Matthias Kloseb9621712010-04-24 17:59:49 +00004463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4464$as_echo_n "checking for egrep... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004465if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004466 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467else
4468 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4469 then ac_cv_path_EGREP="$GREP -E"
4470 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004473 # Loop through the user's path and test for each of PROGNAME-LIST
4474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004475for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4476do
4477 IFS=$as_save_IFS
4478 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004479 for ac_prog in egrep; do
4480 for ac_exec_ext in '' $ac_executable_extensions; do
4481 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4482 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4483# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004484 # Check for GNU $ac_path_EGREP
4485case `"$ac_path_EGREP" --version 2>&1` in
4486*GNU*)
4487 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4488*)
4489 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004490 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 while :
4492 do
4493 cat "conftest.in" "conftest.in" >"conftest.tmp"
4494 mv "conftest.tmp" "conftest.in"
4495 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004497 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4498 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004500 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4501 # Best one so far, save it but keep looking for a better one
4502 ac_cv_path_EGREP="$ac_path_EGREP"
4503 ac_path_EGREP_max=$ac_count
4504 fi
4505 # 10*(2^10) chars as input seems more than enough
4506 test $ac_count -gt 10 && break
4507 done
4508 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4509esac
4510
Matthias Kloseb9621712010-04-24 17:59:49 +00004511 $ac_path_EGREP_found && break 3
4512 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004513 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004514 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004515IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004517 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 +00004518 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004519else
4520 ac_cv_path_EGREP=$EGREP
4521fi
4522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004523 fi
4524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4526$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004527 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004528
4529
Matthias Kloseb9621712010-04-24 17:59:49 +00004530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4531$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004532if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004533 $as_echo_n "(cached) " >&6
4534else
4535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004536/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004537#include <stdlib.h>
4538#include <stdarg.h>
4539#include <string.h>
4540#include <float.h>
4541
4542int
4543main ()
4544{
4545
4546 ;
4547 return 0;
4548}
4549_ACEOF
4550if ac_fn_c_try_compile "$LINENO"; then :
4551 ac_cv_header_stdc=yes
4552else
4553 ac_cv_header_stdc=no
4554fi
4555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4556
4557if test $ac_cv_header_stdc = yes; then
4558 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4560/* end confdefs.h. */
4561#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004562
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004563_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004567else
Matthias Kloseb9621712010-04-24 17:59:49 +00004568 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004569fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004570rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004571
Matthias Kloseb9621712010-04-24 17:59:49 +00004572fi
4573
4574if test $ac_cv_header_stdc = yes; then
4575 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4577/* end confdefs.h. */
4578#include <stdlib.h>
4579
4580_ACEOF
4581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4582 $EGREP "free" >/dev/null 2>&1; then :
4583
4584else
4585 ac_cv_header_stdc=no
4586fi
4587rm -f conftest*
4588
4589fi
4590
4591if test $ac_cv_header_stdc = yes; then
4592 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4593 if test "$cross_compiling" = yes; then :
4594 :
4595else
4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597/* end confdefs.h. */
4598#include <ctype.h>
4599#include <stdlib.h>
4600#if ((' ' & 0x0FF) == 0x020)
4601# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4602# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4603#else
4604# define ISLOWER(c) \
4605 (('a' <= (c) && (c) <= 'i') \
4606 || ('j' <= (c) && (c) <= 'r') \
4607 || ('s' <= (c) && (c) <= 'z'))
4608# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4609#endif
4610
4611#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4612int
4613main ()
4614{
4615 int i;
4616 for (i = 0; i < 256; i++)
4617 if (XOR (islower (i), ISLOWER (i))
4618 || toupper (i) != TOUPPER (i))
4619 return 2;
4620 return 0;
4621}
4622_ACEOF
4623if ac_fn_c_try_run "$LINENO"; then :
4624
4625else
4626 ac_cv_header_stdc=no
4627fi
4628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4629 conftest.$ac_objext conftest.beam conftest.$ac_ext
4630fi
4631
4632fi
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4635$as_echo "$ac_cv_header_stdc" >&6; }
4636if test $ac_cv_header_stdc = yes; then
4637
4638$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4639
4640fi
4641
4642# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4643for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4644 inttypes.h stdint.h unistd.h
4645do :
4646 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4647ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4648"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004649if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004650 cat >>confdefs.h <<_ACEOF
4651#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4652_ACEOF
4653
4654fi
4655
4656done
4657
4658
4659
4660 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004661if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004662 MINIX=yes
4663else
4664 MINIX=
4665fi
4666
4667
4668 if test "$MINIX" = yes; then
4669
4670$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4671
4672
4673$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4674
4675
4676$as_echo "#define _MINIX 1" >>confdefs.h
4677
4678 fi
4679
4680
4681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4682$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004683if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004684 $as_echo_n "(cached) " >&6
4685else
4686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687/* end confdefs.h. */
4688
4689# define __EXTENSIONS__ 1
4690 $ac_includes_default
4691int
4692main ()
4693{
4694
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699if ac_fn_c_try_compile "$LINENO"; then :
4700 ac_cv_safe_to_define___extensions__=yes
4701else
4702 ac_cv_safe_to_define___extensions__=no
4703fi
4704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705fi
4706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4707$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4708 test $ac_cv_safe_to_define___extensions__ = yes &&
4709 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4710
4711 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4712
4713 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4714
4715 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4716
4717 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4718
4719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004721# Check for unsupported systems
4722case $ac_sys_system/$ac_sys_release in
4723atheos*|Linux*/1*)
4724 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4725 echo See README for details.
4726 exit 1;;
4727esac
4728
4729
Matthias Kloseb9621712010-04-24 17:59:49 +00004730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4731$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004732
4733# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004734if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735 withval=$with_suffix;
4736 case $withval in
4737 no) EXEEXT=;;
4738 yes) EXEEXT=.exe;;
4739 *) EXEEXT=$withval;;
4740 esac
4741fi
4742
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4744$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745
4746# Test whether we're running on a non-case-sensitive system, in which
4747# case we give a warning if no ext is given
4748
Matthias Kloseb9621712010-04-24 17:59:49 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4750$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751if test ! -d CaseSensitiveTestDir; then
4752mkdir CaseSensitiveTestDir
4753fi
4754
4755if test -d casesensitivetestdir
4756then
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4758$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759 BUILDEXEEXT=.exe
4760else
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763 BUILDEXEEXT=$EXEEXT
4764fi
4765rmdir CaseSensitiveTestDir
4766
4767case $MACHDEP in
4768bsdos*)
4769 case $CC in
4770 gcc) CC="$CC -D_HAVE_BSDI";;
4771 esac;;
4772esac
4773
4774case $ac_sys_system in
4775hp*|HP*)
4776 case $CC in
4777 cc|*/cc) CC="$CC -Ae";;
4778 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779esac
4780
4781
4782
Matthias Kloseb9621712010-04-24 17:59:49 +00004783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4784$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004785if test -z "$LIBRARY"
4786then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004787 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4790$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004791
4792# LDLIBRARY is the name of the library to link against (as opposed to the
4793# name of the library into which to insert object files). BLDLIBRARY is also
4794# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4795# is blank as the main program is not linked directly against LDLIBRARY.
4796# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4797# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4798# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4799# DLLLIBRARY is the shared (i.e., DLL) library.
4800#
4801# RUNSHARED is used to run shared python without installed libraries
4802#
4803# INSTSONAME is the name of the shared library that will be use to install
4804# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004805#
4806# LDVERSION is the shared library version number, normally the Python version
4807# with the ABI build flags appended.
4808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809
4810
4811
4812
4813
4814
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004815
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004816LDLIBRARY="$LIBRARY"
4817BLDLIBRARY='$(LDLIBRARY)'
4818INSTSONAME='$(LDLIBRARY)'
4819DLLLIBRARY=''
4820LDLIBRARYDIR=''
4821RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004822LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823
4824# LINKCC is the command that links the python executable -- default is $(CC).
4825# If CXX is set, and if it is needed to link a main function that was
4826# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4827# python might then depend on the C++ runtime
4828# This is altered for AIX in order to build the export list before
4829# linking.
4830
Matthias Kloseb9621712010-04-24 17:59:49 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4832$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833if test -z "$LINKCC"
4834then
4835 LINKCC='$(PURIFY) $(MAINCC)'
4836 case $ac_sys_system in
4837 AIX*)
4838 exp_extra="\"\""
4839 if test $ac_sys_release -ge 5 -o \
4840 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4841 exp_extra="."
4842 fi
4843 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 QNX*)
4845 # qcc must be used because the other compilers do not
4846 # support -N.
4847 LINKCC=qcc;;
4848 esac
4849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4851$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852
4853# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4854# make sure we default having it set to "no": this is used by
4855# distutils.unixccompiler to know if it should add --enable-new-dtags
4856# to linker command lines, and failing to detect GNU ld simply results
4857# in the same bahaviour as before.
4858
Matthias Kloseb9621712010-04-24 17:59:49 +00004859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4860$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861ac_prog=ld
4862if test "$GCC" = yes; then
4863 ac_prog=`$CC -print-prog-name=ld`
4864fi
4865case `"$ac_prog" -V 2>&1 < /dev/null` in
4866 *GNU*)
4867 GNULD=yes;;
4868 *)
4869 GNULD=no;;
4870esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4872$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4875$as_echo_n "checking for inline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02004876if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004877 $as_echo_n "(cached) " >&6
4878else
4879 ac_cv_c_inline=no
4880for ac_kw in inline __inline__ __inline; do
4881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4882/* end confdefs.h. */
4883#ifndef __cplusplus
4884typedef int foo_t;
4885static $ac_kw foo_t static_foo () {return 0; }
4886$ac_kw foo_t foo () {return 0; }
4887#endif
4888
4889_ACEOF
4890if ac_fn_c_try_compile "$LINENO"; then :
4891 ac_cv_c_inline=$ac_kw
4892fi
4893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4894 test "$ac_cv_c_inline" != no && break
4895done
4896
4897fi
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4899$as_echo "$ac_cv_c_inline" >&6; }
4900
4901case $ac_cv_c_inline in
4902 inline | yes) ;;
4903 *)
4904 case $ac_cv_c_inline in
4905 no) ac_val=;;
4906 *) ac_val=$ac_cv_c_inline;;
4907 esac
4908 cat >>confdefs.h <<_ACEOF
4909#ifndef __cplusplus
4910#define inline $ac_val
4911#endif
4912_ACEOF
4913 ;;
4914esac
4915
4916if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004917
4918$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004919
4920
4921fi
4922
4923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4925$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004927if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 enableval=$enable_shared;
4929fi
4930
4931
4932if test -z "$enable_shared"
4933then
4934 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004935 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936 enable_shared="yes";;
4937 *)
4938 enable_shared="no";;
4939 esac
4940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4942$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943
Matthias Kloseb9621712010-04-24 17:59:49 +00004944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4945$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004947if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 enableval=$enable_profiling; ac_save_cc="$CC"
4949 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004950 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ac_enable_profiling="no"
4952else
Matthias Kloseb9621712010-04-24 17:59:49 +00004953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954/* end confdefs.h. */
4955int main() { return 0; }
4956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004957if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 ac_enable_profiling="yes"
4959else
Matthias Kloseb9621712010-04-24 17:59:49 +00004960 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964fi
4965
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 CC="$ac_save_cc"
4967fi
4968
Matthias Kloseb9621712010-04-24 17:59:49 +00004969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4970$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971
4972case "$ac_enable_profiling" in
4973 "yes")
4974 BASECFLAGS="-pg $BASECFLAGS"
4975 LDFLAGS="-pg $LDFLAGS"
4976 ;;
4977esac
4978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4980$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981
4982# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4983# library that we build, but we do not want to link against it (we
4984# will find it with a -framework option). For this reason there is an
4985# extra variable BLDLIBRARY against which Python and the extension
4986# modules are linked, BLDLIBRARY. This is normally the same as
4987# LDLIBRARY, but empty for MacOSX framework builds.
4988if test "$enable_framework"
4989then
4990 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4991 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4992 BLDLIBRARY=''
4993else
4994 BLDLIBRARY='$(LDLIBRARY)'
4995fi
4996
4997# Other platforms follow
4998if test $enable_shared = "yes"; then
4999
Matthias Kloseb9621712010-04-24 17:59:49 +00005000$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005001
5002 case $ac_sys_system in
5003 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005004 LDLIBRARY='libpython$(LDVERSION).dll.a'
5005 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006 ;;
5007 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005008 LDLIBRARY='libpython$(LDVERSION).so'
5009 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5011 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005012 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005013 then
5014 PY3LIBRARY=libpython3.so
5015 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005017 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005018 LDLIBRARY='libpython$(LDVERSION).so'
5019 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005020 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5021 case $ac_sys_system in
5022 FreeBSD*)
5023 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5024 ;;
5025 esac
5026 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005027 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005028 then
5029 PY3LIBRARY=libpython3.so
5030 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 ;;
5032 hp*|HP*)
5033 case `uname -m` in
5034 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005035 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 ;;
5037 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005038 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039 ;;
5040 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5043 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005045 LDLIBRARY='libpython$(LDVERSION).dylib'
5046 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5048 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005049 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005050 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005051 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5052 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053
5054 esac
5055else # shared is disabled
5056 case $ac_sys_system in
5057 CYGWIN*)
5058 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005059 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060 ;;
5061 esac
5062fi
5063
Matthias Kloseb9621712010-04-24 17:59:49 +00005064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5065$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066
5067if test -n "$ac_tool_prefix"; then
5068 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5069set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005072if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074else
5075 if test -n "$RANLIB"; then
5076 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5077else
5078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081 IFS=$as_save_IFS
5082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087 break 2
5088 fi
5089done
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091IFS=$as_save_IFS
5092
5093fi
5094fi
5095RANLIB=$ac_cv_prog_RANLIB
5096if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5098$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099else
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102fi
5103
5104
5105fi
5106if test -z "$ac_cv_prog_RANLIB"; then
5107 ac_ct_RANLIB=$RANLIB
5108 # Extract the first word of "ranlib", so it can be a program name with args.
5109set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5111$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005112if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005114else
5115 if test -n "$ac_ct_RANLIB"; then
5116 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5117else
5118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5119for as_dir in $PATH
5120do
5121 IFS=$as_save_IFS
5122 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5125 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005127 break 2
5128 fi
5129done
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131IFS=$as_save_IFS
5132
5133fi
5134fi
5135ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5136if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5138$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139else
Matthias Kloseb9621712010-04-24 17:59:49 +00005140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142fi
5143
5144 if test "x$ac_ct_RANLIB" = x; then
5145 RANLIB=":"
5146 else
5147 case $cross_compiling:$ac_tool_warned in
5148yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151ac_tool_warned=yes ;;
5152esac
5153 RANLIB=$ac_ct_RANLIB
5154 fi
5155else
5156 RANLIB="$ac_cv_prog_RANLIB"
5157fi
5158
5159
5160for ac_prog in ar aal
5161do
5162 # Extract the first word of "$ac_prog", so it can be a program name with args.
5163set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005166if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168else
5169 if test -n "$AR"; then
5170 ac_cv_prog_AR="$AR" # Let the user override the test.
5171else
5172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175 IFS=$as_save_IFS
5176 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5179 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181 break 2
5182 fi
5183done
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185IFS=$as_save_IFS
5186
5187fi
5188fi
5189AR=$ac_cv_prog_AR
5190if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5192$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005193else
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5195$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196fi
5197
5198
5199 test -n "$AR" && break
5200done
5201test -n "$AR" || AR="ar"
5202
5203
5204# tweak ARFLAGS only if the user didn't set it on the command line
5205
5206if test -z "$ARFLAGS"
5207then
5208 ARFLAGS="rc"
5209fi
5210
5211
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005212DISABLE_ASDLGEN=""
5213# Extract the first word of "python", so it can be a program name with args.
5214set dummy python; ac_word=$2
5215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005217if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005218 $as_echo_n "(cached) " >&6
5219else
5220 if test -n "$HAS_PYTHON"; then
5221 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5222else
5223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224for as_dir in $PATH
5225do
5226 IFS=$as_save_IFS
5227 test -z "$as_dir" && as_dir=.
5228 for ac_exec_ext in '' $ac_executable_extensions; do
5229 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5230 ac_cv_prog_HAS_PYTHON="found"
5231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5232 break 2
5233 fi
5234done
5235 done
5236IFS=$as_save_IFS
5237
5238 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5239fi
5240fi
5241HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5242if test -n "$HAS_PYTHON"; then
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5244$as_echo "$HAS_PYTHON" >&6; }
5245else
5246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
5248fi
5249
5250
5251if test $HAS_HG != found -o $HAS_PYTHON != found
5252then
5253 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5254fi
5255
5256
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005257case $MACHDEP in
5258bsdos*|hp*|HP*)
5259 # install -d does not work on BSDI or HP-UX
5260 if test -z "$INSTALL"
5261 then
5262 INSTALL="${srcdir}/install-sh -c"
5263 fi
5264esac
5265ac_aux_dir=
5266for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005267 if test -f "$ac_dir/install-sh"; then
5268 ac_aux_dir=$ac_dir
5269 ac_install_sh="$ac_aux_dir/install-sh -c"
5270 break
5271 elif test -f "$ac_dir/install.sh"; then
5272 ac_aux_dir=$ac_dir
5273 ac_install_sh="$ac_aux_dir/install.sh -c"
5274 break
5275 elif test -f "$ac_dir/shtool"; then
5276 ac_aux_dir=$ac_dir
5277 ac_install_sh="$ac_aux_dir/shtool install -c"
5278 break
5279 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280done
5281if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005282 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283fi
5284
5285# These three variables are undocumented and unsupported,
5286# and are intended to be withdrawn in a future Autoconf release.
5287# They can cause serious problems if a builder's source tree is in a directory
5288# whose full name contains unusual characters.
5289ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5290ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5291ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5292
5293
5294# Find a good install program. We prefer a C program (faster),
5295# so one script is as good as another. But avoid the broken or
5296# incompatible versions:
5297# SysV /etc/install, /usr/sbin/install
5298# SunOS /usr/etc/install
5299# IRIX /sbin/install
5300# AIX /bin/install
5301# AmigaOS /C/install, which installs bootblocks on floppy discs
5302# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5303# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5304# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5305# OS/2's system install, which has a completely different semantic
5306# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005307# Reject install programs that cannot install multiple files.
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5309$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310if test -z "$INSTALL"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005311if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005312 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313else
5314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317 IFS=$as_save_IFS
5318 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005319 # Account for people who put trailing slashes in PATH elements.
5320case $as_dir/ in #((
5321 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005323 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324 /usr/ucb/* ) ;;
5325 *)
5326 # OSF1 and SCO ODT 3.0 have their own names for install.
5327 # Don't use installbsd from OSF since it installs stuff as root
5328 # by default.
5329 for ac_prog in ginstall scoinst install; do
5330 for ac_exec_ext in '' $ac_executable_extensions; do
5331 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5332 if test $ac_prog = install &&
5333 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5334 # AIX install. It has an incompatible calling convention.
5335 :
5336 elif test $ac_prog = install &&
5337 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5338 # program-specific install script used by HP pwplus--don't use.
5339 :
5340 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005341 rm -rf conftest.one conftest.two conftest.dir
5342 echo one > conftest.one
5343 echo two > conftest.two
5344 mkdir conftest.dir
5345 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5346 test -s conftest.one && test -s conftest.two &&
5347 test -s conftest.dir/conftest.one &&
5348 test -s conftest.dir/conftest.two
5349 then
5350 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5351 break 3
5352 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005353 fi
5354 fi
5355 done
5356 done
5357 ;;
5358esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005359
5360 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361IFS=$as_save_IFS
5362
Matthias Kloseb9621712010-04-24 17:59:49 +00005363rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365fi
5366 if test "${ac_cv_path_install+set}" = set; then
5367 INSTALL=$ac_cv_path_install
5368 else
5369 # As a last resort, use the slow shell script. Don't cache a
5370 # value for INSTALL within a source directory, because that will
5371 # break other packages using the cache if that directory is
5372 # removed, or if the value is a relative name.
5373 INSTALL=$ac_install_sh
5374 fi
5375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5377$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378
5379# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5380# It thinks the first close brace ends the variable substitution.
5381test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5382
5383test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5384
5385test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5386
5387
5388# Not every filesystem supports hard links
5389
5390if test -z "$LN" ; then
5391 case $ac_sys_system in
5392 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 *) LN=ln;;
5394 esac
5395fi
5396
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005397# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005398
5399ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5403$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005406if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407 withval=$with_pydebug;
5408if test "$withval" != no
5409then
5410
Matthias Kloseb9621712010-04-24 17:59:49 +00005411$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5414$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005416 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005417else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5418$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419fi
5420else
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5422$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423fi
5424
5425
5426# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5427# merged with this chunk of code?
5428
5429# Optimizer/debugger flags
5430# ------------------------
5431# (The following bit of code is complicated enough - please keep things
5432# indented properly. Just pretend you're editing Python code. ;-)
5433
5434# There are two parallel sets of case statements below, one that checks to
5435# see if OPT was set and one that does BASECFLAGS setting based upon
5436# compiler and platform. BASECFLAGS tweaks need to be made even if the
5437# user set OPT.
5438
5439# tweak OPT based on compiler and platform, only if the user didn't set
5440# it on the command line
5441
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005442if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443then
5444 case $GCC in
5445 yes)
5446 if test "$CC" != 'g++' ; then
5447 STRICT_PROTO="-Wstrict-prototypes"
5448 fi
5449 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5450 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5451 WRAP="-fwrapv"
5452 fi
5453 case $ac_cv_prog_cc_g in
5454 yes)
5455 if test "$Py_DEBUG" = 'true' ; then
5456 # Optimization messes up debuggers, so turn it off for
5457 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005458 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459 else
5460 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5461 fi
5462 ;;
5463 *)
5464 OPT="-O3 -Wall $STRICT_PROTO"
5465 ;;
5466 esac
5467 case $ac_sys_system in
5468 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5469 ;;
5470 esac
5471 ;;
5472
5473 *)
5474 OPT="-O"
5475 ;;
5476 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477fi
5478
5479
5480
5481# The -arch flags for universal builds on OSX
5482UNIVERSAL_ARCH_FLAGS=
5483
5484
5485# tweak BASECFLAGS based on compiler and platform
5486case $GCC in
5487yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005488 # Python doesn't violate C99 aliasing rules, but older versions of
5489 # GCC produce warnings for legal Python code. Enable
5490 # -fno-strict-aliasing on versions of GCC that support but produce
5491 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5493$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494 ac_save_cc="$CC"
5495 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005496 save_CFLAGS="$CFLAGS"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005497 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005498 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005499else
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005502
Matthias Kloseb159a552010-04-25 21:00:44 +00005503
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005504int
5505main ()
5506{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005507
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005508 ;
5509 return 0;
5510}
Matthias Kloseb159a552010-04-25 21:00:44 +00005511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005513if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005514
5515 CC="$ac_save_cc -fstrict-aliasing"
5516 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005518/* end confdefs.h. */
5519
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005520 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005521int
5522main ()
5523{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005524double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005525 ;
5526 return 0;
5527}
Matthias Kloseb159a552010-04-25 21:00:44 +00005528
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005530if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005531
5532 ac_cv_no_strict_aliasing=no
5533
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534else
Matthias Kloseb159a552010-04-25 21:00:44 +00005535
5536 ac_cv_no_strict_aliasing=yes
5537
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005538fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005540
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005541else
Matthias Kloseb159a552010-04-25 21:00:44 +00005542
5543 ac_cv_no_strict_aliasing=no
5544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005547fi
5548
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005549 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5552$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005553 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554 then
5555 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5556 fi
5557
5558 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5559 # support. Without this, treatment of subnormals doesn't follow
5560 # the standard.
5561 case $ac_sys_machine in
5562 alpha*)
5563 BASECFLAGS="$BASECFLAGS -mieee"
5564 ;;
5565 esac
5566
5567 case $ac_sys_system in
5568 SCO_SV*)
5569 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5570 ;;
5571 # is there any other compiler on Darwin besides gcc?
5572 Darwin*)
5573 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5574 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005575 if test "${CC}" = gcc
5576 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5578$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005579 case "${UNIVERSALSDK}" in
5580 */MacOSX10.4u.sdk)
5581 # Build using 10.4 SDK, force usage of gcc when the
5582 # compiler is gcc, otherwise the user will get very
5583 # confusing error messages when building on OSX 10.6
5584 CC=gcc-4.0
5585 CPP=cpp-4.0
5586 ;;
5587 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5589$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005590 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591
5592
5593 if test "${enable_universalsdk}"; then
5594 UNIVERSAL_ARCH_FLAGS=""
5595 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5596 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5597 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005598 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5600 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005601 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005602 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603
5604 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5605 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005606 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005607 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005609 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5610 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005611 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005612 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005613
5614 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5615 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005616 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005617 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005620 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 +00005621
5622 fi
5623
5624
Ronald Oussoren666028b2010-04-18 19:07:43 +00005625 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5626 if test "${UNIVERSALSDK}" != "/"
5627 then
5628 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5629 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005630 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631 fi
5632 fi
5633
5634 # Calculate the right deployment target for this build.
5635 #
5636 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5637 if test ${cur_target} '>' 10.2; then
5638 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005639 if test ${enable_universalsdk}; then
5640 if test "${UNIVERSAL_ARCHS}" = "all"; then
5641 # Ensure that the default platform for a
5642 # 4-way universal build is OSX 10.5,
5643 # that's the first OS release where
5644 # 4-way builds make sense.
5645 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005646
5647 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5648 cur_target='10.5'
5649
5650 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5651 cur_target='10.5'
5652
5653 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5654 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005655 fi
5656 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005657 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005658 # On Intel macs default to a deployment
5659 # target of 10.4, that's the first OSX
5660 # release with Intel support.
5661 cur_target="10.4"
5662 fi
5663 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664 fi
5665 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5666
5667 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5668 # environment with a value that is the same as what we'll use
5669 # in the Makefile to ensure that we'll get the same compiler
5670 # environment during configure and build time.
5671 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5672 export MACOSX_DEPLOYMENT_TARGET
5673 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5674
5675 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 esac
5677 ;;
5678
5679*)
5680 case $ac_sys_system in
5681 OpenUNIX*|UnixWare*)
5682 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5683 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 SCO_SV*)
5685 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5686 ;;
5687 esac
5688 ;;
5689esac
5690
5691if test "$Py_DEBUG" = 'true'; then
5692 :
5693else
5694 OPT="-DNDEBUG $OPT"
5695fi
5696
5697if test "$ac_arch_flags"
5698then
5699 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5700fi
5701
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702# Check whether GCC supports PyArg_ParseTuple format
5703if test "$GCC" = "yes"
5704then
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5706$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 save_CFLAGS=$CFLAGS
5708 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710/* end confdefs.h. */
5711
5712 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713int
5714main ()
5715{
5716
5717 ;
5718 return 0;
5719}
Matthias Kloseb159a552010-04-25 21:00:44 +00005720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005722if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723
Matthias Kloseb159a552010-04-25 21:00:44 +00005724
Matthias Kloseb9621712010-04-24 17:59:49 +00005725$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
Matthias Kloseb159a552010-04-25 21:00:44 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005728$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730else
Matthias Kloseb159a552010-04-25 21:00:44 +00005731
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005733$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734
5735fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5737 CFLAGS=$save_CFLAGS
5738fi
5739
5740# On some compilers, pthreads are available without further options
5741# (e.g. MacOS X). On some of these systems, the compiler will not
5742# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5743# So we have to see first whether pthreads are available without
5744# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5746$as_echo_n "checking whether pthreads are available without options... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005747if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005748 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749else
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 ac_cv_pthread_is_default=no
5752else
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754/* end confdefs.h. */
5755
5756#include <pthread.h>
5757
5758void* routine(void* p){return NULL;}
5759
5760int main(){
5761 pthread_t p;
5762 if(pthread_create(&p,NULL,routine,NULL)!=0)
5763 return 1;
5764 (void)pthread_detach(p);
5765 return 0;
5766}
5767
5768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005769if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770
5771 ac_cv_pthread_is_default=yes
5772 ac_cv_kthread=no
5773 ac_cv_pthread=no
5774
5775else
Matthias Kloseb9621712010-04-24 17:59:49 +00005776 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780fi
5781
5782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
5784
Matthias Kloseb9621712010-04-24 17:59:49 +00005785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5786$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787
5788
5789if test $ac_cv_pthread_is_default = yes
5790then
5791 ac_cv_kpthread=no
5792else
5793# -Kpthread, if available, provides the right #defines
5794# and linker options to make pthread_create available
5795# Some compilers won't report that they do not support -Kpthread,
5796# so we need to run a program to see whether it really made the
5797# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5799$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005800if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802else
5803 ac_save_cc="$CC"
5804CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005805if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806 ac_cv_kpthread=no
5807else
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809/* end confdefs.h. */
5810
5811#include <pthread.h>
5812
5813void* routine(void* p){return NULL;}
5814
5815int main(){
5816 pthread_t p;
5817 if(pthread_create(&p,NULL,routine,NULL)!=0)
5818 return 1;
5819 (void)pthread_detach(p);
5820 return 0;
5821}
5822
5823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005824if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825 ac_cv_kpthread=yes
5826else
Matthias Kloseb9621712010-04-24 17:59:49 +00005827 ac_cv_kpthread=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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833CC="$ac_save_cc"
5834fi
5835
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5837$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
5839
5840if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5841then
5842# -Kthread, if available, provides the right #defines
5843# and linker options to make pthread_create available
5844# Some compilers won't report that they do not support -Kthread,
5845# so we need to run a program to see whether it really made the
5846# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5848$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005849if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005850 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851else
5852 ac_save_cc="$CC"
5853CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855 ac_cv_kthread=no
5856else
Matthias Kloseb9621712010-04-24 17:59:49 +00005857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858/* end confdefs.h. */
5859
5860#include <pthread.h>
5861
5862void* routine(void* p){return NULL;}
5863
5864int main(){
5865 pthread_t p;
5866 if(pthread_create(&p,NULL,routine,NULL)!=0)
5867 return 1;
5868 (void)pthread_detach(p);
5869 return 0;
5870}
5871
5872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005873if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874 ac_cv_kthread=yes
5875else
Matthias Kloseb9621712010-04-24 17:59:49 +00005876 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
5881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882CC="$ac_save_cc"
5883fi
5884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5886$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887fi
5888
5889if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5890then
5891# -pthread, if available, provides the right #defines
5892# and linker options to make pthread_create available
5893# Some compilers won't report that they do not support -pthread,
5894# so we need to run a program to see whether it really made the
5895# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5897$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005898if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005899 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900else
5901 ac_save_cc="$CC"
5902CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005903if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ac_cv_pthread=no
5905else
Matthias Kloseb9621712010-04-24 17:59:49 +00005906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907/* end confdefs.h. */
5908
5909#include <pthread.h>
5910
5911void* routine(void* p){return NULL;}
5912
5913int main(){
5914 pthread_t p;
5915 if(pthread_create(&p,NULL,routine,NULL)!=0)
5916 return 1;
5917 (void)pthread_detach(p);
5918 return 0;
5919}
5920
5921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005922if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ac_cv_pthread=yes
5924else
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929fi
5930
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931CC="$ac_save_cc"
5932fi
5933
Matthias Kloseb9621712010-04-24 17:59:49 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5935$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936fi
5937
5938# If we have set a CC compiler flag for thread support then
5939# check if it works for CXX, too.
5940ac_cv_cxx_thread=no
5941if test ! -z "$CXX"
5942then
Matthias Kloseb9621712010-04-24 17:59:49 +00005943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5944$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945ac_save_cxx="$CXX"
5946
5947if test "$ac_cv_kpthread" = "yes"
5948then
5949 CXX="$CXX -Kpthread"
5950 ac_cv_cxx_thread=yes
5951elif test "$ac_cv_kthread" = "yes"
5952then
5953 CXX="$CXX -Kthread"
5954 ac_cv_cxx_thread=yes
5955elif test "$ac_cv_pthread" = "yes"
5956then
5957 CXX="$CXX -pthread"
5958 ac_cv_cxx_thread=yes
5959fi
5960
5961if test $ac_cv_cxx_thread = yes
5962then
5963 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5964 $CXX -c conftest.$ac_ext 2>&5
5965 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5966 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5967 then
5968 ac_cv_cxx_thread=yes
5969 else
5970 ac_cv_cxx_thread=no
5971 fi
5972 rm -fr conftest*
5973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5975$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976fi
5977CXX="$ac_save_cxx"
5978
5979
5980# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5982$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02005983if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985else
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987/* end confdefs.h. */
5988#include <stdlib.h>
5989#include <stdarg.h>
5990#include <string.h>
5991#include <float.h>
5992
5993int
5994main ()
5995{
5996
5997 ;
5998 return 0;
5999}
6000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006001if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 ac_cv_header_stdc=yes
6003else
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6007
6008if test $ac_cv_header_stdc = yes; then
6009 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011/* end confdefs.h. */
6012#include <string.h>
6013
6014_ACEOF
6015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 $EGREP "memchr" >/dev/null 2>&1; then :
6017
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018else
6019 ac_cv_header_stdc=no
6020fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006021rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022
6023fi
6024
6025if test $ac_cv_header_stdc = yes; then
6026 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028/* end confdefs.h. */
6029#include <stdlib.h>
6030
6031_ACEOF
6032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 $EGREP "free" >/dev/null 2>&1; then :
6034
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035else
6036 ac_cv_header_stdc=no
6037fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006038rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039
6040fi
6041
6042if test $ac_cv_header_stdc = yes; then
6043 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 :
6046else
Matthias Kloseb9621712010-04-24 17:59:49 +00006047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048/* end confdefs.h. */
6049#include <ctype.h>
6050#include <stdlib.h>
6051#if ((' ' & 0x0FF) == 0x020)
6052# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6053# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6054#else
6055# define ISLOWER(c) \
6056 (('a' <= (c) && (c) <= 'i') \
6057 || ('j' <= (c) && (c) <= 'r') \
6058 || ('s' <= (c) && (c) <= 'z'))
6059# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6060#endif
6061
6062#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6063int
6064main ()
6065{
6066 int i;
6067 for (i = 0; i < 256; i++)
6068 if (XOR (islower (i), ISLOWER (i))
6069 || toupper (i) != TOUPPER (i))
6070 return 2;
6071 return 0;
6072}
6073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006074if ac_fn_c_try_run "$LINENO"; then :
6075
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076else
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6080 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081fi
6082
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083fi
6084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6086$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087if test $ac_cv_header_stdc = yes; then
6088
Matthias Kloseb9621712010-04-24 17:59:49 +00006089$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090
6091fi
6092
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006093for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6094fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006095ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006096sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006097unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006098sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6099sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006100sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6101sys/stat.h sys/termio.h sys/time.h \
6102sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006103libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006104bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006105do :
6106 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6107ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006108if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006109 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006110#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006111_ACEOF
6112
6113fi
6114
Guido van Rossum627b2d71993-12-24 10:39:16 +00006115done
6116
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006118for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006119 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6121$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006122if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006124else
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006126/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006127#include <sys/types.h>
6128#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006129
Martin v. Löwis11437992002-04-12 09:54:03 +00006130int
6131main ()
6132{
6133if ((DIR *) 0)
6134return 0;
6135 ;
6136 return 0;
6137}
6138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006139if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006140 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006141else
Matthias Kloseb9621712010-04-24 17:59:49 +00006142 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006146eval ac_res=\$$as_ac_Header
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6148$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006149if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006150 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006151#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006152_ACEOF
6153
6154ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006155fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006157done
6158# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6159if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6161$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006162if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006163 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006164else
Martin v. Löwis11437992002-04-12 09:54:03 +00006165 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006169/* Override any GCC internal prototype to avoid an error.
6170 Use char because int might match the return type of a GCC
6171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006172#ifdef __cplusplus
6173extern "C"
6174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006175char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006176int
6177main ()
6178{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006179return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006180 ;
6181 return 0;
6182}
6183_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184for ac_lib in '' dir; do
6185 if test -z "$ac_lib"; then
6186 ac_res="none required"
6187 else
6188 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006189 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006194rm -f core conftest.err conftest.$ac_objext \
6195 conftest$ac_exeext
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006196 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006197 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006199done
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006200if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006202else
6203 ac_cv_search_opendir=no
6204fi
6205rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006206LIBS=$ac_func_search_save_LIBS
6207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6209$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006211if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006213
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006215
Michael W. Hudson54241132001-12-07 15:38:26 +00006216else
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6218$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006219if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006221else
6222 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006226/* Override any GCC internal prototype to avoid an error.
6227 Use char because int might match the return type of a GCC
6228 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006229#ifdef __cplusplus
6230extern "C"
6231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006232char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006233int
6234main ()
6235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006236return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006237 ;
6238 return 0;
6239}
6240_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241for ac_lib in '' x; do
6242 if test -z "$ac_lib"; then
6243 ac_res="none required"
6244 else
6245 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006246 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006247 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006248 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006251rm -f core conftest.err conftest.$ac_objext \
6252 conftest$ac_exeext
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006253 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006254 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006256done
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006257if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259else
6260 ac_cv_search_opendir=no
6261fi
6262rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006263LIBS=$ac_func_search_save_LIBS
6264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6266$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006267ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006268if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006269 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006270
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006271fi
6272
6273fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006274
Matthias Kloseb9621712010-04-24 17:59:49 +00006275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6276$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006277if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279else
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006281/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283int
6284main ()
6285{
6286return makedev(0, 0);
6287 ;
6288 return 0;
6289}
6290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006291if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292 ac_cv_header_sys_types_h_makedev=yes
6293else
Matthias Kloseb9621712010-04-24 17:59:49 +00006294 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006296rm -f core conftest.err conftest.$ac_objext \
6297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006298
6299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6301$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302
6303if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006304ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006305if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006306
Matthias Kloseb9621712010-04-24 17:59:49 +00006307$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308
6309fi
6310
6311
6312
6313 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006315if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006316
Matthias Kloseb9621712010-04-24 17:59:49 +00006317$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318
6319fi
6320
6321
6322 fi
6323fi
6324
Michael W. Hudson54241132001-12-07 15:38:26 +00006325
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006326# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6327for ac_header in net/if.h
6328do :
6329 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6330#ifdef STDC_HEADERS
6331# include <stdlib.h>
6332# include <stddef.h>
6333#else
6334# ifdef HAVE_STDLIB_H
6335# include <stdlib.h>
6336# endif
6337#endif
6338#ifdef HAVE_SYS_SOCKET_H
6339# include <sys/socket.h>
6340#endif
6341
6342"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006343if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006344 cat >>confdefs.h <<_ACEOF
6345#define HAVE_NET_IF_H 1
6346_ACEOF
6347
6348fi
6349
6350done
6351
6352
6353
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006355for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006356do :
6357 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006358#ifdef HAVE_CURSES_H
6359#include <curses.h>
6360#endif
6361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006363if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006364 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006365#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006366_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006367
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006368fi
6369
6370done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006371
6372
Martin v. Löwis11017b12006-01-14 18:12:57 +00006373# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006374for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006375do :
6376 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 +00006377#ifdef HAVE_ASM_TYPES_H
6378#include <asm/types.h>
6379#endif
6380#ifdef HAVE_SYS_SOCKET_H
6381#include <sys/socket.h>
6382#endif
6383
Matthias Kloseb9621712010-04-24 17:59:49 +00006384"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006385if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006386 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006387#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006388_ACEOF
6389
6390fi
6391
6392done
6393
6394
Guido van Rossum627b2d71993-12-24 10:39:16 +00006395# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006396was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6398$as_echo_n "checking for clock_t in time.h... " >&6; }
6399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006400/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006401#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006402
6403_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006405 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006406 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006407else
Martin v. Löwis11437992002-04-12 09:54:03 +00006408
6409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006411
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006412
Guido van Rossum627b2d71993-12-24 10:39:16 +00006413fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006414rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006415
Matthias Kloseb9621712010-04-24 17:59:49 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6417$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006418
Matthias Kloseb9621712010-04-24 17:59:49 +00006419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6420$as_echo_n "checking for makedev... " >&6; }
6421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006422/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006423
Jesus Cea740f53a2010-04-28 11:35:30 +00006424#if defined(MAJOR_IN_MKDEV)
6425#include <sys/mkdev.h>
6426#elif defined(MAJOR_IN_SYSMACROS)
6427#include <sys/sysmacros.h>
6428#else
6429#include <sys/types.h>
6430#endif
6431
Neal Norwitz11690112002-07-30 01:08:28 +00006432int
6433main ()
6434{
Jesus Cea740f53a2010-04-28 11:35:30 +00006435
6436 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006437 ;
6438 return 0;
6439}
Matthias Kloseb159a552010-04-25 21:00:44 +00006440
Neal Norwitz11690112002-07-30 01:08:28 +00006441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006442if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006443 ac_cv_has_makedev=yes
6444else
Matthias Kloseb9621712010-04-24 17:59:49 +00006445 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006447rm -f core conftest.err conftest.$ac_objext \
6448 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6450$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006451if test "$ac_cv_has_makedev" = "yes"; then
6452
Matthias Kloseb9621712010-04-24 17:59:49 +00006453$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006454
6455fi
6456
Martin v. Löwis399a6892002-10-04 10:22:02 +00006457# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6458# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6459# defined, but the compiler does not support pragma redefine_extname,
6460# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6461# structures (such as rlimit64) without declaring them. As a
6462# work-around, disable LFS on such configurations
6463
6464use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6466$as_echo_n "checking Solaris LFS bug... " >&6; }
6467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006468/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006469
6470#define _LARGEFILE_SOURCE 1
6471#define _FILE_OFFSET_BITS 64
6472#include <sys/resource.h>
6473
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474int
6475main ()
6476{
6477struct rlimit foo;
6478 ;
6479 return 0;
6480}
6481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006482if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006483 sol_lfs_bug=no
6484else
Matthias Kloseb9621712010-04-24 17:59:49 +00006485 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6489$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006490if test "$sol_lfs_bug" = "yes"; then
6491 use_lfs=no
6492fi
6493
6494if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006495# Two defines needed to enable largefile support on various platforms
6496# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006497case $ac_sys_system/$ac_sys_release in
6498AIX*)
6499
6500$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6501
6502 ;;
6503esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006506
6507
Matthias Kloseb9621712010-04-24 17:59:49 +00006508$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006509
Martin v. Löwis399a6892002-10-04 10:22:02 +00006510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006511
Guido van Rossum84e7b241996-08-19 21:59:00 +00006512# Add some code to confdefs.h so that the test for off_t works on SCO
6513cat >> confdefs.h <<\EOF
6514#if defined(SCO_DS)
6515#undef _OFF_T
6516#endif
6517EOF
6518
Guido van Rossumef2255b2000-03-10 22:30:29 +00006519# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006520ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006521if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006522
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006523else
Martin v. Löwis11437992002-04-12 09:54:03 +00006524
6525cat >>confdefs.h <<_ACEOF
6526#define mode_t int
6527_ACEOF
6528
6529fi
6530
Matthias Kloseb9621712010-04-24 17:59:49 +00006531ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006532if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006534else
Martin v. Löwis11437992002-04-12 09:54:03 +00006535
6536cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006537#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006538_ACEOF
6539
6540fi
6541
Matthias Kloseb9621712010-04-24 17:59:49 +00006542ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006543if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006545else
Martin v. Löwis11437992002-04-12 09:54:03 +00006546
6547cat >>confdefs.h <<_ACEOF
6548#define pid_t int
6549_ACEOF
6550
6551fi
6552
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006553
Martin v. Löwis11437992002-04-12 09:54:03 +00006554cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006555#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006557
Matthias Kloseb9621712010-04-24 17:59:49 +00006558ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006559if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006560
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006561else
Martin v. Löwis11437992002-04-12 09:54:03 +00006562
6563cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006565_ACEOF
6566
6567fi
6568
Matthias Kloseb9621712010-04-24 17:59:49 +00006569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6570$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006571if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006573else
Matthias Kloseb9621712010-04-24 17:59:49 +00006574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006575/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006576#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006577
6578_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006580 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006581 ac_cv_type_uid_t=yes
6582else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006583 ac_cv_type_uid_t=no
6584fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006585rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006586
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6589$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006590if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006591
Matthias Kloseb9621712010-04-24 17:59:49 +00006592$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006593
6594
Matthias Kloseb9621712010-04-24 17:59:49 +00006595$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006596
6597fi
6598
Matthias Kloseb9621712010-04-24 17:59:49 +00006599ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6600case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006601 no|yes) ;; #(
6602 *)
6603
Matthias Kloseb9621712010-04-24 17:59:49 +00006604$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006605
6606
6607cat >>confdefs.h <<_ACEOF
6608#define uint32_t $ac_cv_c_uint32_t
6609_ACEOF
6610;;
6611 esac
6612
Matthias Kloseb9621712010-04-24 17:59:49 +00006613ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6614case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006615 no|yes) ;; #(
6616 *)
6617
Matthias Kloseb9621712010-04-24 17:59:49 +00006618$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006619
6620
6621cat >>confdefs.h <<_ACEOF
6622#define uint64_t $ac_cv_c_uint64_t
6623_ACEOF
6624;;
6625 esac
6626
Matthias Kloseb9621712010-04-24 17:59:49 +00006627ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6628case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006629 no|yes) ;; #(
6630 *)
6631
6632cat >>confdefs.h <<_ACEOF
6633#define int32_t $ac_cv_c_int32_t
6634_ACEOF
6635;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006636esac
6637
Matthias Kloseb9621712010-04-24 17:59:49 +00006638ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6639case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006640 no|yes) ;; #(
6641 *)
6642
6643cat >>confdefs.h <<_ACEOF
6644#define int64_t $ac_cv_c_int64_t
6645_ACEOF
6646;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006647esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006648
Matthias Kloseb9621712010-04-24 17:59:49 +00006649ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006650if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006651
Matthias Kloseb9621712010-04-24 17:59:49 +00006652$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006653
6654fi
6655
Jack Jansendd19cf82001-12-06 22:36:17 +00006656
Michael W. Hudson54241132001-12-07 15:38:26 +00006657# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006658# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006659# The cast to long int works around a bug in the HP C Compiler
6660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6662# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6664$as_echo_n "checking size of int... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006665if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006666 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006667else
Matthias Kloseb9621712010-04-24 17:59:49 +00006668 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 +00006669
Martin v. Löwis11437992002-04-12 09:54:03 +00006670else
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 if test "$ac_cv_type_int" = yes; then
6672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006674as_fn_error 77 "cannot compute sizeof (int)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006675See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006676 else
6677 ac_cv_sizeof_int=0
6678 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006680
Martin v. Löwis11437992002-04-12 09:54:03 +00006681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6683$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684
6685
6686
Martin v. Löwis11437992002-04-12 09:54:03 +00006687cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006688#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006689_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006690
6691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006692# The cast to long int works around a bug in the HP C Compiler
6693# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6694# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6695# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6697$as_echo_n "checking size of long... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006698if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006699 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006700else
Matthias Kloseb9621712010-04-24 17:59:49 +00006701 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 +00006702
Martin v. Löwis11437992002-04-12 09:54:03 +00006703else
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 if test "$ac_cv_type_long" = yes; then
6705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006707as_fn_error 77 "cannot compute sizeof (long)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006708See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709 else
6710 ac_cv_sizeof_long=0
6711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006713
Martin v. Löwis11437992002-04-12 09:54:03 +00006714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6716$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717
6718
6719
Martin v. Löwis11437992002-04-12 09:54:03 +00006720cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006721#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006722_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006723
6724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006725# The cast to long int works around a bug in the HP C Compiler
6726# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6727# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6728# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6730$as_echo_n "checking size of void *... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006731if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006733else
Matthias Kloseb9621712010-04-24 17:59:49 +00006734 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 +00006735
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 if test "$ac_cv_type_void_p" = yes; then
6738 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006740as_fn_error 77 "cannot compute sizeof (void *)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006741See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006742 else
6743 ac_cv_sizeof_void_p=0
6744 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006746
Martin v. Löwis11437992002-04-12 09:54:03 +00006747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6749$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006750
6751
6752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006754#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006755_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006756
6757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006758# The cast to long int works around a bug in the HP C Compiler
6759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6761# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6763$as_echo_n "checking size of short... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006764if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006766else
Matthias Kloseb9621712010-04-24 17:59:49 +00006767 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 +00006768
Martin v. Löwis11437992002-04-12 09:54:03 +00006769else
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 if test "$ac_cv_type_short" = yes; then
6771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006773as_fn_error 77 "cannot compute sizeof (short)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006774See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006775 else
6776 ac_cv_sizeof_short=0
6777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006779
Martin v. Löwis11437992002-04-12 09:54:03 +00006780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6782$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783
6784
6785
Martin v. Löwis11437992002-04-12 09:54:03 +00006786cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006787#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006788_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789
6790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791# The cast to long int works around a bug in the HP C Compiler
6792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6794# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6796$as_echo_n "checking size of float... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006797if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006799else
Matthias Kloseb9621712010-04-24 17:59:49 +00006800 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 +00006801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 if test "$ac_cv_type_float" = yes; then
6804 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006806as_fn_error 77 "cannot compute sizeof (float)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006807See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006808 else
6809 ac_cv_sizeof_float=0
6810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006812
Martin v. Löwis11437992002-04-12 09:54:03 +00006813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6815$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816
6817
6818
Martin v. Löwis11437992002-04-12 09:54:03 +00006819cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006820#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006821_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822
6823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824# The cast to long int works around a bug in the HP C Compiler
6825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6827# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6829$as_echo_n "checking size of double... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006830if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 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 +00006834
Martin v. Löwis11437992002-04-12 09:54:03 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 if test "$ac_cv_type_double" = yes; then
6837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006839as_fn_error 77 "cannot compute sizeof (double)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006840See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841 else
6842 ac_cv_sizeof_double=0
6843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6848$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849
6850
6851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006853#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006854_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006855
6856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857# The cast to long int works around a bug in the HP C Compiler
6858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6862$as_echo_n "checking size of fpos_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006863if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 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 +00006867
Martin v. Löwis11437992002-04-12 09:54:03 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 if test "$ac_cv_type_fpos_t" = yes; then
6870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006872as_fn_error 77 "cannot compute sizeof (fpos_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006873See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874 else
6875 ac_cv_sizeof_fpos_t=0
6876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6881$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882
6883
6884
Martin v. Löwis11437992002-04-12 09:54:03 +00006885cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006886#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006887_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006888
Michael W. Hudson54241132001-12-07 15:38:26 +00006889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006890# The cast to long int works around a bug in the HP C Compiler
6891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6893# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6895$as_echo_n "checking size of size_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006896if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006897 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006898else
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 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 +00006900
Martin v. Löwis18e16552006-02-15 17:27:45 +00006901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 if test "$ac_cv_type_size_t" = yes; then
6903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006905as_fn_error 77 "cannot compute sizeof (size_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006906See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907 else
6908 ac_cv_sizeof_size_t=0
6909 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006911
Martin v. Löwis18e16552006-02-15 17:27:45 +00006912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6914$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006915
6916
6917
Martin v. Löwis18e16552006-02-15 17:27:45 +00006918cat >>confdefs.h <<_ACEOF
6919#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6920_ACEOF
6921
6922
Christian Heimes400adb02008-02-01 08:12:03 +00006923# The cast to long int works around a bug in the HP C Compiler
6924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6926# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6928$as_echo_n "checking size of pid_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006929if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006931else
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 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 +00006933
Christian Heimes400adb02008-02-01 08:12:03 +00006934else
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 if test "$ac_cv_type_pid_t" = yes; then
6936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006938as_fn_error 77 "cannot compute sizeof (pid_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006939See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006940 else
6941 ac_cv_sizeof_pid_t=0
6942 fi
6943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006944
Christian Heimes400adb02008-02-01 08:12:03 +00006945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6947$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006948
6949
6950
6951cat >>confdefs.h <<_ACEOF
6952#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6953_ACEOF
6954
6955
Michael W. Hudson54241132001-12-07 15:38:26 +00006956
Matthias Kloseb9621712010-04-24 17:59:49 +00006957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6958$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006959have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006961/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963int
6964main ()
6965{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006966long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006967 ;
6968 return 0;
6969}
6970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006972
6973
Matthias Kloseb9621712010-04-24 17:59:49 +00006974$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006975
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006976 have_long_long=yes
6977
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6981$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006982if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006983# The cast to long int works around a bug in the HP C Compiler
6984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6988$as_echo_n "checking size of long long... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006989if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006991else
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 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 +00006993
Martin v. Löwis11437992002-04-12 09:54:03 +00006994else
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 if test "$ac_cv_type_long_long" = yes; then
6996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006998as_fn_error 77 "cannot compute sizeof (long long)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02006999See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000 else
7001 ac_cv_sizeof_long_long=0
7002 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7007$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007008
7009
7010
Martin v. Löwis11437992002-04-12 09:54:03 +00007011cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007012#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007013_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007014
Michael W. Hudson54241132001-12-07 15:38:26 +00007015
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007016fi
7017
Matthias Kloseb9621712010-04-24 17:59:49 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7019$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007020have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007022/* end confdefs.h. */
7023
7024int
7025main ()
7026{
7027long double x; x = (long double)0;
7028 ;
7029 return 0;
7030}
7031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007032if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007033
7034
Matthias Kloseb9621712010-04-24 17:59:49 +00007035$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007036
7037 have_long_double=yes
7038
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007039fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7042$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007043if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007044# The cast to long int works around a bug in the HP C Compiler
7045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7047# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7049$as_echo_n "checking size of long double... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007050if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007052else
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 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 +00007054
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007055else
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 if test "$ac_cv_type_long_double" = yes; then
7057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007059as_fn_error 77 "cannot compute sizeof (long double)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007060See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007061 else
7062 ac_cv_sizeof_long_double=0
7063 fi
7064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007065
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7068$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007069
7070
7071
7072cat >>confdefs.h <<_ACEOF
7073#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7074_ACEOF
7075
7076
7077fi
7078
7079
Matthias Kloseb9621712010-04-24 17:59:49 +00007080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7081$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007082have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007084/* end confdefs.h. */
7085
7086int
7087main ()
7088{
7089_Bool x; x = (_Bool)0;
7090 ;
7091 return 0;
7092}
7093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007094if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007095
7096
Matthias Kloseb9621712010-04-24 17:59:49 +00007097$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007098
7099 have_c99_bool=yes
7100
Thomas Woutersb2137042007-02-01 18:02:27 +00007101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7104$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007105if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007106# The cast to long int works around a bug in the HP C Compiler
7107# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7108# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7109# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7111$as_echo_n "checking size of _Bool... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007112if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007114else
Matthias Kloseb9621712010-04-24 17:59:49 +00007115 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 +00007116
Thomas Woutersb2137042007-02-01 18:02:27 +00007117else
Matthias Kloseb9621712010-04-24 17:59:49 +00007118 if test "$ac_cv_type__Bool" = yes; then
7119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007121as_fn_error 77 "cannot compute sizeof (_Bool)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007122See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123 else
7124 ac_cv_sizeof__Bool=0
7125 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127
Thomas Woutersb2137042007-02-01 18:02:27 +00007128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7130$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007131
7132
7133
Thomas Woutersb2137042007-02-01 18:02:27 +00007134cat >>confdefs.h <<_ACEOF
7135#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7136_ACEOF
7137
7138
7139fi
7140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007142 #include <stdint.h>
7143 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007144 #ifdef HAVE_INTTYPES_H
7145 #include <inttypes.h>
7146 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007147"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007148if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007149
7150cat >>confdefs.h <<_ACEOF
7151#define HAVE_UINTPTR_T 1
7152_ACEOF
7153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007154# The cast to long int works around a bug in the HP C Compiler
7155# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7156# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7157# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7159$as_echo_n "checking size of uintptr_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007160if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007162else
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 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 +00007164
Martin v. Löwis11437992002-04-12 09:54:03 +00007165else
Matthias Kloseb9621712010-04-24 17:59:49 +00007166 if test "$ac_cv_type_uintptr_t" = yes; then
7167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007169as_fn_error 77 "cannot compute sizeof (uintptr_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007170See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007171 else
7172 ac_cv_sizeof_uintptr_t=0
7173 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007175
Martin v. Löwis11437992002-04-12 09:54:03 +00007176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7178$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007179
7180
7181
Martin v. Löwis11437992002-04-12 09:54:03 +00007182cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007183#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007184_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007185
Michael W. Hudson54241132001-12-07 15:38:26 +00007186
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007187fi
7188
Thomas Wouters89f507f2006-12-13 04:49:30 +00007189
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007190# The cast to long int works around a bug in the HP C Compiler
7191# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7192# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7193# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7195$as_echo_n "checking size of off_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007196if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007197 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007198else
Matthias Kloseb9621712010-04-24 17:59:49 +00007199 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007200#ifdef HAVE_SYS_TYPES_H
7201#include <sys/types.h>
7202#endif
7203
Matthias Kloseb9621712010-04-24 17:59:49 +00007204"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007205
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007206else
Matthias Kloseb9621712010-04-24 17:59:49 +00007207 if test "$ac_cv_type_off_t" = yes; then
7208 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7209$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007210as_fn_error 77 "cannot compute sizeof (off_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007211See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212 else
7213 ac_cv_sizeof_off_t=0
7214 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007216
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7219$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007221
7222
Martin v. Löwis11437992002-04-12 09:54:03 +00007223cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007224#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007225_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007226
Michael W. Hudson54241132001-12-07 15:38:26 +00007227
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228
Matthias Kloseb9621712010-04-24 17:59:49 +00007229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7230$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007231if test "$have_long_long" = yes
7232then
7233if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007234 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007235
Matthias Kloseb9621712010-04-24 17:59:49 +00007236$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7239$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007240else
Matthias Kloseb9621712010-04-24 17:59:49 +00007241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007243fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007244else
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7246$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007247fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249# The cast to long int works around a bug in the HP C Compiler
7250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7252# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7254$as_echo_n "checking size of time_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007255if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007257else
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259#ifdef HAVE_SYS_TYPES_H
7260#include <sys/types.h>
7261#endif
7262#ifdef HAVE_TIME_H
7263#include <time.h>
7264#endif
7265
Matthias Kloseb9621712010-04-24 17:59:49 +00007266"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007268else
Matthias Kloseb9621712010-04-24 17:59:49 +00007269 if test "$ac_cv_type_time_t" = yes; then
7270 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007272as_fn_error 77 "cannot compute sizeof (time_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007273See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274 else
7275 ac_cv_sizeof_time_t=0
7276 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007278
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7281$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007282
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007283
7284
Martin v. Löwis11437992002-04-12 09:54:03 +00007285cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007286#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007287_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007288
Michael W. Hudson54241132001-12-07 15:38:26 +00007289
7290
Trent Mick635f6fb2000-08-23 21:33:05 +00007291# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007292ac_save_cc="$CC"
7293if test "$ac_cv_kpthread" = "yes"
7294then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007295elif test "$ac_cv_kthread" = "yes"
7296then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007297elif test "$ac_cv_pthread" = "yes"
7298then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007299fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007300
Matthias Kloseb9621712010-04-24 17:59:49 +00007301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7302$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007303have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007305/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007306
7307 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007308int
7309main ()
7310{
Guido van Rossum12580492000-09-24 16:47:19 +00007311pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007312 ;
7313 return 0;
7314}
Matthias Kloseb159a552010-04-25 21:00:44 +00007315
Martin v. Löwis11437992002-04-12 09:54:03 +00007316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007317if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007318 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7322$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007323if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7327# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7329$as_echo_n "checking size of pthread_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007330if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007332else
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007334#ifdef HAVE_PTHREAD_H
7335#include <pthread.h>
7336#endif
7337
Matthias Kloseb9621712010-04-24 17:59:49 +00007338"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007340else
Matthias Kloseb9621712010-04-24 17:59:49 +00007341 if test "$ac_cv_type_pthread_t" = yes; then
7342 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007344as_fn_error 77 "cannot compute sizeof (pthread_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007345See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007346 else
7347 ac_cv_sizeof_pthread_t=0
7348 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007350
Trent Mick635f6fb2000-08-23 21:33:05 +00007351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7353$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007355
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007358#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007359_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007361
Trent Mick635f6fb2000-08-23 21:33:05 +00007362fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007363CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007364
Michael W. Hudson54241132001-12-07 15:38:26 +00007365
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007366case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007367 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007368 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7369 ;;
7370 Darwin/*)
7371 OTHER_LIBTOOL_OPT=""
7372 ;;
7373esac
7374
7375
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007376ARCH_RUN_32BIT=""
7377
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007378case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007379 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007380 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7381 if test "${enable_universalsdk}"; then
7382 :
7383 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007384 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007385 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007386 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007387 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007388 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007389 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007390 if test ${gcc_version} '<' 4.0
7391 then
7392 LIBTOOL_CRUFT="-lcc_dynamic"
7393 else
7394 LIBTOOL_CRUFT=""
7395 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007397 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007398else
Matthias Kloseb9621712010-04-24 17:59:49 +00007399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007400/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007401
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007402 #include <unistd.h>
7403 int main(int argc, char*argv[])
7404 {
7405 if (sizeof(long) == 4) {
7406 return 0;
7407 } else {
7408 return 1;
7409 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007410 }
7411
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007413if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007414 ac_osx_32bit=yes
7415else
Matthias Kloseb9621712010-04-24 17:59:49 +00007416 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007420fi
7421
7422
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007423 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007424 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007425 i386)
7426 MACOSX_DEFAULT_ARCH="i386"
7427 ;;
7428 ppc)
7429 MACOSX_DEFAULT_ARCH="ppc"
7430 ;;
7431 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007432 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007433 ;;
7434 esac
7435 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007436 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007437 i386)
7438 MACOSX_DEFAULT_ARCH="x86_64"
7439 ;;
7440 ppc)
7441 MACOSX_DEFAULT_ARCH="ppc64"
7442 ;;
7443 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007444 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007445 ;;
7446 esac
7447
7448 #ARCH_RUN_32BIT="true"
7449 fi
7450
7451 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007453 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007454esac
7455
Matthias Kloseb9621712010-04-24 17:59:49 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7457$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007458if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007459then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007460 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007461 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007462 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7467$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007468 if test $enable_shared = "yes"
7469 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007470 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007471 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007475fi
7476
Matthias Kloseb9621712010-04-24 17:59:49 +00007477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7478$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007479case $ac_sys_system/$ac_sys_release in
7480 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007481
Matthias Kloseb9621712010-04-24 17:59:49 +00007482$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7485$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007486 ;;
7487 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007490 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007491esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007492
Guido van Rossum0a516c91994-09-12 10:58:40 +00007493# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007494
Michael W. Hudson54241132001-12-07 15:38:26 +00007495
7496
7497
7498
Benjamin Peterson99f03762010-04-11 22:15:28 +00007499
Thomas Wouters477c8d52006-05-27 19:21:47 +00007500
Georg Brandlb1441c72009-01-03 22:33:39 +00007501
Thomas Wouters477c8d52006-05-27 19:21:47 +00007502cat >>confdefs.h <<_ACEOF
7503#define SHLIB_EXT "$SO"
7504_ACEOF
7505
Guido van Rossum0a516c91994-09-12 10:58:40 +00007506# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007507# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007508# (Shared libraries in this instance are shared modules to be loaded into
7509# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7511$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007512if test -z "$LDSHARED"
7513then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007514 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007515 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007516 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007517 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007518 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007519 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007520 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007521 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007522 if test "$GCC" = "yes" ; then
7523 LDSHARED='$(CC) -shared'
7524 LDCXXSHARED='$(CXX) -shared'
7525 else
7526 LDSHARED='$(CC) -G'
7527 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007528 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007529 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 if test "$GCC" = "yes" ; then
7531 LDSHARED='$(CC) -shared'
7532 LDCXXSHARED='$(CXX) -shared'
7533 else
7534 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007535 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007536 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007537 LDSHARED='$(CC) -bundle'
7538 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007539 if test "$enable_framework" ; then
7540 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007541 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7542 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007543 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007544 else
7545 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007546 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007548 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007549 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007550 LDSHARED='$(CC) -bundle'
7551 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007552 if test "$enable_framework" ; then
7553 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007554 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7555 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007556 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007557 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007558 # No framework, use the Python app as bundle-loader
7559 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007560 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007562 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007563 Darwin/*)
7564 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7565 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007566
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007567 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007568 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007569 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007570 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007571 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007572 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7573 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007574 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007575 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007576 LDSHARED='$(CC) -bundle'
7577 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007578 if test "$enable_framework" ; then
7579 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007580 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7581 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007582 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007583 else
7584 # No framework, use the Python app as bundle-loader
7585 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7586 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007587 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007588 fi
7589 fi
7590 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 Linux*|GNU*|QNX*)
7592 LDSHARED='$(CC) -shared'
7593 LDCXXSHARED='$(CXX) -shared';;
7594 BSD/OS*/4*)
7595 LDSHARED="gcc -shared"
7596 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007597 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007598 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007599 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007600 LDSHARED='$(CC) -shared'
7601 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007602 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007603 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007604 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007605 OpenBSD*)
7606 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7607 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007608 LDSHARED='$(CC) -shared $(CCSHARED)'
7609 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007610 else
7611 case `uname -r` in
7612 [01].* | 2.[0-7] | 2.[0-7].*)
7613 LDSHARED="ld -Bshareable ${LDFLAGS}"
7614 ;;
7615 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007616 LDSHARED='$(CC) -shared $(CCSHARED)'
7617 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007618 ;;
7619 esac
7620 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007621 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007622 LDSHARED='$(CC) -shared'
7623 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007624 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007625 if test "$GCC" = "yes" ; then
7626 LDSHARED='$(CC) -shared'
7627 LDCXXSHARED='$(CXX) -shared'
7628 else
7629 LDSHARED='$(CC) -G'
7630 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007631 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007632 SCO_SV*)
7633 LDSHARED='$(CC) -Wl,-G,-Bexport'
7634 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7635 CYGWIN*)
7636 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7637 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007638 *) LDSHARED="ld";;
7639 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7642$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007643LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007644BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007645# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007646# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7648$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007649if test -z "$CCSHARED"
7650then
Guido van Rossum07397971997-04-29 21:49:50 +00007651 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007652 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007653 then CCSHARED="-fPIC";
7654 elif test `uname -p` = sparc;
7655 then CCSHARED="-xcode=pic32";
7656 else CCSHARED="-Kpic";
7657 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007658 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007659 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007660 else CCSHARED="+z";
7661 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007662 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007663 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007664 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007665 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007666 if test "$GCC" = "yes"
7667 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007668 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007669 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007670 SCO_SV*)
7671 if test "$GCC" = "yes"
7672 then CCSHARED="-fPIC"
7673 else CCSHARED="-Kpic -belf"
7674 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007675 IRIX*/6*) case $CC in
7676 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007677 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007678 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7682$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007683# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007684# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7686$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007687if test -z "$LINKFORSHARED"
7688then
Guido van Rossum07397971997-04-29 21:49:50 +00007689 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007690 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007691 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007692 LINKFORSHARED="-Wl,-E -Wl,+s";;
7693# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007694 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007695 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007696 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007698 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007699 if test "$enable_framework"
7700 then
Jack Jansenda49e192005-01-07 13:08:22 +00007701 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007702 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007703 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007704 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007705 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007706 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007707 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007708 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7709 then
7710 LINKFORSHARED="-Wl,--export-dynamic"
7711 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007712 SunOS/5*) case $CC in
7713 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007714 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007715 then
7716 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007717 fi;;
7718 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007719 CYGWIN*)
7720 if test $enable_shared = "no"
7721 then
7722 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7723 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007724 QNX*)
7725 # -Wl,-E causes the symbols to be added to the dynamic
7726 # symbol table so that they can be found when a module
7727 # is loaded. -N 2048K causes the stack size to be set
7728 # to 2048 kilobytes so that the stack doesn't overflow
7729 # when running test_compile.py.
7730 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007731 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7734$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007735
Michael W. Hudson54241132001-12-07 15:38:26 +00007736
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007737
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7739$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007740if test ! "$LIBRARY" = "$LDLIBRARY"
7741then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007742 case $ac_sys_system in
7743 CYGWIN*)
7744 # Cygwin needs CCSHARED when building extension DLLs
7745 # but not when building the interpreter DLL.
7746 CFLAGSFORSHARED='';;
7747 *)
7748 CFLAGSFORSHARED='$(CCSHARED)'
7749 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7752$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007753
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007754# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7755# library (with --enable-shared).
7756# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007757# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7758# if it is not required, since it creates a dependency of the shared library
7759# to LIBS. This, in turn, means that applications linking the shared libpython
7760# don't need to link LIBS explicitly. The default should be only changed
7761# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007762
Matthias Kloseb9621712010-04-24 17:59:49 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7764$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007765case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007766 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007767 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007768esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7770$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007771
7772
Guido van Rossum627b2d71993-12-24 10:39:16 +00007773# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7775$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007776if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007777 $as_echo_n "(cached) " >&6
7778else
7779 ac_check_lib_save_LIBS=$LIBS
7780LIBS="-lsendfile $LIBS"
7781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7782/* end confdefs.h. */
7783
7784/* Override any GCC internal prototype to avoid an error.
7785 Use char because int might match the return type of a GCC
7786 builtin and then its argument prototype would still apply. */
7787#ifdef __cplusplus
7788extern "C"
7789#endif
7790char sendfile ();
7791int
7792main ()
7793{
7794return sendfile ();
7795 ;
7796 return 0;
7797}
7798_ACEOF
7799if ac_fn_c_try_link "$LINENO"; then :
7800 ac_cv_lib_sendfile_sendfile=yes
7801else
7802 ac_cv_lib_sendfile_sendfile=no
7803fi
7804rm -f core conftest.err conftest.$ac_objext \
7805 conftest$ac_exeext conftest.$ac_ext
7806LIBS=$ac_check_lib_save_LIBS
7807fi
7808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7809$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007810if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007811 cat >>confdefs.h <<_ACEOF
7812#define HAVE_LIBSENDFILE 1
7813_ACEOF
7814
7815 LIBS="-lsendfile $LIBS"
7816
7817fi
7818
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7820$as_echo_n "checking for dlopen in -ldl... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007821if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823else
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007825LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829/* Override any GCC internal prototype to avoid an error.
7830 Use char because int might match the return type of a GCC
7831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007832#ifdef __cplusplus
7833extern "C"
7834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007835char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007836int
7837main ()
7838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ;
7841 return 0;
7842}
7843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007846else
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007849rm -f core conftest.err conftest.$ac_objext \
7850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007851LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7854$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007855if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 cat >>confdefs.h <<_ACEOF
7857#define HAVE_LIBDL 1
7858_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007859
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007860 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007861
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007862fi
7863 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7865$as_echo_n "checking for shl_load in -ldld... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007866if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868else
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007870LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874/* Override any GCC internal prototype to avoid an error.
7875 Use char because int might match the return type of a GCC
7876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007877#ifdef __cplusplus
7878extern "C"
7879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007880char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007881int
7882main ()
7883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 ;
7886 return 0;
7887}
7888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894rm -f core conftest.err conftest.$ac_objext \
7895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7899$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007900if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 cat >>confdefs.h <<_ACEOF
7902#define HAVE_LIBDLD 1
7903_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007905 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007906
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007907fi
7908 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007909
Georg Brandlb1441c72009-01-03 22:33:39 +00007910# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007911if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7913$as_echo_n "checking for library containing sem_init... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007914if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007916else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007917 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921/* Override any GCC internal prototype to avoid an error.
7922 Use char because int might match the return type of a GCC
7923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007924#ifdef __cplusplus
7925extern "C"
7926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007927char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ;
7933 return 0;
7934}
7935_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936for ac_lib in '' pthread rt posix4; do
7937 if test -z "$ac_lib"; then
7938 ac_res="none required"
7939 else
7940 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007948 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951done
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007952if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954else
7955 ac_cv_search_sem_init=no
7956fi
7957rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007958LIBS=$ac_func_search_save_LIBS
7959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7961$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007963if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007965
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007966fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007967 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007968 # posix4 on Solaris 2.6
7969 # pthread (first!) on Linux
7970fi
7971
Martin v. Löwis19d17342003-06-14 21:03:05 +00007972# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7974$as_echo_n "checking for textdomain in -lintl... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02007975if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007977else
7978 ac_check_lib_save_LIBS=$LIBS
7979LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007981/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983/* Override any GCC internal prototype to avoid an error.
7984 Use char because int might match the return type of a GCC
7985 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007986#ifdef __cplusplus
7987extern "C"
7988#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007990int
7991main ()
7992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007994 ;
7995 return 0;
7996}
7997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007998if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007999 ac_cv_lib_intl_textdomain=yes
8000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008003rm -f core conftest.err conftest.$ac_objext \
8004 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005LIBS=$ac_check_lib_save_LIBS
8006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8008$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008009if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008012
Brett Cannonc6d936e2009-06-07 20:09:53 +00008013 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008014fi
8015
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008016
8017# checks for system dependent C++ extensions support
8018case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8020$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008022/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008023
Georg Brandl59e87bd2011-02-15 19:48:59 +00008024 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008025int
8026main ()
8027{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008028loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ;
8030 return 0;
8031}
Matthias Kloseb159a552010-04-25 21:00:44 +00008032
Martin v. Löwis11437992002-04-12 09:54:03 +00008033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008034if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008035
Matthias Kloseb159a552010-04-25 21:00:44 +00008036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008038
Matthias Kloseb159a552010-04-25 21:00:44 +00008039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008040$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008041
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008042else
Matthias Kloseb159a552010-04-25 21:00:44 +00008043
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008045$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008046
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048rm -f core conftest.err conftest.$ac_objext \
8049 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008050 *) ;;
8051esac
8052
Guido van Rossum70c7f481998-03-26 18:44:10 +00008053# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8055$as_echo_n "checking for t_open in -lnsl... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008056if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008058else
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008060LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064/* Override any GCC internal prototype to avoid an error.
8065 Use char because int might match the return type of a GCC
8066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008067#ifdef __cplusplus
8068extern "C"
8069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008070char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008071int
8072main ()
8073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ;
8076 return 0;
8077}
8078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008081else
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008084rm -f core conftest.err conftest.$ac_objext \
8085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008086LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8089$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008090if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008091 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008092fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008093 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8095$as_echo_n "checking for socket in -lsocket... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008096if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008098else
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008100LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104/* Override any GCC internal prototype to avoid an error.
8105 Use char because int might match the return type of a GCC
8106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107#ifdef __cplusplus
8108extern "C"
8109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008110char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008111int
8112main ()
8113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 ;
8116 return 0;
8117}
8118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008121else
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124rm -f core conftest.err conftest.$ac_objext \
8125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008126LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8129$as_echo "$ac_cv_lib_socket_socket" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008130if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008131 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008132fi
8133 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8136$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008139if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8142$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008143LIBS="$withval $LIBS"
8144
8145else
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8147$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148fi
8149
Guido van Rossum7f43da71994-08-01 12:15:30 +00008150
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008151if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008152 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8153set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008156if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008158else
8159 case $PKG_CONFIG in
8160 [\\/]* | ?:[\\/]*)
8161 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8162 ;;
8163 *)
8164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165for as_dir in $PATH
8166do
8167 IFS=$as_save_IFS
8168 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8171 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008173 break 2
8174 fi
8175done
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008177IFS=$as_save_IFS
8178
8179 ;;
8180esac
8181fi
8182PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8183if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8185$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008186else
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008189fi
8190
8191
8192fi
8193if test -z "$ac_cv_path_PKG_CONFIG"; then
8194 ac_pt_PKG_CONFIG=$PKG_CONFIG
8195 # Extract the first word of "pkg-config", so it can be a program name with args.
8196set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8198$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008199if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008201else
8202 case $ac_pt_PKG_CONFIG in
8203 [\\/]* | ?:[\\/]*)
8204 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8205 ;;
8206 *)
8207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8208for as_dir in $PATH
8209do
8210 IFS=$as_save_IFS
8211 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8214 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008216 break 2
8217 fi
8218done
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008220IFS=$as_save_IFS
8221
8222 ;;
8223esac
8224fi
8225ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8226if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8228$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8231$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008232fi
8233
8234 if test "x$ac_pt_PKG_CONFIG" = x; then
8235 PKG_CONFIG=""
8236 else
8237 case $cross_compiling:$ac_tool_warned in
8238yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008241ac_tool_warned=yes ;;
8242esac
8243 PKG_CONFIG=$ac_pt_PKG_CONFIG
8244 fi
8245else
8246 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8247fi
8248
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008249
8250# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8252$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008253
8254# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008255if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008256 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008257else
8258 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008259fi
8260
8261
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8263$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008264
8265# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8267$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008268
8269# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008270if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008271 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008272else
8273 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008274fi
8275
8276
8277if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008278 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8279else
8280 LIBFFI_INCLUDEDIR=""
8281fi
8282
8283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8285$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008286
Benjamin Peterson076ed002010-10-31 17:11:02 +00008287# Check for support for loadable sqlite extensions
8288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8289$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8290# Check whether --enable-loadable-sqlite-extensions was given.
8291if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8292 enableval=$enable_loadable_sqlite_extensions;
8293else
8294 enable_loadable_sqlite_extensions="no"
8295fi
8296
8297
8298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8299$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8300
Matthias Klose55708cc2009-04-30 08:06:49 +00008301# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8303$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008304
8305# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008306if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008307 withval=$with_dbmliborder;
8308if test x$with_dbmliborder = xyes
8309then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008310as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008311else
8312 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8313 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8314 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008315 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008316 fi
8317 done
8318fi
8319fi
8320
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8322$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008323
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008324# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008325
8326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8328$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008331if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008332 withval=$with_signal_module;
8333fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008334
8335
8336if test -z "$with_signal_module"
8337then with_signal_module="yes"
8338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8340$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008341
8342if test "${with_signal_module}" = "yes"; then
8343 USE_SIGNAL_MODULE=""
8344 SIGNAL_OBJS=""
8345else
8346 USE_SIGNAL_MODULE="#"
8347 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8348fi
8349
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008350# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008351
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008352USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
8356# Templates for things AC_DEFINEd more than once.
8357# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008358
8359
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8362$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366 withval=$with_threads;
8367fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008368
8369
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008370# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008373if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374 withval=$with_thread; with_threads=$with_thread
8375fi
8376
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008377
8378if test -z "$with_threads"
8379then with_threads="yes"
8380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8382$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008383
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008384
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008385if test "$with_threads" = "no"
8386then
8387 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008388elif test "$ac_cv_pthread_is_default" = yes
8389then
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008391
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008392 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008394
8395 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008397elif test "$ac_cv_kpthread" = "yes"
8398then
8399 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008400 if test "$ac_cv_cxx_thread" = "yes"; then
8401 CXX="$CXX -Kpthread"
8402 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008404
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008405 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008406 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008407elif test "$ac_cv_kthread" = "yes"
8408then
8409 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008410 if test "$ac_cv_cxx_thread" = "yes"; then
8411 CXX="$CXX -Kthread"
8412 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008414
8415 posix_threads=yes
8416 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008417elif test "$ac_cv_pthread" = "yes"
8418then
8419 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008420 if test "$ac_cv_cxx_thread" = "yes"; then
8421 CXX="$CXX -pthread"
8422 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008424
8425 posix_threads=yes
8426 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008427else
8428 if test ! -z "$with_threads" -a -d "$with_threads"
8429 then LDFLAGS="$LDFLAGS -L$with_threads"
8430 fi
8431 if test ! -z "$withval" -a -d "$withval"
8432 then LDFLAGS="$LDFLAGS -L$withval"
8433 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008434
8435 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008436 # define _POSIX_THREADS in unistd.h. Some apparently don't
8437 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8439$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008442
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008443#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008444#ifdef _POSIX_THREADS
8445yes
8446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008447
8448_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008451 unistd_defines_pthreads=yes
8452else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008453 unistd_defines_pthreads=no
8454fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008455rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008456
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8458$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008461
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008462 # Just looking for pthread_create in libpthread is not enough:
8463 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8464 # So we really have to include pthread.h, and then link.
8465 _libs=$LIBS
8466 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8468$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008470/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008471#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008472
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008473void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008474int
8475main ()
8476{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008477
8478pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 ;
8480 return 0;
8481}
8482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008483if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008484
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8486$as_echo "yes" >&6; }
8487 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008488
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008489 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008490 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008491else
Martin v. Löwis11437992002-04-12 09:54:03 +00008492
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008493 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008495if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008497
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008498 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008499 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008500else
Guido van Rossumad678af1998-10-02 14:42:15 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8503$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008504if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008506else
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008508LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512/* Override any GCC internal prototype to avoid an error.
8513 Use char because int might match the return type of a GCC
8514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008515#ifdef __cplusplus
8516extern "C"
8517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008518char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008519int
8520main ()
8521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ;
8524 return 0;
8525}
8526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532rm -f core conftest.err conftest.$ac_objext \
8533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008534LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8537$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008538if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008540
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008541 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008542 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008543 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008544else
Greg Steinadf63d62000-07-05 10:38:09 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8547$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008548if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008550else
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008552LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556/* Override any GCC internal prototype to avoid an error.
8557 Use char because int might match the return type of a GCC
8558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559#ifdef __cplusplus
8560extern "C"
8561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008562char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008563int
8564main ()
8565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ;
8568 return 0;
8569}
8570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008573else
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576rm -f core conftest.err conftest.$ac_objext \
8577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008578LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8581$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008582if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008584
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008585 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008586 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008587 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008588else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008589
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8591$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008592if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008594else
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008596LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600/* Override any GCC internal prototype to avoid an error.
8601 Use char because int might match the return type of a GCC
8602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008603#ifdef __cplusplus
8604extern "C"
8605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008606char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008607int
8608main ()
8609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008611 ;
8612 return 0;
8613}
8614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008615if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008616 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008617else
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620rm -f core conftest.err conftest.$ac_objext \
8621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8625$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008626if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008628
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008629 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008630 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008631 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008632else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008633
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8635$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008636if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008638else
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008640LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644/* Override any GCC internal prototype to avoid an error.
8645 Use char because int might match the return type of a GCC
8646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008647#ifdef __cplusplus
8648extern "C"
8649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008650char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008651int
8652main ()
8653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ;
8656 return 0;
8657}
8658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008659if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664rm -f core conftest.err conftest.$ac_objext \
8665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008666LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8669$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008670if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008672
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008673 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008674 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008675 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008676else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008677
Martin v. Löwis130fb172001-07-19 11:00:41 +00008678 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008679fi
8680
Guido van Rossum627b2d71993-12-24 10:39:16 +00008681
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008682fi
8683
Guido van Rossum0be3e491997-05-22 20:33:33 +00008684fi
8685
Guido van Rossum49545951997-12-02 19:28:29 +00008686fi
8687
Guido van Rossumb93a8621998-05-07 13:27:32 +00008688fi
8689
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691rm -f core conftest.err conftest.$ac_objext \
8692 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008693
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8695$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008696if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008698else
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008700LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704/* Override any GCC internal prototype to avoid an error.
8705 Use char because int might match the return type of a GCC
8706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008707#ifdef __cplusplus
8708extern "C"
8709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008710char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008711int
8712main ()
8713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ;
8716 return 0;
8717}
8718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008721else
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008724rm -f core conftest.err conftest.$ac_objext \
8725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8729$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008730if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008732
Martin v. Löwis130fb172001-07-19 11:00:41 +00008733 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008734 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008735 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008736fi
8737
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008738
Neal Norwitza978ab02002-11-02 16:58:05 +00008739 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8741$as_echo_n "checking for thr_create in -lthread... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008742if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008744else
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008746LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750/* Override any GCC internal prototype to avoid an error.
8751 Use char because int might match the return type of a GCC
8752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008753#ifdef __cplusplus
8754extern "C"
8755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008756char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008757int
8758main ()
8759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 ;
8762 return 0;
8763}
8764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008767else
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770rm -f core conftest.err conftest.$ac_objext \
8771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8775$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008776if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008778
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008779 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008780 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008781 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008782fi
8783
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008784 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008785fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008786
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787if test "$posix_threads" = "yes"; then
8788 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008789
Matthias Kloseb9621712010-04-24 17:59:49 +00008790$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791
8792 fi
8793
8794 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8795 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008796 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008797$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008798
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008799 ;;
8800 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008801$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008802
8803 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008804 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008805$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008806
8807 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808 esac
8809
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8811$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008812 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008816 ac_cv_pthread_system_supported=no
8817else
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008819/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820#include <pthread.h>
8821 void *foo(void *parm) {
8822 return NULL;
8823 }
8824 main() {
8825 pthread_attr_t attr;
8826 pthread_t id;
8827 if (pthread_attr_init(&attr)) exit(-1);
8828 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8829 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8830 exit(0);
8831 }
8832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008833if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834 ac_cv_pthread_system_supported=yes
8835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008840fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842
Guido van Rossum627b2d71993-12-24 10:39:16 +00008843fi
8844
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8846$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008847 if test "$ac_cv_pthread_system_supported" = "yes"; then
8848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850
8851 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 for ac_func in pthread_sigmask
8853do :
8854 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02008855if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008856 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008857#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008858_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008859 case $ac_sys_system in
8860 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008861
Matthias Kloseb9621712010-04-24 17:59:49 +00008862$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008863
8864 ;;
8865 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008866fi
8867done
8868
8869fi
8870
8871
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008872# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008873
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8875$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008877if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008879 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8881$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008882 ipv6=no
8883 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8885$as_echo "yes" >&6; }
8886 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008887
8888 ipv6=yes
8889 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008891else
Martin v. Löwis11437992002-04-12 09:54:03 +00008892
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008894
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897 ipv6=no
8898
8899else
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008901/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008902 /* AF_INET6 available check */
8903#include <sys/types.h>
8904#include <sys/socket.h>
8905main()
8906{
8907 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8908 exit(1);
8909 else
8910 exit(0);
8911}
8912
Martin v. Löwis11437992002-04-12 09:54:03 +00008913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008914if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8917$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920else
Matthias Kloseb159a552010-04-25 21:00:44 +00008921
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008924 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929fi
8930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008932if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8934$as_echo_n "checking if RFC2553 API is available... " >&6; }
8935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008936/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008937
8938 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008939#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008940int
8941main ()
8942{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008943struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008944 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 ;
8946 return 0;
8947}
Matthias Kloseb159a552010-04-25 21:00:44 +00008948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008950if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008951
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008953$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008954 ipv6=yes
8955
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008956else
Matthias Kloseb159a552010-04-25 21:00:44 +00008957
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008959$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008960 ipv6=no
8961
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008964fi
8965
8966if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008968
8969fi
8970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971fi
8972
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973
8974ipv6type=unknown
8975ipv6lib=none
8976ipv6trylibc=no
8977
8978if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8980$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008981 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8982 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983 case $i in
8984 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008987
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988#include <netinet/in.h>
8989#ifdef IPV6_INRIA_VERSION
8990yes
8991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008992_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008995 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008997rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998
8999 ;;
9000 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009002/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009003
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004#include <netinet/in.h>
9005#ifdef __KAME__
9006yes
9007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009008_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011 ipv6type=$i;
9012 ipv6lib=inet6
9013 ipv6libdir=/usr/local/v6/lib
9014 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009016rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017
9018 ;;
9019 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009021/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009022
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023#include <features.h>
9024#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9025yes
9026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009027_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009030 ipv6type=$i;
9031 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009033rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034
9035 ;;
9036 linux-inet6)
9037 if test -d /usr/inet6; then
9038 ipv6type=$i
9039 ipv6lib=inet6
9040 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009041 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042 fi
9043 ;;
9044 solaris)
9045 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009046 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047 ipv6type=$i
9048 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009049 fi
9050 fi
9051 ;;
9052 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009054/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009055
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056#include <sys/param.h>
9057#ifdef _TOSHIBA_INET6
9058yes
9059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009060_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063 ipv6type=$i;
9064 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009065 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009067rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068
9069 ;;
9070 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009072/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009073
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074#include </usr/local/v6/include/sys/v6config.h>
9075#ifdef __V6D__
9076yes
9077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009078_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081 ipv6type=$i;
9082 ipv6lib=v6;
9083 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009084 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009086rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087
9088 ;;
9089 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009091/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009092
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093#include <sys/param.h>
9094#ifdef _ZETA_MINAMI_INET6
9095yes
9096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009097_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009100 ipv6type=$i;
9101 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009102 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009103fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009104rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009105
9106 ;;
9107 esac
9108 if test "$ipv6type" != "unknown"; then
9109 break
9110 fi
9111 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9113$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114fi
9115
9116if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9117 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9118 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9119 echo "using lib$ipv6lib"
9120 else
9121 if test $ipv6trylibc = "yes"; then
9122 echo "using libc"
9123 else
9124 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9125 echo "You need to fetch lib$ipv6lib.a from appropriate"
9126 echo 'ipv6 kit and compile beforehand.'
9127 exit 1
9128 fi
9129 fi
9130fi
9131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9133$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009135/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009136
9137 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009138int
9139main ()
9140{
9141FSIORefNum fRef = 0
9142 ;
9143 return 0;
9144}
Matthias Kloseb159a552010-04-25 21:00:44 +00009145
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009147if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009148
Matthias Kloseb159a552010-04-25 21:00:44 +00009149
Matthias Kloseb9621712010-04-24 17:59:49 +00009150$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009151
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9153$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009154
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009155else
Matthias Kloseb159a552010-04-25 21:00:44 +00009156
Matthias Kloseb9621712010-04-24 17:59:49 +00009157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009159
9160fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9162
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009163# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9165$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009168if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169 withval=$with_doc_strings;
9170fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009171
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009172
9173if test -z "$with_doc_strings"
9174then with_doc_strings="yes"
9175fi
9176if test "$with_doc_strings" != "no"
9177then
9178
Matthias Kloseb9621712010-04-24 17:59:49 +00009179$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009180
9181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9183$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009184
Antoine Pitrou042b1282010-08-13 21:15:58 +00009185# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9187$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009190if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009192if test "$withval" != no
9193then
9194
Matthias Kloseb9621712010-04-24 17:59:49 +00009195$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009196
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9198$as_echo "yes" >&6; }
9199else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9200$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009201fi
9202else
Matthias Kloseb9621712010-04-24 17:59:49 +00009203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9204$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205fi
9206
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009207
9208# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9210$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009212# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009213if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009214 withval=$with_pymalloc;
9215fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009216
Neil Schemenauera35c6882001-02-27 04:45:05 +00009217
Neil Schemenauer16c22972002-03-22 15:34:49 +00009218if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009219then
9220 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009221 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009222fi
9223if test "$with_pymalloc" != "no"
9224then
Martin v. Löwis11437992002-04-12 09:54:03 +00009225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009227
9228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9230$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009231
Benjamin Peterson05159c42009-12-03 03:01:27 +00009232# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9234$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009235
9236# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009237if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009238 withval=$with_valgrind;
9239else
9240 with_valgrind=no
9241fi
9242
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9244$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009245if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009247if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009248
Matthias Kloseb9621712010-04-24 17:59:49 +00009249$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009250
9251else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009252 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009253
9254fi
9255
9256
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009257 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009258fi
9259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009260# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009261
Guido van Rossum98935bf2001-09-05 19:13:16 +00009262DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009263
Guido van Rossume97ee181999-12-20 21:27:22 +00009264# the dlopen() function means we might want to use dynload_shlib.o. some
9265# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009266for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009267do :
9268 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009269if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009271#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009273
Guido van Rossume97ee181999-12-20 21:27:22 +00009274fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009275done
Guido van Rossume97ee181999-12-20 21:27:22 +00009276
Michael W. Hudson54241132001-12-07 15:38:26 +00009277
Guido van Rossume97ee181999-12-20 21:27:22 +00009278# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9279# loading of modules.
9280
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9282$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009283if test -z "$DYNLOADFILE"
9284then
9285 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009286 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9287 if test "$ac_cv_func_dlopen" = yes
9288 then DYNLOADFILE="dynload_shlib.o"
9289 else DYNLOADFILE="dynload_aix.o"
9290 fi
9291 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009292 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009293 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9294 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009295 *)
9296 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9297 # out any dynamic loading
9298 if test "$ac_cv_func_dlopen" = yes
9299 then DYNLOADFILE="dynload_shlib.o"
9300 else DYNLOADFILE="dynload_stub.o"
9301 fi
9302 ;;
9303 esac
9304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9306$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009307if test "$DYNLOADFILE" != "dynload_stub.o"
9308then
Martin v. Löwis11437992002-04-12 09:54:03 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009311
9312fi
9313
Neil Schemenauer4e425612001-06-19 15:44:15 +00009314# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9315
Michael W. Hudson54241132001-12-07 15:38:26 +00009316
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9318$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009319if test -z "$MACHDEP_OBJS"
9320then
Jack Jansene578a632001-08-15 01:27:14 +00009321 MACHDEP_OBJS=$extra_machdep_objs
9322else
9323 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9326$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009327
Guido van Rossum627b2d71993-12-24 10:39:16 +00009328# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009329for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009330 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009331 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009332 futimens futimes gai_strerror \
9333 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009334 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009335 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009336 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009337 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009338 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009339 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009340 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009341 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009342 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Benjamin Petersonc5fce4d2011-08-02 18:07:32 -05009343 sched_setaffinity sched_setscheduler sched_setparam sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009344 sigaction sigaltstack siginterrupt sigpending sigrelse \
9345 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009346 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009347 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9348 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009349do :
9350 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9351ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009352if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009354#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009355_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009356
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009357fi
9358done
9359
Michael W. Hudson54241132001-12-07 15:38:26 +00009360
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361# For some functions, having a definition is not sufficient, since
9362# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9364$as_echo_n "checking for chroot... " >&6; }
9365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009366/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009367#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009368int
9369main ()
9370{
9371void *x=chroot
9372 ;
9373 return 0;
9374}
9375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009377
Matthias Kloseb9621712010-04-24 17:59:49 +00009378$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009379
Matthias Kloseb159a552010-04-25 21:00:44 +00009380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009381$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009382else
Matthias Kloseb9621712010-04-24 17:59:49 +00009383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9384$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009385
9386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9389$as_echo_n "checking for link... " >&6; }
9390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009391/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009392#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009393int
9394main ()
9395{
9396void *x=link
9397 ;
9398 return 0;
9399}
9400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009402
Matthias Kloseb9621712010-04-24 17:59:49 +00009403$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404
Matthias Kloseb159a552010-04-25 21:00:44 +00009405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009406$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009407else
Matthias Kloseb9621712010-04-24 17:59:49 +00009408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9409$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009410
9411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9414$as_echo_n "checking for symlink... " >&6; }
9415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009416/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009417#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009418int
9419main ()
9420{
9421void *x=symlink
9422 ;
9423 return 0;
9424}
9425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009427
Matthias Kloseb9621712010-04-24 17:59:49 +00009428$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009429
Matthias Kloseb159a552010-04-25 21:00:44 +00009430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009431$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009432else
Matthias Kloseb9621712010-04-24 17:59:49 +00009433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009435
9436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9439$as_echo_n "checking for fchdir... " >&6; }
9440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009441/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009442#include <unistd.h>
9443int
9444main ()
9445{
9446void *x=fchdir
9447 ;
9448 return 0;
9449}
9450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009452
Matthias Kloseb9621712010-04-24 17:59:49 +00009453$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009454
Matthias Kloseb159a552010-04-25 21:00:44 +00009455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009456$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009457else
Matthias Kloseb9621712010-04-24 17:59:49 +00009458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009460
9461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9464$as_echo_n "checking for fsync... " >&6; }
9465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009466/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009467#include <unistd.h>
9468int
9469main ()
9470{
9471void *x=fsync
9472 ;
9473 return 0;
9474}
9475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009476if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009477
Matthias Kloseb9621712010-04-24 17:59:49 +00009478$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009479
Matthias Kloseb159a552010-04-25 21:00:44 +00009480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009481$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009482else
Matthias Kloseb9621712010-04-24 17:59:49 +00009483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009485
9486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9489$as_echo_n "checking for fdatasync... " >&6; }
9490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009491/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009492#include <unistd.h>
9493int
9494main ()
9495{
9496void *x=fdatasync
9497 ;
9498 return 0;
9499}
9500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009502
Matthias Kloseb9621712010-04-24 17:59:49 +00009503$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009504
Matthias Kloseb159a552010-04-25 21:00:44 +00009505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009506$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009507else
Matthias Kloseb9621712010-04-24 17:59:49 +00009508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9509$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009510
9511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9514$as_echo_n "checking for epoll... " >&6; }
9515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009516/* end confdefs.h. */
9517#include <sys/epoll.h>
9518int
9519main ()
9520{
9521void *x=epoll_create
9522 ;
9523 return 0;
9524}
9525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009526if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009527
Matthias Kloseb9621712010-04-24 17:59:49 +00009528$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009529
Matthias Kloseb159a552010-04-25 21:00:44 +00009530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009531$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009532else
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9534$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009535
9536fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9539$as_echo_n "checking for kqueue... " >&6; }
9540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009541/* end confdefs.h. */
9542
9543#include <sys/types.h>
9544#include <sys/event.h>
9545
9546int
9547main ()
9548{
9549int x=kqueue()
9550 ;
9551 return 0;
9552}
9553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009554if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009555
Matthias Kloseb9621712010-04-24 17:59:49 +00009556$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009557
Matthias Kloseb159a552010-04-25 21:00:44 +00009558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009559$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009560else
Matthias Kloseb9621712010-04-24 17:59:49 +00009561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9562$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009563
9564fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009566# On some systems (eg. FreeBSD 5), we would find a definition of the
9567# functions ctermid_r, setgroups in the library, but no prototype
9568# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9569# address to avoid compiler warnings and potential miscompilations
9570# because of the missing prototypes.
9571
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9573$as_echo_n "checking for ctermid_r... " >&6; }
9574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009575/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009576
Martin v. Löwisd5843682002-11-21 20:41:28 +00009577#include <stdio.h>
9578
Martin v. Löwisd5843682002-11-21 20:41:28 +00009579int
9580main ()
9581{
9582void* p = ctermid_r
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öwisd5843682002-11-21 20:41:28 +00009588
Matthias Kloseb9621712010-04-24 17:59:49 +00009589$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +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; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009593else
Matthias Kloseb9621712010-04-24 17:59:49 +00009594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9595$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009596
9597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9599
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9601$as_echo_n "checking for flock declaration... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009602if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009603 $as_echo_n "(cached) " >&6
9604else
9605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009606/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009607#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009608int
9609main ()
9610{
9611void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009612
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009613 ;
9614 return 0;
9615}
9616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009617if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009618 ac_cv_flock_decl=yes
9619else
9620 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009621
9622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009624
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009625fi
9626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9627$as_echo "$ac_cv_flock_decl" >&6; }
9628if test "x${ac_cv_flock_decl}" = xyes; then
9629 for ac_func in flock
9630do :
9631 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009632if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009633 cat >>confdefs.h <<_ACEOF
9634#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009635_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009636
Antoine Pitroua3000072010-09-07 14:52:42 +00009637else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009639$as_echo_n "checking for flock in -lbsd... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009640if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009641 $as_echo_n "(cached) " >&6
9642else
9643 ac_check_lib_save_LIBS=$LIBS
9644LIBS="-lbsd $LIBS"
9645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9646/* end confdefs.h. */
9647
9648/* Override any GCC internal prototype to avoid an error.
9649 Use char because int might match the return type of a GCC
9650 builtin and then its argument prototype would still apply. */
9651#ifdef __cplusplus
9652extern "C"
9653#endif
9654char flock ();
9655int
9656main ()
9657{
9658return flock ();
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663if ac_fn_c_try_link "$LINENO"; then :
9664 ac_cv_lib_bsd_flock=yes
9665else
9666 ac_cv_lib_bsd_flock=no
9667fi
9668rm -f core conftest.err conftest.$ac_objext \
9669 conftest$ac_exeext conftest.$ac_ext
9670LIBS=$ac_check_lib_save_LIBS
9671fi
9672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9673$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009674if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009675 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009676
9677
9678$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9679
9680
9681fi
9682
9683
9684fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009685done
9686
Antoine Pitroua3000072010-09-07 14:52:42 +00009687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9690$as_echo_n "checking for getpagesize... " >&6; }
9691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009692/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009693
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009694#include <unistd.h>
9695
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009696int
9697main ()
9698{
9699void* p = getpagesize
9700 ;
9701 return 0;
9702}
9703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009705
Matthias Kloseb9621712010-04-24 17:59:49 +00009706$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009707
Matthias Kloseb159a552010-04-25 21:00:44 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009709$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009710else
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009713
9714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009716
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9718$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9720/* end confdefs.h. */
9721
9722#include <malloc.h>
9723
9724int
9725main ()
9726{
9727mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9728 ;
9729 return 0;
9730}
9731_ACEOF
9732if ac_fn_c_try_compile "$LINENO"; then :
9733
9734$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9735
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9737$as_echo "yes" >&6; }
9738else
9739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740$as_echo "no" >&6; }
9741
9742fi
9743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9744
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009745for ac_prog in true
9746do
9747 # Extract the first word of "$ac_prog", so it can be a program name with args.
9748set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9750$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009751if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009753else
9754 if test -n "$TRUE"; then
9755 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9756else
9757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9758for as_dir in $PATH
9759do
9760 IFS=$as_save_IFS
9761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763 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 +00009764 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009765 $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 +00009766 break 2
9767 fi
9768done
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009771
9772fi
9773fi
9774TRUE=$ac_cv_prog_TRUE
9775if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9777$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009778else
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9780$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009781fi
9782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009784 test -n "$TRUE" && break
9785done
9786test -n "$TRUE" || TRUE="/bin/true"
9787
9788
Matthias Kloseb9621712010-04-24 17:59:49 +00009789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9790$as_echo_n "checking for inet_aton in -lc... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009791if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009793else
9794 ac_check_lib_save_LIBS=$LIBS
9795LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009797/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799/* Override any GCC internal prototype to avoid an error.
9800 Use char because int might match the return type of a GCC
9801 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009802#ifdef __cplusplus
9803extern "C"
9804#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009805char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009806int
9807main ()
9808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009810 ;
9811 return 0;
9812}
9813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009815 ac_cv_lib_c_inet_aton=yes
9816else
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009819rm -f core conftest.err conftest.$ac_objext \
9820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009821LIBS=$ac_check_lib_save_LIBS
9822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9824$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009825if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009826 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009827else
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9829$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009830if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009832else
9833 ac_check_lib_save_LIBS=$LIBS
9834LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009844char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009845int
9846main ()
9847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009854 ac_cv_lib_resolv_inet_aton=yes
9855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009860LIBS=$ac_check_lib_save_LIBS
9861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9863$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009864if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009865 cat >>confdefs.h <<_ACEOF
9866#define HAVE_LIBRESOLV 1
9867_ACEOF
9868
9869 LIBS="-lresolv $LIBS"
9870
9871fi
9872
9873
9874fi
9875
9876
Christian Heimesd0764e22007-12-04 15:00:33 +00009877# On Tru64, chflags seems to be present, but calling it will
9878# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9880$as_echo_n "checking for chflags... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009881if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009883else
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009885 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009886else
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009888/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009889
Christian Heimesd0764e22007-12-04 15:00:33 +00009890#include <sys/stat.h>
9891#include <unistd.h>
9892int main(int argc, char*argv[])
9893{
9894 if(chflags(argv[0], 0) != 0)
9895 return 1;
9896 return 0;
9897}
Ned Deily3eb67d52011-06-28 00:00:28 -07009898
Christian Heimesd0764e22007-12-04 15:00:33 +00009899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009901 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009907fi
9908
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9912$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009913if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009915if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009916 ac_cv_have_chflags="yes"
9917else
9918 ac_cv_have_chflags="no"
9919fi
9920
9921fi
9922if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009923
Matthias Kloseb9621712010-04-24 17:59:49 +00009924$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009925
9926fi
9927
Matthias Kloseb9621712010-04-24 17:59:49 +00009928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9929$as_echo_n "checking for lchflags... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009930if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009932else
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009934 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009935else
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009937/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009938
Christian Heimesd0764e22007-12-04 15:00:33 +00009939#include <sys/stat.h>
9940#include <unistd.h>
9941int main(int argc, char*argv[])
9942{
9943 if(lchflags(argv[0], 0) != 0)
9944 return 1;
9945 return 0;
9946}
Ned Deily3eb67d52011-06-28 00:00:28 -07009947
Christian Heimesd0764e22007-12-04 15:00:33 +00009948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009949if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009950 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009951else
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9955 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009956fi
9957
9958
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9961$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009962if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009964if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009965 ac_cv_have_lchflags="yes"
9966else
9967 ac_cv_have_lchflags="no"
9968fi
9969
9970fi
9971if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009974
9975fi
9976
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009977case $ac_sys_system/$ac_sys_release in
9978Darwin/*)
9979 _CUR_CFLAGS="${CFLAGS}"
9980 _CUR_LDFLAGS="${LDFLAGS}"
9981 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9982 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9983 ;;
9984esac
9985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9987$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02009988if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009990else
9991 ac_check_lib_save_LIBS=$LIBS
9992LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009994/* end confdefs.h. */
9995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996/* Override any GCC internal prototype to avoid an error.
9997 Use char because int might match the return type of a GCC
9998 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009999#ifdef __cplusplus
10000extern "C"
10001#endif
10002char inflateCopy ();
10003int
10004main ()
10005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010006return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010007 ;
10008 return 0;
10009}
10010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010011if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010012 ac_cv_lib_z_inflateCopy=yes
10013else
Matthias Kloseb9621712010-04-24 17:59:49 +000010014 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010016rm -f core conftest.err conftest.$ac_objext \
10017 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010018LIBS=$ac_check_lib_save_LIBS
10019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10021$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010022if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010023
Matthias Kloseb9621712010-04-24 17:59:49 +000010024$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010025
10026fi
10027
10028
10029case $ac_sys_system/$ac_sys_release in
10030Darwin/*)
10031 CFLAGS="${_CUR_CFLAGS}"
10032 LDFLAGS="${_CUR_LDFLAGS}"
10033 ;;
10034esac
10035
Matthias Kloseb9621712010-04-24 17:59:49 +000010036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10037$as_echo_n "checking for hstrerror... " >&6; }
10038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010039/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010040
Martin v. Löwise9416172003-05-03 10:12:45 +000010041#include <netdb.h>
10042
Martin v. Löwise9416172003-05-03 10:12:45 +000010043int
10044main ()
10045{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010046void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010047 ;
10048 return 0;
10049}
10050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010054
Matthias Kloseb159a552010-04-25 21:00:44 +000010055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010056$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010057else
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010060
10061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010062rm -f core conftest.err conftest.$ac_objext \
10063 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064
Matthias Kloseb9621712010-04-24 17:59:49 +000010065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10066$as_echo_n "checking for inet_aton... " >&6; }
10067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010068/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010069
Martin v. Löwis86d66262006-02-17 08:40:11 +000010070#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010071#include <sys/socket.h>
10072#include <netinet/in.h>
10073#include <arpa/inet.h>
10074
Martin v. Löwise9416172003-05-03 10:12:45 +000010075int
10076main ()
10077{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010078void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010079 ;
10080 return 0;
10081}
10082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010084
Matthias Kloseb9621712010-04-24 17:59:49 +000010085$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010086
Matthias Kloseb159a552010-04-25 21:00:44 +000010087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010088$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010089else
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010092
10093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010094rm -f core conftest.err conftest.$ac_objext \
10095 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010096
Matthias Kloseb9621712010-04-24 17:59:49 +000010097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10098$as_echo_n "checking for inet_pton... " >&6; }
10099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010100/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010101
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010102#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010103#include <sys/socket.h>
10104#include <netinet/in.h>
10105#include <arpa/inet.h>
10106
Martin v. Löwise9416172003-05-03 10:12:45 +000010107int
10108main ()
10109{
10110void* p = inet_pton
10111 ;
10112 return 0;
10113}
10114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010116
Matthias Kloseb9621712010-04-24 17:59:49 +000010117$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010118
Matthias Kloseb159a552010-04-25 21:00:44 +000010119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010120$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010121else
Matthias Kloseb9621712010-04-24 17:59:49 +000010122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10123$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010124
10125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010127
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010128# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10130$as_echo_n "checking for setgroups... " >&6; }
10131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010132/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010133
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010134#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010135#ifdef HAVE_GRP_H
10136#include <grp.h>
10137#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010138
Martin v. Löwisd5843682002-11-21 20:41:28 +000010139int
10140main ()
10141{
10142void* p = setgroups
10143 ;
10144 return 0;
10145}
10146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010148
Matthias Kloseb9621712010-04-24 17:59:49 +000010149$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010150
Matthias Kloseb159a552010-04-25 21:00:44 +000010151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010152$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010153else
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10155$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010156
10157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010159
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010160# check for openpty and forkpty
10161
10162for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010163do :
10164 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010165if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010167#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010168_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010170else
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10172$as_echo_n "checking for openpty in -lutil... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010173if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010175else
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010177LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181/* Override any GCC internal prototype to avoid an error.
10182 Use char because int might match the return type of a GCC
10183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010184#ifdef __cplusplus
10185extern "C"
10186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010187char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010188int
10189main ()
10190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 ;
10193 return 0;
10194}
10195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010198else
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010201rm -f core conftest.err conftest.$ac_objext \
10202 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010203LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10206$as_echo "$ac_cv_lib_util_openpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010207if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010209 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010210else
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10212$as_echo_n "checking for openpty in -lbsd... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010213if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010215else
10216 ac_check_lib_save_LIBS=$LIBS
10217LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010219/* end confdefs.h. */
10220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221/* Override any GCC internal prototype to avoid an error.
10222 Use char because int might match the return type of a GCC
10223 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010224#ifdef __cplusplus
10225extern "C"
10226#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010227char openpty ();
10228int
10229main ()
10230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010232 ;
10233 return 0;
10234}
10235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010237 ac_cv_lib_bsd_openpty=yes
10238else
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241rm -f core conftest.err conftest.$ac_objext \
10242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010243LIBS=$ac_check_lib_save_LIBS
10244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10246$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010247if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010249 LIBS="$LIBS -lbsd"
10250fi
10251
10252
10253fi
10254
Fred Drake8cef4cf2000-06-28 16:40:38 +000010255
10256fi
10257done
10258
10259for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010260do :
10261 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010262if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010265_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010266
Fred Drake8cef4cf2000-06-28 16:40:38 +000010267else
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10269$as_echo_n "checking for forkpty in -lutil... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010270if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010272else
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010274LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278/* Override any GCC internal prototype to avoid an error.
10279 Use char because int might match the return type of a GCC
10280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010281#ifdef __cplusplus
10282extern "C"
10283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010284char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010285int
10286main ()
10287{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 ;
10290 return 0;
10291}
10292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010294 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010295else
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010298rm -f core conftest.err conftest.$ac_objext \
10299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010300LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10303$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010304if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010306 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010307else
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10309$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010310if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010312else
10313 ac_check_lib_save_LIBS=$LIBS
10314LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010316/* end confdefs.h. */
10317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318/* Override any GCC internal prototype to avoid an error.
10319 Use char because int might match the return type of a GCC
10320 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010321#ifdef __cplusplus
10322extern "C"
10323#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010324char forkpty ();
10325int
10326main ()
10327{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010329 ;
10330 return 0;
10331}
10332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010333if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010334 ac_cv_lib_bsd_forkpty=yes
10335else
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010338rm -f core conftest.err conftest.$ac_objext \
10339 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010340LIBS=$ac_check_lib_save_LIBS
10341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10343$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010344if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010346 LIBS="$LIBS -lbsd"
10347fi
10348
10349
10350fi
10351
Fred Drake8cef4cf2000-06-28 16:40:38 +000010352
10353fi
10354done
10355
Jack Jansendd19cf82001-12-06 22:36:17 +000010356
Christian Heimesb186d002008-03-18 15:15:01 +000010357# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010358for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010359do :
10360 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010361if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010362 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010363#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010364_ACEOF
10365
10366fi
10367done
10368
10369
Michael W. Hudson54241132001-12-07 15:38:26 +000010370# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010371for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010372do :
10373 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10374ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010375if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010377#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010378_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010379
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010380fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010381done
10382
Michael W. Hudson54241132001-12-07 15:38:26 +000010383
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010384ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010385if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010386 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010387
Martin v. Löwis1142de32002-03-29 16:28:31 +000010388else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010390 *" dup2.$ac_objext "* ) ;;
10391 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010392 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010393esac
10394
Martin v. Löwis1142de32002-03-29 16:28:31 +000010395fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010396
10397ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010398if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010399 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10400
10401else
10402 case " $LIBOBJS " in
10403 *" getcwd.$ac_objext "* ) ;;
10404 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10405 ;;
10406esac
10407
10408fi
10409
10410ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010411if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010412 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10413
10414else
10415 case " $LIBOBJS " in
10416 *" strdup.$ac_objext "* ) ;;
10417 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10418 ;;
10419esac
10420
10421fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010422
10423
10424for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010425do :
10426 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010427if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010429#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010432/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010433#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010434int
10435main ()
10436{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010437getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ;
10439 return 0;
10440}
10441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010443
Matthias Kloseb9621712010-04-24 17:59:49 +000010444$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010445
Guido van Rossum627b2d71993-12-24 10:39:16 +000010446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010448
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010450done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010451
Jack Jansen150753c2003-03-29 22:07:47 +000010452for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010453do :
10454 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010455if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010456 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010460/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010461#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010462int
10463main ()
10464{
10465setpgrp(0,0);
10466 ;
10467 return 0;
10468}
10469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010471
Matthias Kloseb9621712010-04-24 17:59:49 +000010472$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010473
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010476
10477fi
10478done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010479
Thomas Wouters3a584202000-08-05 23:28:51 +000010480for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010481do :
10482 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010483if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010484 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010485#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010488/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010489#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010490int
10491main ()
10492{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010493gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010494 ;
10495 return 0;
10496}
10497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010498if ac_fn_c_try_compile "$LINENO"; then :
10499
Guido van Rossum627b2d71993-12-24 10:39:16 +000010500else
Skip Montanaro6dead952003-09-25 14:50:04 +000010501
Matthias Kloseb9621712010-04-24 17:59:49 +000010502$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010503
Martin v. Löwis11437992002-04-12 09:54:03 +000010504
Guido van Rossum627b2d71993-12-24 10:39:16 +000010505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010507
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010508fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010509done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010510
Michael W. Hudson54241132001-12-07 15:38:26 +000010511
Matthias Kloseb9621712010-04-24 17:59:49 +000010512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10513$as_echo_n "checking for major... " >&6; }
10514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010515/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010516
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010517#if defined(MAJOR_IN_MKDEV)
10518#include <sys/mkdev.h>
10519#elif defined(MAJOR_IN_SYSMACROS)
10520#include <sys/sysmacros.h>
10521#else
10522#include <sys/types.h>
10523#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010524
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010525int
10526main ()
10527{
10528
10529 makedev(major(0),minor(0));
10530
10531 ;
10532 return 0;
10533}
10534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010536
10537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010539
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10541$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010542
10543else
Skip Montanaro6dead952003-09-25 14:50:04 +000010544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10546$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010547
10548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010549rm -f core conftest.err conftest.$ac_objext \
10550 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010551
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010552# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010553# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10555$as_echo_n "checking for getaddrinfo... " >&6; }
10556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010557/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010558
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010559#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010560#include <sys/socket.h>
10561#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010562#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010563
Martin v. Löwis11437992002-04-12 09:54:03 +000010564int
10565main ()
10566{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010567getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ;
10569 return 0;
10570}
10571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010572if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010573 have_getaddrinfo=yes
10574else
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010577rm -f core conftest.err conftest.$ac_objext \
10578 conftest$ac_exeext conftest.$ac_ext
10579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10580$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010581if test $have_getaddrinfo = yes
10582then
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10584$as_echo_n "checking getaddrinfo bug... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010585 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010587else
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010589 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010590else
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010592/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010593
10594#include <sys/types.h>
10595#include <netdb.h>
10596#include <string.h>
10597#include <sys/socket.h>
10598#include <netinet/in.h>
10599
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010600int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010601{
10602 int passive, gaierr, inet4 = 0, inet6 = 0;
10603 struct addrinfo hints, *ai, *aitop;
10604 char straddr[INET6_ADDRSTRLEN], strport[16];
10605
10606 for (passive = 0; passive <= 1; passive++) {
10607 memset(&hints, 0, sizeof(hints));
10608 hints.ai_family = AF_UNSPEC;
10609 hints.ai_flags = passive ? AI_PASSIVE : 0;
10610 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010611 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010612 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10613 (void)gai_strerror(gaierr);
10614 goto bad;
10615 }
10616 for (ai = aitop; ai; ai = ai->ai_next) {
10617 if (ai->ai_addr == NULL ||
10618 ai->ai_addrlen == 0 ||
10619 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10620 straddr, sizeof(straddr), strport, sizeof(strport),
10621 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10622 goto bad;
10623 }
10624 switch (ai->ai_family) {
10625 case AF_INET:
10626 if (strcmp(strport, "54321") != 0) {
10627 goto bad;
10628 }
10629 if (passive) {
10630 if (strcmp(straddr, "0.0.0.0") != 0) {
10631 goto bad;
10632 }
10633 } else {
10634 if (strcmp(straddr, "127.0.0.1") != 0) {
10635 goto bad;
10636 }
10637 }
10638 inet4++;
10639 break;
10640 case AF_INET6:
10641 if (strcmp(strport, "54321") != 0) {
10642 goto bad;
10643 }
10644 if (passive) {
10645 if (strcmp(straddr, "::") != 0) {
10646 goto bad;
10647 }
10648 } else {
10649 if (strcmp(straddr, "::1") != 0) {
10650 goto bad;
10651 }
10652 }
10653 inet6++;
10654 break;
10655 case AF_UNSPEC:
10656 goto bad;
10657 break;
10658 default:
10659 /* another family support? */
10660 break;
10661 }
10662 }
10663 }
10664
10665 if (!(inet4 == 0 || inet4 == 2))
10666 goto bad;
10667 if (!(inet6 == 0 || inet6 == 2))
10668 goto bad;
10669
10670 if (aitop)
10671 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010672 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010673
10674 bad:
10675 if (aitop)
10676 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010677 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010678}
10679
Martin v. Löwis11437992002-04-12 09:54:03 +000010680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010681if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010682 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10687 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010690fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010691
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10695$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10696
Mark Dickinson2df5d282009-12-31 21:22:50 +000010697if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010698then
10699 if test $ipv6 = yes
10700 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010701 echo 'Fatal: You must get working getaddrinfo() function.'
10702 echo ' or you can specify "--disable-ipv6"'.
10703 exit 1
10704 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010705else
Martin v. Löwis11437992002-04-12 09:54:03 +000010706
Matthias Kloseb9621712010-04-24 17:59:49 +000010707$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010708
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010709fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010710
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010711for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010712do :
10713 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010714if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010716#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010717_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010718
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010719fi
10720done
10721
Michael W. Hudson54241132001-12-07 15:38:26 +000010722
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010723# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10725$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010726if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010728else
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010730/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010731#include <sys/types.h>
10732#include <sys/time.h>
10733#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010734
Martin v. Löwis11437992002-04-12 09:54:03 +000010735int
10736main ()
10737{
10738if ((struct tm *) 0)
10739return 0;
10740 ;
10741 return 0;
10742}
10743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010744if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010745 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010746else
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10752$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010753if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010756
10757fi
10758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10760$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010761if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010763else
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010765/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010766#include <sys/types.h>
10767#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
Martin v. Löwis11437992002-04-12 09:54:03 +000010769int
10770main ()
10771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010772struct tm tm;
10773 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 ;
10776 return 0;
10777}
10778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010779if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010780 ac_cv_struct_tm=time.h
10781else
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10787$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010788if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791
10792fi
10793
Matthias Kloseb9621712010-04-24 17:59:49 +000010794ac_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 +000010795#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010796
Matthias Kloseb9621712010-04-24 17:59:49 +000010797"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010798if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010799
10800cat >>confdefs.h <<_ACEOF
10801#define HAVE_STRUCT_TM_TM_ZONE 1
10802_ACEOF
10803
10804
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010806
Martin v. Löwis11437992002-04-12 09:54:03 +000010807if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010810
10811else
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10813"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010814if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816else
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818fi
10819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010821#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010822_ACEOF
10823
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10825$as_echo_n "checking for tzname... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010826if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010828else
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010830/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010831#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010832#if !HAVE_DECL_TZNAME
10833extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010835
Martin v. Löwis11437992002-04-12 09:54:03 +000010836int
10837main ()
10838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010840 ;
10841 return 0;
10842}
10843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010844if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010845 ac_cv_var_tzname=yes
10846else
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010849rm -f core conftest.err conftest.$ac_objext \
10850 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10853$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010854 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
Matthias Kloseb9621712010-04-24 17:59:49 +000010856$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010857
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010858 fi
10859fi
10860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010862if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010863
10864cat >>confdefs.h <<_ACEOF
10865#define HAVE_STRUCT_STAT_ST_RDEV 1
10866_ACEOF
10867
10868
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010869fi
10870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010872if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010873
Martin v. Löwis11437992002-04-12 09:54:03 +000010874cat >>confdefs.h <<_ACEOF
10875#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10876_ACEOF
10877
10878
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010879fi
10880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010882if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010883
10884cat >>confdefs.h <<_ACEOF
10885#define HAVE_STRUCT_STAT_ST_FLAGS 1
10886_ACEOF
10887
10888
10889fi
10890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010892if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010893
10894cat >>confdefs.h <<_ACEOF
10895#define HAVE_STRUCT_STAT_ST_GEN 1
10896_ACEOF
10897
10898
10899fi
10900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010902if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010903
10904cat >>confdefs.h <<_ACEOF
10905#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10906_ACEOF
10907
10908
10909fi
10910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010912if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010913
Martin v. Löwis11437992002-04-12 09:54:03 +000010914cat >>confdefs.h <<_ACEOF
10915#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10916_ACEOF
10917
10918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010920
10921else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010922 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010923 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010924 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10925 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010926esac
10927
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010928fi
10929
Michael W. Hudson54241132001-12-07 15:38:26 +000010930
Martin v. Löwis11437992002-04-12 09:54:03 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10933$as_echo_n "checking for time.h that defines altzone... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010934if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010936else
Matthias Kloseb159a552010-04-25 21:00:44 +000010937
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010940#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010941int
10942main ()
10943{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010944return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010945 ;
10946 return 0;
10947}
10948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010949if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010950 ac_cv_header_time_altzone=yes
10951else
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956fi
10957
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10959$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010960if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010961
Matthias Kloseb9621712010-04-24 17:59:49 +000010962$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010963
10964fi
10965
Guido van Rossumda88dad1995-01-26 00:46:29 +000010966was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10968$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010970/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010971
10972#include <sys/types.h>
10973#include <sys/select.h>
10974#include <sys/time.h>
10975
Martin v. Löwis11437992002-04-12 09:54:03 +000010976int
10977main ()
10978{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010979;
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 ;
10981 return 0;
10982}
10983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010985
10986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010988
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010989 was_it_defined=yes
10990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10994$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995
Matthias Kloseb9621712010-04-24 17:59:49 +000010996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10997$as_echo_n "checking for addrinfo... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020010998if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011000else
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011002/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011003#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011004int
11005main ()
11006{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011007struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011008 ;
11009 return 0;
11010}
11011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011013 ac_cv_struct_addrinfo=yes
11014else
Matthias Kloseb9621712010-04-24 17:59:49 +000011015 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018fi
11019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11021$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011022if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011023
Matthias Kloseb9621712010-04-24 17:59:49 +000011024$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011025
11026fi
11027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11029$as_echo_n "checking for sockaddr_storage... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011030if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011032else
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011034/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011035
11036# include <sys/types.h>
11037# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011038int
11039main ()
11040{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011041struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011042 ;
11043 return 0;
11044}
11045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011047 ac_cv_struct_sockaddr_storage=yes
11048else
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11052fi
11053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11055$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011056if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011057
Matthias Kloseb9621712010-04-24 17:59:49 +000011058$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011059
11060fi
11061
Guido van Rossum627b2d71993-12-24 10:39:16 +000011062# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11065$as_echo_n "checking whether char is unsigned... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011066if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011068else
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011071$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011072int
11073main ()
11074{
11075static int test_array [1 - 2 * !(((char) -1) < 0)];
11076test_array [0] = 0
11077
11078 ;
11079 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011080}
Martin v. Löwis11437992002-04-12 09:54:03 +000011081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011082if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011083 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011084else
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11090$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011091if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011093
11094fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011095
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11097$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011098if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011100else
Matthias Kloseb9621712010-04-24 17:59:49 +000011101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011103
Martin v. Löwis11437992002-04-12 09:54:03 +000011104int
11105main ()
11106{
11107/* FIXME: Include the comments suggested by Paul. */
11108#ifndef __cplusplus
11109 /* Ultrix mips cc rejects this. */
11110 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011111 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113 char const *const *pcpcc;
11114 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 /* NEC SVR4.0.2 mips cc rejects this. */
11116 struct point {int x, y;};
11117 static struct point const zero = {0,0};
11118 /* AIX XL C 1.02.0.0 rejects this.
11119 It does not let you subtract one const X* pointer from another in
11120 an arm of an if-expression whose if-part is not a constant
11121 expression */
11122 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011125 ++pcpcc;
11126 ppc = (char**) pcpcc;
11127 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 { /* SCO 3.2v4 cc rejects this. */
11129 char *t;
11130 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011131
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 }
11135 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11136 int x[] = {25, 17};
11137 const int *foo = &x[0];
11138 ++foo;
11139 }
11140 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11141 typedef const int *iptr;
11142 iptr p = 0;
11143 ++p;
11144 }
11145 { /* AIX XL C 1.02.0.0 rejects this saying
11146 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11147 struct s { int j; const int *ap[3]; };
11148 struct s *b; b->j = 5;
11149 }
11150 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11151 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011152 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011155#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011156
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 ;
11158 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011159}
Martin v. Löwis11437992002-04-12 09:54:03 +000011160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011161if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011162 ac_cv_c_const=yes
11163else
Matthias Kloseb9621712010-04-24 17:59:49 +000011164 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11169$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011170if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011173
11174fi
11175
Michael W. Hudson54241132001-12-07 15:38:26 +000011176
Guido van Rossumda88dad1995-01-26 00:46:29 +000011177works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11179$as_echo_n "checking for working volatile... " >&6; }
11180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011181/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011182
Martin v. Löwis11437992002-04-12 09:54:03 +000011183int
11184main ()
11185{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011186volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 ;
11188 return 0;
11189}
11190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011191if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011192 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011193else
Skip Montanaro6dead952003-09-25 14:50:04 +000011194
Matthias Kloseb9621712010-04-24 17:59:49 +000011195$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011196
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011197
Guido van Rossum627b2d71993-12-24 10:39:16 +000011198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11201$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011202
Guido van Rossumda88dad1995-01-26 00:46:29 +000011203works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11205$as_echo_n "checking for working signed char... " >&6; }
11206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011207/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011208
Martin v. Löwis11437992002-04-12 09:54:03 +000011209int
11210main ()
11211{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011212signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 ;
11214 return 0;
11215}
11216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011218 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011219else
Skip Montanaro6dead952003-09-25 14:50:04 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011222
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011223
Guido van Rossum7f43da71994-08-01 12:15:30 +000011224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11227$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011228
Guido van Rossumda88dad1995-01-26 00:46:29 +000011229have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11231$as_echo_n "checking for prototypes... " >&6; }
11232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011233/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011234int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011235int
11236main ()
11237{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011238return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011239 ;
11240 return 0;
11241}
11242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011246
Matthias Kloseb159a552010-04-25 21:00:44 +000011247 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11251$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252
Guido van Rossumda88dad1995-01-26 00:46:29 +000011253works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11255$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011257/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011258
11259#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011260int foo(int x, ...) {
11261 va_list va;
11262 va_start(va, x);
11263 va_arg(va, int);
11264 va_arg(va, char *);
11265 va_arg(va, double);
11266 return 0;
11267}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011268
Martin v. Löwis11437992002-04-12 09:54:03 +000011269int
11270main ()
11271{
Guido van Rossum90eea071996-08-30 20:58:57 +000011272return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 ;
11274 return 0;
11275}
11276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011278
11279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011281
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011282 works=yes
11283
Guido van Rossum627b2d71993-12-24 10:39:16 +000011284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11287$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011288
Martin v. Löwisd6320502004-08-12 13:45:08 +000011289# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11291$as_echo_n "checking for socketpair... " >&6; }
11292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011293/* end confdefs.h. */
11294
11295#include <sys/types.h>
11296#include <sys/socket.h>
11297
11298int
11299main ()
11300{
11301void *x=socketpair
11302 ;
11303 return 0;
11304}
11305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011309
Matthias Kloseb159a552010-04-25 21:00:44 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011312else
Matthias Kloseb9621712010-04-24 17:59:49 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11314$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011315
11316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011318
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011319# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11321$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011323/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011324#include <sys/types.h>
11325#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011326int
11327main ()
11328{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011329struct sockaddr x;
11330x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011331 ;
11332 return 0;
11333}
11334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011335if ac_fn_c_try_compile "$LINENO"; then :
11336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11337$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011340
11341else
Matthias Kloseb9621712010-04-24 17:59:49 +000011342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11343$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011344
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011347
Guido van Rossumda88dad1995-01-26 00:46:29 +000011348va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11350$as_echo_n "checking whether va_list is an array... " >&6; }
11351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011352/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011353
11354#ifdef HAVE_STDARG_PROTOTYPES
11355#include <stdarg.h>
11356#else
11357#include <varargs.h>
11358#endif
11359
Martin v. Löwis11437992002-04-12 09:54:03 +000011360int
11361main ()
11362{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011363va_list list1, list2; list1 = list2;
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011370else
Skip Montanaro6dead952003-09-25 14:50:04 +000011371
Martin v. Löwis11437992002-04-12 09:54:03 +000011372
Matthias Kloseb9621712010-04-24 17:59:49 +000011373$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Guido van Rossumda88dad1995-01-26 00:46:29 +000011375 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011376
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11380$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011381
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011382# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011383
11384
Matthias Kloseb9621712010-04-24 17:59:49 +000011385ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011386if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011389
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11391$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392 OLD_CFLAGS=$CFLAGS
11393 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011395/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011396
11397# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Martin v. Löwis11437992002-04-12 09:54:03 +000011399int
11400main ()
11401{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011402
11403 char *name;
11404 struct hostent *he, *res;
11405 char buffer[2048];
11406 int buflen = 2048;
11407 int h_errnop;
11408
11409 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011410
11411 ;
11412 return 0;
11413}
11414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
Matthias Kloseb9621712010-04-24 17:59:49 +000011417 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011418
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011421
Matthias Kloseb9621712010-04-24 17:59:49 +000011422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11423$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011425else
Skip Montanaro6dead952003-09-25 14:50:04 +000011426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11428$as_echo "no" >&6; }
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11430$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011432/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011433
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011434# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011435
Martin v. Löwis11437992002-04-12 09:54:03 +000011436int
11437main ()
11438{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011439
11440 char *name;
11441 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011442 char buffer[2048];
11443 int buflen = 2048;
11444 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011445
Matthias Kloseb159a552010-04-25 21:00:44 +000011446 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
11448 ;
11449 return 0;
11450}
11451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011455
Martin v. Löwis11437992002-04-12 09:54:03 +000011456
Matthias Kloseb159a552010-04-25 21:00:44 +000011457$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011458
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11460$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011462else
Skip Montanaro6dead952003-09-25 14:50:04 +000011463
Matthias Kloseb9621712010-04-24 17:59:49 +000011464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11465$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11467$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11469/* end confdefs.h. */
11470
11471# include <netdb.h>
11472
11473int
11474main ()
11475{
11476
11477 char *name;
11478 struct hostent *he;
11479 struct hostent_data data;
11480
11481 (void) gethostbyname_r(name, he, &data);
11482
11483 ;
11484 return 0;
11485}
11486_ACEOF
11487if ac_fn_c_try_compile "$LINENO"; then :
11488
11489 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11490
11491
11492$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11493
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11495$as_echo "yes" >&6; }
11496
11497else
11498
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011507
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011510 CFLAGS=$OLD_CFLAGS
11511
11512else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 for ac_func in gethostbyname
11515do :
11516 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011517if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011519#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011520_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011521
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011522fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011523done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011524
Michael W. Hudson54241132001-12-07 15:38:26 +000011525
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011526fi
11527
Michael W. Hudson54241132001-12-07 15:38:26 +000011528
11529
11530
11531
11532
11533
Guido van Rossum627b2d71993-12-24 10:39:16 +000011534# checks for system services
11535# (none yet)
11536
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011537# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011538ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011539if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011540
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011541else
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11543$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011544if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011545 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011546else
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011548LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552/* Override any GCC internal prototype to avoid an error.
11553 Use char because int might match the return type of a GCC
11554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011555#ifdef __cplusplus
11556extern "C"
11557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011558char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011559int
11560main ()
11561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 ;
11564 return 0;
11565}
11566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011569else
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011572rm -f core conftest.err conftest.$ac_objext \
11573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011574LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11577$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011578if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011579 cat >>confdefs.h <<_ACEOF
11580#define HAVE_LIBIEEE 1
11581_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011583 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011584
Guido van Rossum627b2d71993-12-24 10:39:16 +000011585fi
11586
Michael W. Hudson54241132001-12-07 15:38:26 +000011587
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011588fi
11589
Michael W. Hudson54241132001-12-07 15:38:26 +000011590
Guido van Rossum7f253911997-05-09 02:42:48 +000011591# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11593$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011598if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011599then
11600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011602
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11604$as_echo "yes" >&6; }
11605else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11606$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011607fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011608else
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11610$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011611fi
11612
Guido van Rossum7f253911997-05-09 02:42:48 +000011613
Guido van Rossum7f43da71994-08-01 12:15:30 +000011614# check for --with-libm=...
11615
Guido van Rossum563e7081996-09-10 18:20:48 +000011616case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011617Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011618*) LIBM=-lm
11619esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11621$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011624if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011626if test "$withval" = no
11627then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11629$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011630elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011631then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11633$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011634else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011635fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011636else
Matthias Kloseb9621712010-04-24 17:59:49 +000011637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11638$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639fi
11640
Guido van Rossum7f43da71994-08-01 12:15:30 +000011641
11642# check for --with-libc=...
11643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11645$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011647# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011648if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011649 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011650if test "$withval" = no
11651then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11653$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011654elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011655then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11657$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011658else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011659fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011660else
Matthias Kloseb9621712010-04-24 17:59:49 +000011661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11662$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663fi
11664
Guido van Rossum7f43da71994-08-01 12:15:30 +000011665
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011666# **************************************************
11667# * Check for various properties of floating point *
11668# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11671$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011672if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011674else
11675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677 ac_cv_little_endian_double=no
11678else
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680/* end confdefs.h. */
11681
11682#include <string.h>
11683int main() {
11684 double x = 9006104071832581.0;
11685 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11686 return 0;
11687 else
11688 return 1;
11689}
11690
11691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011692if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011693 ac_cv_little_endian_double=yes
11694else
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11698 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699fi
11700
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701fi
11702
Matthias Kloseb9621712010-04-24 17:59:49 +000011703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11704$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011705if test "$ac_cv_little_endian_double" = yes
11706then
11707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011709
11710fi
11711
Matthias Kloseb9621712010-04-24 17:59:49 +000011712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11713$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011714if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716else
11717
Matthias Kloseb9621712010-04-24 17:59:49 +000011718if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719 ac_cv_big_endian_double=no
11720else
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722/* end confdefs.h. */
11723
11724#include <string.h>
11725int main() {
11726 double x = 9006104071832581.0;
11727 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11728 return 0;
11729 else
11730 return 1;
11731}
11732
11733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011735 ac_cv_big_endian_double=yes
11736else
Matthias Kloseb9621712010-04-24 17:59:49 +000011737 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11740 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741fi
11742
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011743fi
11744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11746$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011747if test "$ac_cv_big_endian_double" = yes
11748then
11749
Matthias Kloseb9621712010-04-24 17:59:49 +000011750$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011751
11752fi
11753
11754# Some ARM platforms use a mixed-endian representation for doubles.
11755# While Python doesn't currently have full support for these platforms
11756# (see e.g., issue 1762561), we can at least make sure that float <-> string
11757# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11759$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011760if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011762else
11763
Matthias Kloseb9621712010-04-24 17:59:49 +000011764if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011765 ac_cv_mixed_endian_double=no
11766else
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011768/* end confdefs.h. */
11769
11770#include <string.h>
11771int main() {
11772 double x = 9006104071832581.0;
11773 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11774 return 0;
11775 else
11776 return 1;
11777}
11778
11779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011781 ac_cv_mixed_endian_double=yes
11782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787fi
11788
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011789fi
11790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11792$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011793if test "$ac_cv_mixed_endian_double" = yes
11794then
11795
Matthias Kloseb9621712010-04-24 17:59:49 +000011796$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011797
11798fi
11799
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011800# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011801# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011802# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011803# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011804# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011805# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011806
11807# This inline assembler syntax may also work for suncc and icc,
11808# so we try it on all platforms.
11809
Matthias Kloseb9621712010-04-24 17:59:49 +000011810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11811$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011813/* end confdefs.h. */
11814
11815int
11816main ()
11817{
11818
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011819 unsigned short cw;
11820 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11821 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011822
11823 ;
11824 return 0;
11825}
11826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011828 have_gcc_asm_for_x87=yes
11829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11834$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011835if test "$have_gcc_asm_for_x87" = yes
11836then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011837
Matthias Kloseb9621712010-04-24 17:59:49 +000011838$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011839
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011840fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011841
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011842# Detect whether system arithmetic is subject to x87-style double
11843# rounding issues. The result of this test has little meaning on non
11844# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11845# mode is round-to-nearest and double rounding issues are present, and
11846# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11848$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011849# $BASECFLAGS may affect the result
11850ac_save_cc="$CC"
11851CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011852if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011853 ac_cv_x87_double_rounding=no
11854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011856/* end confdefs.h. */
11857
11858#include <stdlib.h>
11859#include <math.h>
11860int main() {
11861 volatile double x, y, z;
11862 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11863 x = 0.99999999999999989; /* 1-2**-53 */
11864 y = 1./x;
11865 if (y != 1.)
11866 exit(0);
11867 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11868 x = 1e16;
11869 y = 2.99999;
11870 z = x + y;
11871 if (z != 1e16+4.)
11872 exit(0);
11873 /* both tests show evidence of double rounding */
11874 exit(1);
11875}
11876
11877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011878if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011879 ac_cv_x87_double_rounding=no
11880else
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011885fi
11886
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011887CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11889$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011890if test "$ac_cv_x87_double_rounding" = yes
11891then
11892
Matthias Kloseb9621712010-04-24 17:59:49 +000011893$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011894
11895fi
11896
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011897# ************************************
11898# * Check for mathematical functions *
11899# ************************************
11900
11901LIBS_SAVE=$LIBS
11902LIBS="$LIBS $LIBM"
11903
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011904for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11905do :
11906 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11907ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011908if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011909 cat >>confdefs.h <<_ACEOF
11910#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11911_ACEOF
11912
11913fi
11914done
11915
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011916for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011917do :
11918 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11919ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011920if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011921 cat >>confdefs.h <<_ACEOF
11922#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11923_ACEOF
11924
11925fi
11926done
11927
11928ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11929"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011930if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011931 ac_have_decl=1
11932else
11933 ac_have_decl=0
11934fi
11935
11936cat >>confdefs.h <<_ACEOF
11937#define HAVE_DECL_ISINF $ac_have_decl
11938_ACEOF
11939ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11940"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011941if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011942 ac_have_decl=1
11943else
11944 ac_have_decl=0
11945fi
11946
11947cat >>confdefs.h <<_ACEOF
11948#define HAVE_DECL_ISNAN $ac_have_decl
11949_ACEOF
11950ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11951"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011952if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011953 ac_have_decl=1
11954else
11955 ac_have_decl=0
11956fi
11957
11958cat >>confdefs.h <<_ACEOF
11959#define HAVE_DECL_ISFINITE $ac_have_decl
11960_ACEOF
11961
11962
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011963# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11964# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11966$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020011967if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011969else
11970
Matthias Kloseb9621712010-04-24 17:59:49 +000011971if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011972 ac_cv_tanh_preserves_zero_sign=no
11973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011975/* end confdefs.h. */
11976
11977#include <math.h>
11978#include <stdlib.h>
11979int main() {
11980 /* return 0 if either negative zeros don't exist
11981 on this platform or if negative zeros exist
11982 and tanh(-0.) == -0. */
11983 if (atan2(0., -1.) == atan2(-0., -1.) ||
11984 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11985 else exit(1);
11986}
11987
11988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011989if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011990 ac_cv_tanh_preserves_zero_sign=yes
11991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011996fi
11997
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011998fi
11999
Matthias Kloseb9621712010-04-24 17:59:49 +000012000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12001$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012002if test "$ac_cv_tanh_preserves_zero_sign" = yes
12003then
12004
Matthias Kloseb9621712010-04-24 17:59:49 +000012005$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012006
12007fi
12008
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012009if test "$ac_cv_func_log1p" = yes
12010then
12011 # On some versions of AIX, log1p(-0.) returns 0. instead of
12012 # -0. See issue #9920.
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12014$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012015 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012016 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012017else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012018
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012019 if test "$cross_compiling" = yes; then :
12020 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012021else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12023/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012024
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012025 #include <math.h>
12026 #include <stdlib.h>
12027 int main() {
12028 /* Fail if the signs of log1p(-0.) and -0. can be
12029 distinguished. */
12030 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12031 return 0;
12032 else
12033 return 1;
12034 }
12035
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012036_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012037if ac_fn_c_try_run "$LINENO"; then :
12038 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012039else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012040 ac_cv_log1p_drops_zero_sign=yes
12041fi
12042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012044fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012045
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012046fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012047
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12049$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12050fi
12051if test "$ac_cv_log1p_drops_zero_sign" = yes
12052then
12053
12054$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12055
12056fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012057
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012058LIBS=$LIBS_SAVE
12059
Mark Dickinsona614f042009-11-28 12:48:43 +000012060# For multiprocessing module, check that sem_open
12061# actually works. For FreeBSD versions <= 7.2,
12062# the kernel module that provides POSIX semaphores
12063# isn't loaded by default, so an attempt to call
12064# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12066$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012067if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012071 ac_cv_posix_semaphores_enabled=yes
12072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012074/* end confdefs.h. */
12075
12076#include <unistd.h>
12077#include <fcntl.h>
12078#include <stdio.h>
12079#include <semaphore.h>
12080#include <sys/stat.h>
12081
12082int main(void) {
12083 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12084 if (a == SEM_FAILED) {
12085 perror("sem_open");
12086 return 1;
12087 }
12088 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012089 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012090 return 0;
12091}
12092
12093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012094if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012095 ac_cv_posix_semaphores_enabled=yes
12096else
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012101fi
12102
12103
Mark Dickinsona614f042009-11-28 12:48:43 +000012104fi
12105
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12107$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012108if test $ac_cv_posix_semaphores_enabled = no
12109then
12110
Matthias Kloseb9621712010-04-24 17:59:49 +000012111$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012112
12113fi
12114
Mark Dickinson10683072009-04-18 21:18:19 +000012115# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12117$as_echo_n "checking for broken sem_getvalue... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012118if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012122 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012125/* end confdefs.h. */
12126
12127#include <unistd.h>
12128#include <fcntl.h>
12129#include <stdio.h>
12130#include <semaphore.h>
12131#include <sys/stat.h>
12132
12133int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012134 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012135 int count;
12136 int res;
12137 if(a==SEM_FAILED){
12138 perror("sem_open");
12139 return 1;
12140
12141 }
12142 res = sem_getvalue(a, &count);
12143 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012144 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012145 return res==-1 ? 1 : 0;
12146}
12147
Mark Dickinson10683072009-04-18 21:18:19 +000012148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012149if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012150 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012151else
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12155 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012156fi
12157
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012158
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012159fi
12160
Matthias Kloseb9621712010-04-24 17:59:49 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12162$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012163if test $ac_cv_broken_sem_getvalue = yes
12164then
12165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012167
12168fi
12169
Mark Dickinsonbd792642009-03-18 20:06:12 +000012170# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12172$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012173# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012174if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012175 enableval=$enable_big_digits; case $enable_big_digits in
12176yes)
12177 enable_big_digits=30 ;;
12178no)
12179 enable_big_digits=15 ;;
1218015|30)
12181 ;;
12182*)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012183 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 +000012184esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12186$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012187
12188cat >>confdefs.h <<_ACEOF
12189#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12190_ACEOF
12191
12192
12193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12195$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012196fi
12197
12198
Guido van Rossumef2255b2000-03-10 22:30:29 +000012199# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012200ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012201if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012202
12203
Matthias Kloseb9621712010-04-24 17:59:49 +000012204$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012205
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012206 wchar_h="yes"
12207
Guido van Rossumef2255b2000-03-10 22:30:29 +000012208else
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012210
12211fi
12212
Michael W. Hudson54241132001-12-07 15:38:26 +000012213
Martin v. Löwis11437992002-04-12 09:54:03 +000012214
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012215# determine wchar_t size
12216if test "$wchar_h" = yes
12217then
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12221# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12223$as_echo_n "checking size of wchar_t... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012224if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12228"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012229
Martin v. Löwis11437992002-04-12 09:54:03 +000012230else
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 if test "$ac_cv_type_wchar_t" = yes; then
12232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012234as_fn_error 77 "cannot compute sizeof (wchar_t)
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012235See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236 else
12237 ac_cv_sizeof_wchar_t=0
12238 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012240
Martin v. Löwis11437992002-04-12 09:54:03 +000012241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12243$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012244
12245
12246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012248#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012249_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012250
Michael W. Hudson54241132001-12-07 15:38:26 +000012251
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012252fi
12253
Matthias Kloseb9621712010-04-24 17:59:49 +000012254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12255$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012256have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012258/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012259
12260#include <tcl.h>
12261#if TCL_UTF_MAX != 6
12262# error "NOT UCS4_TCL"
12263#endif
12264int
12265main ()
12266{
12267
12268 ;
12269 return 0;
12270}
12271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012272if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012273
12274
Matthias Kloseb9621712010-04-24 17:59:49 +000012275$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012276
12277 have_ucs4_tcl=yes
12278
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12282$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012283
Skip Montanaro6dead952003-09-25 14:50:04 +000012284# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012285if test "$wchar_h" = yes
12286then
12287 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12289$as_echo_n "checking whether wchar_t is signed... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012290 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012292else
12293
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012295 ac_cv_wchar_t_signed=yes
12296else
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012298/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012299
12300 #include <wchar.h>
12301 int main()
12302 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012303 /* Success: exit code 0 */
12304 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012305 }
12306
12307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012308if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012309 ac_cv_wchar_t_signed=yes
12310else
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12314 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012315fi
12316
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012317fi
12318
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12320$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321fi
12322
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12324$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012325
12326# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012327if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012328 withval=$with_wide_unicode;
12329if test "$withval" != no
12330then unicode_size="4"
12331else unicode_size="2"
12332fi
12333
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012334else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335
Georg Brandl52d168a2008-01-07 18:10:24 +000012336case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012337 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012338 *) unicode_size="2" ;;
12339esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012340
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012341fi
12342
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012343
12344
Georg Brandl52d168a2008-01-07 18:10:24 +000012345case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012346 4)
12347 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12348
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012349 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012350 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012351 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012352 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012353esac
12354
Michael W. Hudson54241132001-12-07 15:38:26 +000012355
Martin v. Löwis11437992002-04-12 09:54:03 +000012356
Georg Brandl52d168a2008-01-07 18:10:24 +000012357# wchar_t is only usable if it maps to an unsigned type
12358if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012359 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012360then
12361 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012362
Matthias Kloseb9621712010-04-24 17:59:49 +000012363$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012366
Georg Brandl52d168a2008-01-07 18:10:24 +000012367elif test "$ac_cv_sizeof_short" = "$unicode_size"
12368then
12369 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012371
Georg Brandl52d168a2008-01-07 18:10:24 +000012372elif test "$ac_cv_sizeof_long" = "$unicode_size"
12373then
12374 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012376
Georg Brandl52d168a2008-01-07 18:10:24 +000012377else
12378 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12381$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012382
12383# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12385$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012386if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012388else
Matthias Kloseb9621712010-04-24 17:59:49 +000012389 ac_cv_c_bigendian=unknown
12390 # See if we're dealing with a universal compiler.
12391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392/* end confdefs.h. */
12393#ifndef __APPLE_CC__
12394 not a universal capable compiler
12395 #endif
12396 typedef int dummy;
12397
Skip Montanaro6dead952003-09-25 14:50:04 +000012398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012399if ac_fn_c_try_compile "$LINENO"; then :
12400
12401 # Check for potential -arch flags. It is not universal unless
12402 # there are at least two -arch flags with different values.
12403 ac_arch=
12404 ac_prev=
12405 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12406 if test -n "$ac_prev"; then
12407 case $ac_word in
12408 i?86 | x86_64 | ppc | ppc64)
12409 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12410 ac_arch=$ac_word
12411 else
12412 ac_cv_c_bigendian=universal
12413 break
12414 fi
12415 ;;
12416 esac
12417 ac_prev=
12418 elif test "x$ac_word" = "x-arch"; then
12419 ac_prev=arch
12420 fi
12421 done
12422fi
12423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12424 if test $ac_cv_c_bigendian = unknown; then
12425 # See if sys/param.h defines the BYTE_ORDER macro.
12426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012427/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012428#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012430
Martin v. Löwis11437992002-04-12 09:54:03 +000012431int
12432main ()
12433{
Matthias Kloseb9621712010-04-24 17:59:49 +000012434#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12435 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12436 && LITTLE_ENDIAN)
12437 bogus endian macros
12438 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012439
12440 ;
12441 return 0;
12442}
12443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012444if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012445 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012447/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012448#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012450
Martin v. Löwis11437992002-04-12 09:54:03 +000012451int
12452main ()
12453{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012454#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 not big endian
12456 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
12458 ;
12459 return 0;
12460}
12461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012462if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012463 ac_cv_c_bigendian=yes
12464else
Matthias Kloseb9621712010-04-24 17:59:49 +000012465 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012468fi
12469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12470 fi
12471 if test $ac_cv_c_bigendian = unknown; then
12472 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012474/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012475#include <limits.h>
12476
Martin v. Löwis11437992002-04-12 09:54:03 +000012477int
12478main ()
12479{
Matthias Kloseb9621712010-04-24 17:59:49 +000012480#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12481 bogus endian macros
12482 #endif
12483
Martin v. Löwis11437992002-04-12 09:54:03 +000012484 ;
12485 return 0;
12486}
12487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012488if ac_fn_c_try_compile "$LINENO"; then :
12489 # It does; now see whether it defined to _BIG_ENDIAN or not.
12490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12491/* end confdefs.h. */
12492#include <limits.h>
12493
12494int
12495main ()
12496{
12497#ifndef _BIG_ENDIAN
12498 not big endian
12499 #endif
12500
12501 ;
12502 return 0;
12503}
12504_ACEOF
12505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012507else
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12511fi
12512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12513 fi
12514 if test $ac_cv_c_bigendian = unknown; then
12515 # Compile a test program.
12516 if test "$cross_compiling" = yes; then :
12517 # Try to guess by grepping values from an object file.
12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12519/* end confdefs.h. */
12520short int ascii_mm[] =
12521 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12522 short int ascii_ii[] =
12523 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12524 int use_ascii (int i) {
12525 return ascii_mm[i] + ascii_ii[i];
12526 }
12527 short int ebcdic_ii[] =
12528 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12529 short int ebcdic_mm[] =
12530 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12531 int use_ebcdic (int i) {
12532 return ebcdic_mm[i] + ebcdic_ii[i];
12533 }
12534 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535
Matthias Kloseb9621712010-04-24 17:59:49 +000012536int
12537main ()
12538{
12539return use_ascii (foo) == use_ebcdic (foo);
12540 ;
12541 return 0;
12542}
12543_ACEOF
12544if ac_fn_c_try_compile "$LINENO"; then :
12545 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12546 ac_cv_c_bigendian=yes
12547 fi
12548 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12549 if test "$ac_cv_c_bigendian" = unknown; then
12550 ac_cv_c_bigendian=no
12551 else
12552 # finding both strings is unlikely to happen, but who knows?
12553 ac_cv_c_bigendian=unknown
12554 fi
12555 fi
12556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012558else
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012560/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012561$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012562int
12563main ()
12564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 /* Are we little or big endian? From Harbison&Steele. */
12567 union
12568 {
12569 long int l;
12570 char c[sizeof (long int)];
12571 } u;
12572 u.l = 1;
12573 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012574
12575 ;
12576 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012577}
Martin v. Löwis11437992002-04-12 09:54:03 +000012578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012579if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012580 ac_cv_c_bigendian=no
12581else
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012587
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12591$as_echo "$ac_cv_c_bigendian" >&6; }
12592 case $ac_cv_c_bigendian in #(
12593 yes)
12594 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12595;; #(
12596 no)
12597 ;; #(
12598 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012599
Matthias Kloseb9621712010-04-24 17:59:49 +000012600$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 ;; #(
12603 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012604 as_fn_error $? "unknown endianness
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012605 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012607
Michael W. Hudson54241132001-12-07 15:38:26 +000012608
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012609# ABI version string for Python extension modules. This appears between the
12610# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12611# from the following attributes which affect the ABI of this Python build (in
12612# this order):
12613#
12614# * The Python implementation (always 'cpython-' for us)
12615# * The major and minor version numbers
12616# * --with-pydebug (adds a 'd')
12617# * --with-pymalloc (adds a 'm')
12618# * --with-wide-unicode (adds a 'u')
12619#
12620# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012621# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12622# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012623
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12625$as_echo_n "checking ABIFLAGS... " >&6; }
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12627$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12629$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012630SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12632$as_echo "$SOABI" >&6; }
12633
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12635$as_echo_n "checking LDVERSION... " >&6; }
12636LDVERSION='$(VERSION)$(ABIFLAGS)'
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12638$as_echo "$LDVERSION" >&6; }
12639
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012640# SO is the extension of shared libraries `(including the dot!)
12641# -- usually .so, .sl on HP-UX, .dll on Cygwin
12642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12643$as_echo_n "checking SO... " >&6; }
12644if test -z "$SO"
12645then
12646 case $ac_sys_system in
12647 hp*|HP*)
12648 case `uname -m` in
12649 ia64) SO=.so;;
12650 *) SO=.sl;;
12651 esac
12652 ;;
12653 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012654 Linux*|GNU*)
12655 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012656 *) SO=.so;;
12657 esac
12658else
12659 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012660 echo
12661 echo '====================================================================='
12662 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012663 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012664 echo '+ Do you really mean to change the extension for shared libraries? +'
12665 echo '+ Continuing in 10 seconds to let you to ponder. +'
12666 echo '+ +'
12667 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012668 sleep 10
12669fi
12670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12671$as_echo "$SO" >&6; }
12672
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012673# Check whether right shifting a negative integer extends the sign bit
12674# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12676$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012677if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012678 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012679else
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012682 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012683else
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012685/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012686
12687int main()
12688{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012689 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012690}
12691
Martin v. Löwis11437992002-04-12 09:54:03 +000012692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012693if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012694 ac_cv_rshift_extends_sign=yes
12695else
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12699 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012700fi
12701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012702fi
12703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12705$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012706if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012707then
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
Matthias Kloseb9621712010-04-24 17:59:49 +000012709$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012710
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012711fi
12712
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012713# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12715$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012716if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012718else
Martin v. Löwis11437992002-04-12 09:54:03 +000012719
Matthias Kloseb9621712010-04-24 17:59:49 +000012720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012722#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012723int
12724main ()
12725{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012726
12727 FILE *f = fopen("/dev/null", "r");
12728 flockfile(f);
12729 getc_unlocked(f);
12730 funlockfile(f);
12731
Martin v. Löwis11437992002-04-12 09:54:03 +000012732 ;
12733 return 0;
12734}
12735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012736if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012737 ac_cv_have_getc_unlocked=yes
12738else
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 ac_cv_have_getc_unlocked=no
12740fi
12741rm -f core conftest.err conftest.$ac_objext \
12742 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744
Matthias Kloseb9621712010-04-24 17:59:49 +000012745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12746$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012747if test "$ac_cv_have_getc_unlocked" = yes
12748then
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012751
12752fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012753
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012754# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012755# save the value of LIBS so we don't actually link Python with readline
12756LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012757
Gregory P. Smith18820942008-09-07 06:24:49 +000012758# On some systems we need to link readline to a termcap compatible
12759# library. NOTE: Keep the precedence of listed libraries synchronised
12760# with setup.py.
12761py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12763$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012764for py_libtermcap in "" ncursesw ncurses curses termcap; do
12765 if test -z "$py_libtermcap"; then
12766 READLINE_LIBS="-lreadline"
12767 else
12768 READLINE_LIBS="-lreadline -l$py_libtermcap"
12769 fi
12770 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012772/* end confdefs.h. */
12773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774/* Override any GCC internal prototype to avoid an error.
12775 Use char because int might match the return type of a GCC
12776 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012777#ifdef __cplusplus
12778extern "C"
12779#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012780char readline ();
12781int
12782main ()
12783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012785 ;
12786 return 0;
12787}
12788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012789if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012790 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012792rm -f core conftest.err conftest.$ac_objext \
12793 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012794 if test $py_cv_lib_readline = yes; then
12795 break
12796 fi
12797done
12798# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12799#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012800if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12802$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012803else
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12805$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012806
Matthias Kloseb9621712010-04-24 17:59:49 +000012807$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012808
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012809fi
12810
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012811# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12813$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012814if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012816else
12817 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012818LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012820/* end confdefs.h. */
12821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822/* Override any GCC internal prototype to avoid an error.
12823 Use char because int might match the return type of a GCC
12824 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012825#ifdef __cplusplus
12826extern "C"
12827#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012828char rl_callback_handler_install ();
12829int
12830main ()
12831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012833 ;
12834 return 0;
12835}
12836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012837if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012838 ac_cv_lib_readline_rl_callback_handler_install=yes
12839else
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012842rm -f core conftest.err conftest.$ac_objext \
12843 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012844LIBS=$ac_check_lib_save_LIBS
12845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12847$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012848if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012851
12852fi
12853
12854
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012855# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012857/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012858#include <readline/readline.h>
12859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012860if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012861 have_readline=yes
12862else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012863 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012864
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012865fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012866rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012867if test $have_readline = yes
12868then
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012870/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012871#include <readline/readline.h>
12872
12873_ACEOF
12874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012876
Matthias Kloseb9621712010-04-24 17:59:49 +000012877$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012878
12879fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012880rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012883/* end confdefs.h. */
12884#include <readline/readline.h>
12885
12886_ACEOF
12887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012888 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012891
12892fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012893rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012894
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012895fi
12896
Martin v. Löwis0daad592001-09-30 21:09:59 +000012897# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12899$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012900if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012901 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012902else
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012904LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908/* Override any GCC internal prototype to avoid an error.
12909 Use char because int might match the return type of a GCC
12910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012911#ifdef __cplusplus
12912extern "C"
12913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012914char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012915int
12916main ()
12917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 ;
12920 return 0;
12921}
12922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012925else
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012928rm -f core conftest.err conftest.$ac_objext \
12929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012930LIBS=$ac_check_lib_save_LIBS
12931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12933$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012934if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012937
Martin v. Löwis0daad592001-09-30 21:09:59 +000012938fi
12939
Michael W. Hudson54241132001-12-07 15:38:26 +000012940
Thomas Wouters89d996e2007-09-08 17:39:28 +000012941# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12943$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012944if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012946else
12947 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012948LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012950/* end confdefs.h. */
12951
12952/* Override any GCC internal prototype to avoid an error.
12953 Use char because int might match the return type of a GCC
12954 builtin and then its argument prototype would still apply. */
12955#ifdef __cplusplus
12956extern "C"
12957#endif
12958char rl_completion_display_matches_hook ();
12959int
12960main ()
12961{
12962return rl_completion_display_matches_hook ();
12963 ;
12964 return 0;
12965}
12966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012967if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012968 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12969else
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012972rm -f core conftest.err conftest.$ac_objext \
12973 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012974LIBS=$ac_check_lib_save_LIBS
12975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12977$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012978if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012979
Matthias Kloseb9621712010-04-24 17:59:49 +000012980$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012981
12982fi
12983
12984
Martin v. Löwis0daad592001-09-30 21:09:59 +000012985# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12987$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020012988if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012990else
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012992LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996/* Override any GCC internal prototype to avoid an error.
12997 Use char because int might match the return type of a GCC
12998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012999#ifdef __cplusplus
13000extern "C"
13001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013002char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013003int
13004main ()
13005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 ;
13008 return 0;
13009}
13010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013013else
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013016rm -f core conftest.err conftest.$ac_objext \
13017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013018LIBS=$ac_check_lib_save_LIBS
13019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13021$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013022if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013025
Guido van Rossum353ae582001-07-10 16:45:32 +000013026fi
13027
Jack Jansendd19cf82001-12-06 22:36:17 +000013028
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013029# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013031/* end confdefs.h. */
13032#include <readline/readline.h>
13033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013034if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035 have_readline=yes
13036else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013037 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013038
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013039fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013040rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013041if test $have_readline = yes
13042then
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013044/* end confdefs.h. */
13045#include <readline/readline.h>
13046
13047_ACEOF
13048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013052
13053fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013054rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013055
13056fi
13057
Martin v. Löwis82bca632006-02-10 20:49:30 +000013058# End of readline checks: restore LIBS
13059LIBS=$LIBS_no_readline
13060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13062$as_echo_n "checking for broken nice()... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013063if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013065else
Martin v. Löwis11437992002-04-12 09:54:03 +000013066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013068 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013071/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013072
13073int main()
13074{
13075 int val1 = nice(1);
13076 if (val1 != -1 && val1 == nice(2))
13077 exit(0);
13078 exit(1);
13079}
13080
Martin v. Löwis11437992002-04-12 09:54:03 +000013081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013082if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013083 ac_cv_broken_nice=yes
13084else
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13088 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013089fi
13090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091fi
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13094$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013095if test "$ac_cv_broken_nice" = yes
13096then
Martin v. Löwis11437992002-04-12 09:54:03 +000013097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013099
13100fi
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13103$as_echo_n "checking for broken poll()... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013104if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013106else
Matthias Kloseb9621712010-04-24 17:59:49 +000013107 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013108 ac_cv_broken_poll=no
13109else
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013111/* end confdefs.h. */
13112
13113#include <poll.h>
13114
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013115int main()
13116{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013117 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013118 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013119
13120 close (42);
13121
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013123 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013124 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013125 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013126 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013127 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128 return 1;
13129}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013130
13131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013132if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013133 ac_cv_broken_poll=yes
13134else
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013141fi
13142
Matthias Kloseb9621712010-04-24 17:59:49 +000013143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13144$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013145if test "$ac_cv_broken_poll" = yes
13146then
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013149
13150fi
13151
Brett Cannon43802422005-02-10 20:48:03 +000013152# 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 +000013153# (which is not required by ISO C or UNIX spec) and/or if we support
13154# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013155ac_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 +000013156#include <$ac_cv_struct_tm>
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013159if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013160
13161cat >>confdefs.h <<_ACEOF
13162#define HAVE_STRUCT_TM_TM_ZONE 1
13163_ACEOF
13164
13165
13166fi
13167
13168if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013171
13172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13174"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013175if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013179fi
13180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013182#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183_ACEOF
13184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13186$as_echo_n "checking for tzname... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013187if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013191/* end confdefs.h. */
13192#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193#if !HAVE_DECL_TZNAME
13194extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013195#endif
13196
13197int
13198main ()
13199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013201 ;
13202 return 0;
13203}
13204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013205if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013206 ac_cv_var_tzname=yes
13207else
Matthias Kloseb9621712010-04-24 17:59:49 +000013208 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013210rm -f core conftest.err conftest.$ac_objext \
13211 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13214$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013215 if test $ac_cv_var_tzname = yes; then
13216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013218
13219 fi
13220fi
13221
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013222
Martin v. Löwis1d459062005-03-14 21:23:33 +000013223# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13225$as_echo_n "checking for working tzset()... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013226if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013228else
13229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013231 ac_cv_working_tzset=no
13232else
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013234/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013235
13236#include <stdlib.h>
13237#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013238#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013239
13240#if HAVE_TZNAME
13241extern char *tzname[];
13242#endif
13243
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013244int main()
13245{
Brett Cannon18367812003-09-19 00:59:16 +000013246 /* Note that we need to ensure that not only does tzset(3)
13247 do 'something' with localtime, but it works as documented
13248 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013249 This includes making sure that tzname is set properly if
13250 tm->tm_zone does not exist since it is the alternative way
13251 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013252
13253 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013254 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013255 */
13256
Martin v. Löwis1d459062005-03-14 21:23:33 +000013257 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013258 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13259
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013260 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013261 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013262 if (localtime(&groundhogday)->tm_hour != 0)
13263 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013264#if HAVE_TZNAME
13265 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13266 if (strcmp(tzname[0], "UTC") ||
13267 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13268 exit(1);
13269#endif
Brett Cannon18367812003-09-19 00:59:16 +000013270
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013271 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013272 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013273 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013274 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013275#if HAVE_TZNAME
13276 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13277 exit(1);
13278#endif
Brett Cannon18367812003-09-19 00:59:16 +000013279
13280 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13281 tzset();
13282 if (localtime(&groundhogday)->tm_hour != 11)
13283 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013284#if HAVE_TZNAME
13285 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13286 exit(1);
13287#endif
13288
13289#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013290 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13291 exit(1);
13292 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13293 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013294#endif
Brett Cannon18367812003-09-19 00:59:16 +000013295
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013296 exit(0);
13297}
13298
13299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013300if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013301 ac_cv_working_tzset=yes
13302else
Matthias Kloseb9621712010-04-24 17:59:49 +000013303 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013307fi
13308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309fi
13310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13312$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013313if test "$ac_cv_working_tzset" = yes
13314then
13315
Matthias Kloseb9621712010-04-24 17:59:49 +000013316$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013317
13318fi
13319
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013320# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13322$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013323if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013325else
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013327/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013328#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013329int
13330main ()
13331{
13332
13333struct stat st;
13334st.st_mtim.tv_nsec = 1;
13335
13336 ;
13337 return 0;
13338}
13339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013341 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013342else
Matthias Kloseb9621712010-04-24 17:59:49 +000013343 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13346fi
13347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13349$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013350if test "$ac_cv_stat_tv_nsec" = yes
13351then
13352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013354
13355fi
13356
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013357# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13359$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013360if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013364/* end confdefs.h. */
13365#include <sys/stat.h>
13366int
13367main ()
13368{
13369
13370struct stat st;
13371st.st_mtimespec.tv_nsec = 1;
13372
13373 ;
13374 return 0;
13375}
13376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013378 ac_cv_stat_tv_nsec2=yes
13379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13383fi
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13386$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013387if test "$ac_cv_stat_tv_nsec2" = yes
13388then
13389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013391
13392fi
13393
Jack Jansen666b1e72001-10-31 12:11:48 +000013394# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13396$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013397if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013399else
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013401/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013402#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013403int
13404main ()
13405{
Jack Jansen666b1e72001-10-31 12:11:48 +000013406
13407 int rtn;
13408 rtn = mvwdelch(0,0,0);
13409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 ;
13411 return 0;
13412}
13413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013414if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013415 ac_cv_mvwdelch_is_expression=yes
13416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13420fi
13421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13423$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013424
13425if test "$ac_cv_mvwdelch_is_expression" = yes
13426then
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013429
13430fi
13431
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13433$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013434if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013436else
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013438/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013439#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013440int
13441main ()
13442{
Jack Jansen666b1e72001-10-31 12:11:48 +000013443
13444 WINDOW *w;
13445 w->_flags = 0;
13446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 ;
13448 return 0;
13449}
13450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013451if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013452 ac_cv_window_has_flags=yes
13453else
Matthias Kloseb9621712010-04-24 17:59:49 +000013454 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13457fi
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13460$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013461
Jack Jansen666b1e72001-10-31 12:11:48 +000013462
13463if test "$ac_cv_window_has_flags" = yes
13464then
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013467
13468fi
13469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13471$as_echo_n "checking for is_term_resized... " >&6; }
13472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013473/* end confdefs.h. */
13474#include <curses.h>
13475int
13476main ()
13477{
13478void *x=is_term_resized
13479 ;
13480 return 0;
13481}
13482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013483if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013486
Matthias Kloseb159a552010-04-25 21:00:44 +000013487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013488$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013489else
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13491$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013492
13493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13497$as_echo_n "checking for resize_term... " >&6; }
13498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013499/* end confdefs.h. */
13500#include <curses.h>
13501int
13502main ()
13503{
13504void *x=resize_term
13505 ;
13506 return 0;
13507}
13508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013509if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013512
Matthias Kloseb159a552010-04-25 21:00:44 +000013513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013514$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013515else
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13517$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013518
13519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13523$as_echo_n "checking for resizeterm... " >&6; }
13524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013525/* end confdefs.h. */
13526#include <curses.h>
13527int
13528main ()
13529{
13530void *x=resizeterm
13531 ;
13532 return 0;
13533}
13534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013535if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013538
Matthias Kloseb159a552010-04-25 21:00:44 +000013539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013540$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013541else
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13543$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013544
13545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13547
Matthias Kloseb9621712010-04-24 17:59:49 +000013548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13549$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013550
13551if test -r /dev/ptmx
13552then
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13554$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013557
Thomas Wouters89f507f2006-12-13 04:49:30 +000013558else
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13560$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013561fi
13562
Matthias Kloseb9621712010-04-24 17:59:49 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13564$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013565
13566if test -r /dev/ptc
13567then
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13569$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013572
Thomas Wouters89f507f2006-12-13 04:49:30 +000013573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13575$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013576fi
13577
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013578if test "$have_long_long" = yes
13579then
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13581$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013582 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013586 ac_cv_have_long_long_format=no
13587else
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013589/* end confdefs.h. */
13590
13591 #include <stdio.h>
13592 #include <stddef.h>
13593 #include <string.h>
13594
13595 #ifdef HAVE_SYS_TYPES_H
13596 #include <sys/types.h>
13597 #endif
13598
13599 int main()
13600 {
13601 char buffer[256];
13602
13603 if (sprintf(buffer, "%lld", (long long)123) < 0)
13604 return 1;
13605 if (strcmp(buffer, "123"))
13606 return 1;
13607
13608 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13609 return 1;
13610 if (strcmp(buffer, "-123"))
13611 return 1;
13612
13613 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13614 return 1;
13615 if (strcmp(buffer, "123"))
13616 return 1;
13617
13618 return 0;
13619 }
13620
13621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013622if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013623 ac_cv_have_long_long_format=yes
13624else
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013629fi
13630
13631
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013632fi
13633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13635$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013636fi
13637
Mark Dickinson89d7d412009-12-31 20:50:59 +000013638if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013639then
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013642
13643fi
13644
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013645if test $ac_sys_system = Darwin
13646then
13647 LIBS="$LIBS -framework CoreFoundation"
13648fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13651$as_echo_n "checking for %zd printf() format support... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013652if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013654else
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013656 ac_cv_have_size_t_format="cross -- assuming yes"
13657
Thomas Wouters477c8d52006-05-27 19:21:47 +000013658else
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013660/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013661
Thomas Wouters477c8d52006-05-27 19:21:47 +000013662#include <stdio.h>
13663#include <stddef.h>
13664#include <string.h>
13665
Christian Heimes2c181612007-12-17 20:04:13 +000013666#ifdef HAVE_SYS_TYPES_H
13667#include <sys/types.h>
13668#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013669
13670#ifdef HAVE_SSIZE_T
13671typedef ssize_t Py_ssize_t;
13672#elif SIZEOF_VOID_P == SIZEOF_LONG
13673typedef long Py_ssize_t;
13674#else
13675typedef int Py_ssize_t;
13676#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013677
Christian Heimes2c181612007-12-17 20:04:13 +000013678int main()
13679{
13680 char buffer[256];
13681
Thomas Wouters477c8d52006-05-27 19:21:47 +000013682 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13683 return 1;
13684
Thomas Wouters89f507f2006-12-13 04:49:30 +000013685 if (strcmp(buffer, "123"))
13686 return 1;
13687
13688 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13689 return 1;
13690
13691 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013692 return 1;
13693
13694 return 0;
13695}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013696
Thomas Wouters477c8d52006-05-27 19:21:47 +000013697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013699 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013700else
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13704 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013705fi
13706
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13709$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013710if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013713
13714fi
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013717#ifdef HAVE_SYS_TYPES_H
13718#include <sys/types.h>
13719#endif
13720#ifdef HAVE_SYS_SOCKET_H
13721#include <sys/socket.h>
13722#endif
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013725if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013726
Martin v. Löwis11437992002-04-12 09:54:03 +000013727else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013730
13731fi
13732
Michael W. Hudson54241132001-12-07 15:38:26 +000013733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13735$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013736if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013738else
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013740 ac_cv_broken_mbstowcs=no
13741else
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013743/* end confdefs.h. */
13744
13745#include<stdlib.h>
13746int main() {
13747 size_t len = -1;
13748 const char *str = "text";
13749 len = mbstowcs(NULL, str, 0);
13750 return (len != 4);
13751}
13752
13753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013754if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013755 ac_cv_broken_mbstowcs=no
13756else
Matthias Kloseb9621712010-04-24 17:59:49 +000013757 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013761fi
13762
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013763fi
13764
Matthias Kloseb9621712010-04-24 17:59:49 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13766$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013767if test "$ac_cv_broken_mbstowcs" = yes
13768then
13769
Matthias Kloseb9621712010-04-24 17:59:49 +000013770$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013771
13772fi
13773
Antoine Pitrou042b1282010-08-13 21:15:58 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13775$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013776if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013777 $as_echo_n "(cached) " >&6
13778else
13779 if test "$cross_compiling" = yes; then :
13780 ac_cv_computed_gotos=no
13781else
13782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13783/* end confdefs.h. */
13784
13785int main(int argc, char **argv)
13786{
13787 static void *targets[1] = { &&LABEL1 };
13788 goto LABEL2;
13789LABEL1:
13790 return 0;
13791LABEL2:
13792 goto *targets[0];
13793 return 1;
13794}
13795
13796_ACEOF
13797if ac_fn_c_try_run "$LINENO"; then :
13798 ac_cv_computed_gotos=yes
13799else
13800 ac_cv_computed_gotos=no
13801fi
13802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13803 conftest.$ac_objext conftest.beam conftest.$ac_ext
13804fi
13805
13806fi
13807
13808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13809$as_echo "$ac_cv_computed_gotos" >&6; }
13810if test "$ac_cv_computed_gotos" = yes
13811then
13812
13813$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13814
13815fi
13816
Antoine Pitroub52ec782009-01-25 16:34:23 +000013817# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13819$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013820
13821# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013823 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013824if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013825then
13826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13830$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013831fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013832if test "$withval" = no
13833then
13834
13835$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13836
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13838$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013839fi
13840
Antoine Pitrou042b1282010-08-13 21:15:58 +000013841else
13842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13843$as_echo "no value specified" >&6; }
13844fi
13845
Antoine Pitroub52ec782009-01-25 16:34:23 +000013846
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013847case $ac_sys_system in
13848AIX*)
13849
13850$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13851 ;;
13852esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013853
Michael W. Hudson54241132001-12-07 15:38:26 +000013854
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013855
13856
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013857for h in `(cd $srcdir;echo Python/thread_*.h)`
13858do
13859 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13860done
13861
Michael W. Hudson54241132001-12-07 15:38:26 +000013862
Neal Norwitzd24499d2005-12-18 21:36:39 +000013863SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13865$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013866for dir in $SRCDIRS; do
13867 if test ! -d $dir; then
13868 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013869 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013870done
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13872$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013873
Guido van Rossum627b2d71993-12-24 10:39:16 +000013874# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013875ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013876
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013877ac_config_files="$ac_config_files Modules/ld_so_aix"
13878
Martin v. Löwis11437992002-04-12 09:54:03 +000013879cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013880# This file is a shell script that caches the results of configure
13881# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013882# scripts and configure runs, see configure's option --config-cache.
13883# It is not useful on other systems. If it contains results you don't
13884# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013885#
Martin v. Löwis11437992002-04-12 09:54:03 +000013886# config.status only pays attention to the cache file if you give it
13887# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888#
Skip Montanaro6dead952003-09-25 14:50:04 +000013889# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013890# loading this file, other *unset* `ac_cv_foo' will be assigned the
13891# following values.
13892
13893_ACEOF
13894
Guido van Rossumf78abae1997-01-21 22:02:36 +000013895# The following way of writing the cache mishandles newlines in values,
13896# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013898# Ultrix sh set writes to stderr and can't be redirected directly,
13899# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900(
13901 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13902 eval ac_val=\$$ac_var
13903 case $ac_val in #(
13904 *${as_nl}*)
13905 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13907$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908 esac
13909 case $ac_var in #(
13910 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13912 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913 esac ;;
13914 esac
13915 done
13916
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13919 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 # `set' does not quote correctly, so add quotes: double-quote
13921 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013923 "s/'/'\\\\''/g;
13924 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 *)
13927 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930 esac |
13931 sort
13932) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13938 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13940 :end' >>confcache
13941if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13942 if test -w "$cache_file"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013943 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13945$as_echo "$as_me: updating cache $cache_file" >&6;}
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013946 if test ! -f "$cache_file" || test -h "$cache_file"; then
13947 cat confcache >"$cache_file"
13948 else
13949 case $cache_file in #(
13950 */* | ?:*)
13951 mv -f confcache "$cache_file"$$ &&
13952 mv -f "$cache_file"$$ "$cache_file" ;; #(
13953 *)
13954 mv -f confcache "$cache_file" ;;
13955 esac
13956 fi
13957 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013958 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13960$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013961 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013962fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013963rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013964
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013965test "x$prefix" = xNONE && prefix=$ac_default_prefix
13966# Let make expand exec_prefix.
13967test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013968
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013969DEFS=-DHAVE_CONFIG_H
13970
Skip Montanaro6dead952003-09-25 14:50:04 +000013971ac_libobjs=
13972ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013973U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013974for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13975 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13979 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13981 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013982done
13983LIBOBJS=$ac_libobjs
13984
13985LTLIBOBJS=$ac_ltlibobjs
13986
13987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020013990: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013991ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013992ac_clean_files_save=$ac_clean_files
13993ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13995$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13996as_write_fail=0
13997cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013998#! $SHELL
13999# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014000# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014001# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014002# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014003
Martin v. Löwis11437992002-04-12 09:54:03 +000014004debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014005ac_cs_recheck=false
14006ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008SHELL=\${CONFIG_SHELL-$SHELL}
14009export SHELL
14010_ASEOF
14011cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14012## -------------------- ##
14013## M4sh Initialization. ##
14014## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016# Be more Bourne compatible
14017DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014019 emulate sh
14020 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014021 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014022 # is contrary to our usage. Disable this feature.
14023 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014025else
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 case `(set -o) 2>/dev/null` in #(
14027 *posix*) :
14028 set -o posix ;; #(
14029 *) :
14030 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014032fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014033
14034
Matthias Kloseb9621712010-04-24 17:59:49 +000014035as_nl='
14036'
14037export as_nl
14038# Printing a long string crashes Solaris 7 /usr/bin/printf.
14039as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14040as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14041as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14042# Prefer a ksh shell builtin over an external printf program on Solaris,
14043# but without wasting forks for bash or zsh.
14044if test -z "$BASH_VERSION$ZSH_VERSION" \
14045 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14046 as_echo='print -r --'
14047 as_echo_n='print -rn --'
14048elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14049 as_echo='printf %s\n'
14050 as_echo_n='printf %s'
14051else
14052 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14053 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14054 as_echo_n='/usr/ucb/echo -n'
14055 else
14056 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14057 as_echo_n_body='eval
14058 arg=$1;
14059 case $arg in #(
14060 *"$as_nl"*)
14061 expr "X$arg" : "X\\(.*\\)$as_nl";
14062 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14063 esac;
14064 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14065 '
14066 export as_echo_n_body
14067 as_echo_n='sh -c $as_echo_n_body as_echo'
14068 fi
14069 export as_echo_body
14070 as_echo='sh -c $as_echo_body as_echo'
14071fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014072
14073# The user is always right.
14074if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 PATH_SEPARATOR=:
14076 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14077 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14078 PATH_SEPARATOR=';'
14079 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082
14083# IFS
14084# We need space, tab and new line, in precisely that order. Quoting is
14085# there to prevent editors from complaining about space-tab.
14086# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14087# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088IFS=" "" $as_nl"
14089
14090# Find who we are. Look in the path if we contain no directory separator.
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014091as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014092case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093 *[\\/]* ) as_myself=$0 ;;
14094 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014095for as_dir in $PATH
14096do
14097 IFS=$as_save_IFS
14098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014099 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14100 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014101IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103 ;;
14104esac
14105# We did not find ourselves, most probably we were run as `sh COMMAND'
14106# in which case we are not to be found in the path.
14107if test "x$as_myself" = x; then
14108 as_myself=$0
14109fi
14110if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14112 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113fi
14114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115# Unset variables that we do not need and which cause bugs (e.g. in
14116# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14117# suppresses any "Segmentation fault" message there. '((' could
14118# trigger a bug in pdksh 5.2.14.
14119for as_var in BASH_ENV ENV MAIL MAILPATH
14120do eval test x\${$as_var+set} = xset \
14121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122done
14123PS1='$ '
14124PS2='> '
14125PS4='+ '
14126
14127# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014128LC_ALL=C
14129export LC_ALL
14130LANGUAGE=C
14131export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132
Matthias Kloseb9621712010-04-24 17:59:49 +000014133# CDPATH.
14134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14135
14136
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014137# as_fn_error STATUS ERROR [LINENO LOG_FD]
14138# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014139# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14140# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014141# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014142as_fn_error ()
14143{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014144 as_status=$1; test $as_status -eq 0 && as_status=1
14145 if test "$4"; then
14146 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14147 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014149 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 as_fn_exit $as_status
14151} # as_fn_error
14152
14153
14154# as_fn_set_status STATUS
14155# -----------------------
14156# Set $? to STATUS, without forking.
14157as_fn_set_status ()
14158{
14159 return $1
14160} # as_fn_set_status
14161
14162# as_fn_exit STATUS
14163# -----------------
14164# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14165as_fn_exit ()
14166{
14167 set +e
14168 as_fn_set_status $1
14169 exit $1
14170} # as_fn_exit
14171
14172# as_fn_unset VAR
14173# ---------------
14174# Portably unset VAR.
14175as_fn_unset ()
14176{
14177 { eval $1=; unset $1;}
14178}
14179as_unset=as_fn_unset
14180# as_fn_append VAR VALUE
14181# ----------------------
14182# Append the text in VALUE to the end of the definition contained in VAR. Take
14183# advantage of any shell optimizations that allow amortized linear growth over
14184# repeated appends, instead of the typical quadratic growth present in naive
14185# implementations.
14186if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14187 eval 'as_fn_append ()
14188 {
14189 eval $1+=\$2
14190 }'
14191else
14192 as_fn_append ()
14193 {
14194 eval $1=\$$1\$2
14195 }
14196fi # as_fn_append
14197
14198# as_fn_arith ARG...
14199# ------------------
14200# Perform arithmetic evaluation on the ARGs, and store the result in the
14201# global $as_val. Take advantage of shells that can avoid forks. The arguments
14202# must be portable across $(()) and expr.
14203if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14204 eval 'as_fn_arith ()
14205 {
14206 as_val=$(( $* ))
14207 }'
14208else
14209 as_fn_arith ()
14210 {
14211 as_val=`expr "$@" || test $? -eq 1`
14212 }
14213fi # as_fn_arith
14214
14215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216if expr a : '\(a\)' >/dev/null 2>&1 &&
14217 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14218 as_expr=expr
14219else
14220 as_expr=false
14221fi
14222
14223if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14224 as_basename=basename
14225else
14226 as_basename=false
14227fi
14228
Matthias Kloseb9621712010-04-24 17:59:49 +000014229if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14230 as_dirname=dirname
14231else
14232 as_dirname=false
14233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235as_me=`$as_basename -- "$0" ||
14236$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14237 X"$0" : 'X\(//\)$' \| \
14238 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014239$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240 sed '/^.*\/\([^/][^/]*\)\/*$/{
14241 s//\1/
14242 q
14243 }
14244 /^X\/\(\/\/\)$/{
14245 s//\1/
14246 q
14247 }
14248 /^X\/\(\/\).*/{
14249 s//\1/
14250 q
14251 }
14252 s/.*/./; q'`
14253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254# Avoid depending upon Character Ranges.
14255as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14256as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14257as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14258as_cr_digits='0123456789'
14259as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260
14261ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014262case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 xy) ECHO_C='\c';;
14267 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14268 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014269 esac;;
14270*)
14271 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014273
Martin v. Löwis11437992002-04-12 09:54:03 +000014274rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014275if test -d conf$$.dir; then
14276 rm -f conf$$.dir/conf$$.file
14277else
14278 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014279 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014281if (echo >conf$$.file) 2>/dev/null; then
14282 if ln -s conf$$.file conf$$ 2>/dev/null; then
14283 as_ln_s='ln -s'
14284 # ... but there are two gotchas:
14285 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14286 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14287 # In both cases, we have to default to `cp -p'.
14288 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14289 as_ln_s='cp -p'
14290 elif ln conf$$.file conf$$ 2>/dev/null; then
14291 as_ln_s=ln
14292 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014293 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014294 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014295else
14296 as_ln_s='cp -p'
14297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014298rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14299rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
Matthias Kloseb9621712010-04-24 17:59:49 +000014301
14302# as_fn_mkdir_p
14303# -------------
14304# Create "$as_dir" as a directory, including parents if necessary.
14305as_fn_mkdir_p ()
14306{
14307
14308 case $as_dir in #(
14309 -*) as_dir=./$as_dir;;
14310 esac
14311 test -d "$as_dir" || eval $as_mkdir_p || {
14312 as_dirs=
14313 while :; do
14314 case $as_dir in #(
14315 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14316 *) as_qdir=$as_dir;;
14317 esac
14318 as_dirs="'$as_qdir' $as_dirs"
14319 as_dir=`$as_dirname -- "$as_dir" ||
14320$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14321 X"$as_dir" : 'X\(//\)[^/]' \| \
14322 X"$as_dir" : 'X\(//\)$' \| \
14323 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14324$as_echo X"$as_dir" |
14325 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14326 s//\1/
14327 q
14328 }
14329 /^X\(\/\/\)[^/].*/{
14330 s//\1/
14331 q
14332 }
14333 /^X\(\/\/\)$/{
14334 s//\1/
14335 q
14336 }
14337 /^X\(\/\).*/{
14338 s//\1/
14339 q
14340 }
14341 s/.*/./; q'`
14342 test -d "$as_dir" && break
14343 done
14344 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014345 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014346
14347
14348} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014349if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014351else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014352 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014353 as_mkdir_p=false
14354fi
14355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014356if test -x / >/dev/null 2>&1; then
14357 as_test_x='test -x'
14358else
14359 if ls -dL / >/dev/null 2>&1; then
14360 as_ls_L_option=L
14361 else
14362 as_ls_L_option=
14363 fi
14364 as_test_x='
14365 eval sh -c '\''
14366 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 case $1 in #(
14370 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373 ???[sx]*):;;*)false;;esac;fi
14374 '\'' sh
14375 '
14376fi
14377as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
14379# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014380as_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 +000014381
14382# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014383as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014384
14385
Martin v. Löwis11437992002-04-12 09:54:03 +000014386exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014387## ----------------------------------- ##
14388## Main body of $CONFIG_STATUS script. ##
14389## ----------------------------------- ##
14390_ASEOF
14391test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
Matthias Kloseb9621712010-04-24 17:59:49 +000014393cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14394# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014395# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396# values after options handling.
14397ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014398This file was extended by python $as_me 3.3, which was
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014399generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014400
14401 CONFIG_FILES = $CONFIG_FILES
14402 CONFIG_HEADERS = $CONFIG_HEADERS
14403 CONFIG_LINKS = $CONFIG_LINKS
14404 CONFIG_COMMANDS = $CONFIG_COMMANDS
14405 $ $0 $@
14406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407on `(hostname || uname -n) 2>/dev/null | sed 1q`
14408"
14409
Martin v. Löwis11437992002-04-12 09:54:03 +000014410_ACEOF
14411
Matthias Kloseb9621712010-04-24 17:59:49 +000014412case $ac_config_files in *"
14413"*) set x $ac_config_files; shift; ac_config_files=$*;;
14414esac
14415
14416case $ac_config_headers in *"
14417"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14418esac
14419
14420
14421cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014422# Files that config.status was made for.
Benjamin Peterson94b580d2011-08-02 17:30:04 -050014423config_files="$ac_config_files"
14424config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014427
Matthias Kloseb9621712010-04-24 17:59:49 +000014428cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014429ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014430\`$as_me' instantiates files and other configuration actions
14431from templates according to the current configuration. Unless the files
14432and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
14436 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 --config print configuration, then exit
14439 -q, --quiet, --silent
14440 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014441 -d, --debug don't remove temporary files
14442 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 --file=FILE[:TEMPLATE]
14444 instantiate the configuration file FILE
14445 --header=FILE[:TEMPLATE]
14446 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014447
14448Configuration files:
14449$config_files
14450
14451Configuration headers:
14452$config_headers
14453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014457cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14458ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014459ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014460python config.status 3.3
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014461configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014463
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014464Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014465This config.status script is free software; the Free Software Foundation
14466gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467
14468ac_pwd='$ac_pwd'
14469srcdir='$srcdir'
14470INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014471test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014472_ACEOF
14473
Matthias Kloseb9621712010-04-24 17:59:49 +000014474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14475# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014476ac_need_defaults=:
14477while test $# != 0
14478do
14479 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014480 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14482 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014483 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014485 --*=)
14486 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14487 ac_optarg=
14488 ac_shift=:
14489 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014491 ac_option=$1
14492 ac_optarg=$2
14493 ac_shift=shift
14494 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 esac
14496
Skip Montanaro6dead952003-09-25 14:50:04 +000014497 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014499 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14500 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 $as_echo "$ac_cs_version"; exit ;;
14503 --config | --confi | --conf | --con | --co | --c )
14504 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 debug=: ;;
14507 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014508 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 case $ac_optarg in
14510 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014511 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 esac
14513 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014514 ac_need_defaults=false;;
14515 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014516 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 case $ac_optarg in
14518 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14519 esac
14520 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522 --he | --h)
14523 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014524 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014525Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14529 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14530 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014531
14532 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014533 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014534Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014538
14539 esac
14540 shift
14541done
14542
Skip Montanaro6dead952003-09-25 14:50:04 +000014543ac_configure_extra_args=
14544
14545if $ac_cs_silent; then
14546 exec 6>/dev/null
14547 ac_configure_extra_args="$ac_configure_extra_args --silent"
14548fi
14549
14550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014552if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14554 shift
14555 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14556 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014559fi
14560
Martin v. Löwis11437992002-04-12 09:54:03 +000014561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563exec 5>>config.log
14564{
14565 echo
14566 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14567## Running $as_me. ##
14568_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
Matthias Kloseb9621712010-04-24 17:59:49 +000014576cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577
14578# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014579for ac_config_target in $ac_config_targets
14580do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581 case $ac_config_target in
14582 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14583 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14584 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014585 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14586 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14588 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014589 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014590 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014592 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014593 esac
14594done
14595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596
Martin v. Löwis11437992002-04-12 09:54:03 +000014597# If the user did not use the arguments to specify the items to instantiate,
14598# then the envvar interface is used. Set only those that are not.
14599# We use the long form for the default assignment because of an extremely
14600# bizarre bug on SunOS 4.1.3.
14601if $ac_need_defaults; then
14602 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14603 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14604fi
14605
Skip Montanaro6dead952003-09-25 14:50:04 +000014606# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014608# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609# Hook for its removal unless debugging.
14610# Note that there is a small window in which the directory will not be cleaned:
14611# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014612$debug ||
14613{
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014614 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615 trap 'exit_status=$?
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014616 : "${ac_tmp:=$tmp}"
14617 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014620}
Martin v. Löwis11437992002-04-12 09:54:03 +000014621# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014622
Martin v. Löwis11437992002-04-12 09:54:03 +000014623{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014624 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014625 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014626} ||
14627{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014628 tmp=./conf$$-$RANDOM
14629 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014630} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014631ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633# Set up the scripts for CONFIG_FILES section.
14634# No need to generate them if there are no CONFIG_FILES.
14635# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638
14639ac_cr=`echo X | tr X '\015'`
14640# On cygwin, bash can eat \r inside `` if the user requested igncr.
14641# But we know of no other shell where ac_cr would be empty at this
14642# point, so we can use a bashism as a fallback.
14643if test "x$ac_cr" = x; then
14644 eval ac_cr=\$\'\\r\'
14645fi
14646ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14647if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014648 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014649else
14650 ac_cs_awk_cr=$ac_cr
14651fi
14652
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014653echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014654_ACEOF
14655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656
Matthias Kloseb9621712010-04-24 17:59:49 +000014657{
14658 echo "cat >conf$$subs.awk <<_ACEOF" &&
14659 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14660 echo "_ACEOF"
14661} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014662 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14663ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664ac_delim='%!_!# '
14665for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014667 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14670 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671 break
14672 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014673 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 else
14675 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677done
Matthias Kloseb9621712010-04-24 17:59:49 +000014678rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014679
Matthias Kloseb9621712010-04-24 17:59:49 +000014680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014681cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014683sed -n '
14684h
14685s/^/S["/; s/!.*/"]=/
14686p
14687g
14688s/^[^!]*!//
14689:repl
14690t repl
14691s/'"$ac_delim"'$//
14692t delim
14693:nl
14694h
14695s/\(.\{148\}\)..*/\1/
14696t more1
14697s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14698p
14699n
14700b repl
14701:more1
14702s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14703p
14704g
14705s/.\{148\}//
14706t nl
14707:delim
14708h
14709s/\(.\{148\}\)..*/\1/
14710t more2
14711s/["\\]/\\&/g; s/^/"/; s/$/"/
14712p
14713b
14714:more2
14715s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14716p
14717g
14718s/.\{148\}//
14719t delim
14720' <conf$$subs.awk | sed '
14721/^[^""]/{
14722 N
14723 s/\n//
14724}
14725' >>$CONFIG_STATUS || ac_write_fail=1
14726rm -f conf$$subs.awk
14727cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14728_ACAWK
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014729cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 for (key in S) S_is_set[key] = 1
14731 FS = ""
14732
14733}
14734{
14735 line = $ 0
14736 nfields = split(line, field, "@")
14737 substed = 0
14738 len = length(field[1])
14739 for (i = 2; i < nfields; i++) {
14740 key = field[i]
14741 keylen = length(key)
14742 if (S_is_set[key]) {
14743 value = S[key]
14744 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14745 len += length(value) + length(field[++i])
14746 substed = 1
14747 } else
14748 len += 1 + keylen
14749 }
14750
14751 print line
14752}
14753
14754_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14757if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14758 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14759else
14760 cat
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014761fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014762 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014763_ACEOF
14764
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014765# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14766# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767# trailing colons and then remove the whole line if VPATH becomes empty
14768# (actually we leave an empty line to preserve line numbers).
14769if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014770 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14771h
14772s///
14773s/^/:/
14774s/[ ]*$/:/
14775s/:\$(srcdir):/:/g
14776s/:\${srcdir}:/:/g
14777s/:@srcdir@:/:/g
14778s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014780x
14781s/\(=[ ]*\).*/\1/
14782G
14783s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784s/^[^=]*=[ ]*$//
14785}'
14786fi
14787
Matthias Kloseb9621712010-04-24 17:59:49 +000014788cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014789fi # test -n "$CONFIG_FILES"
14790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791# Set up the scripts for CONFIG_HEADERS section.
14792# No need to generate them if there are no CONFIG_HEADERS.
14793# This happens for instance with `./config.status Makefile'.
14794if test -n "$CONFIG_HEADERS"; then
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014795cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014796BEGIN {
14797_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798
Matthias Kloseb9621712010-04-24 17:59:49 +000014799# Transform confdefs.h into an awk script `defines.awk', embedded as
14800# here-document in config.status, that substitutes the proper values into
14801# config.h.in to produce config.h.
14802
14803# Create a delimiter string that does not exist in confdefs.h, to ease
14804# handling of long lines.
14805ac_delim='%!_!# '
14806for ac_last_try in false false :; do
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014807 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14808 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 break
14810 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014811 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 else
14813 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14814 fi
14815done
14816
14817# For the awk script, D is an array of macro values keyed by name,
14818# likewise P contains macro parameters if any. Preserve backslash
14819# newline sequences.
14820
14821ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14822sed -n '
14823s/.\{148\}/&'"$ac_delim"'/g
14824t rset
14825:rset
14826s/^[ ]*#[ ]*define[ ][ ]*/ /
14827t def
14828d
14829:def
14830s/\\$//
14831t bsnl
14832s/["\\]/\\&/g
14833s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14834D["\1"]=" \3"/p
14835s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14836d
14837:bsnl
14838s/["\\]/\\&/g
14839s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14840D["\1"]=" \3\\\\\\n"\\/p
14841t cont
14842s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14843t cont
14844d
14845:cont
14846n
14847s/.\{148\}/&'"$ac_delim"'/g
14848t clear
14849:clear
14850s/\\$//
14851t bsnlc
14852s/["\\]/\\&/g; s/^/"/; s/$/"/p
14853d
14854:bsnlc
14855s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14856b cont
14857' <confdefs.h | sed '
14858s/'"$ac_delim"'/"\\\
14859"/g' >>$CONFIG_STATUS || ac_write_fail=1
14860
14861cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14862 for (key in D) D_is_set[key] = 1
14863 FS = ""
14864}
14865/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14866 line = \$ 0
14867 split(line, arg, " ")
14868 if (arg[1] == "#") {
14869 defundef = arg[2]
14870 mac1 = arg[3]
14871 } else {
14872 defundef = substr(arg[1], 2)
14873 mac1 = arg[2]
14874 }
14875 split(mac1, mac2, "(") #)
14876 macro = mac2[1]
14877 prefix = substr(line, 1, index(line, defundef) - 1)
14878 if (D_is_set[macro]) {
14879 # Preserve the white space surrounding the "#".
14880 print prefix "define", macro P[macro] D[macro]
14881 next
14882 } else {
14883 # Replace #undef with comments. This is necessary, for example,
14884 # in the case of _POSIX_SOURCE, which is predefined and required
14885 # on some systems where configure will not decide to define it.
14886 if (defundef == "undef") {
14887 print "/*", prefix defundef, macro, "*/"
14888 next
14889 }
14890 }
14891}
14892{ print }
14893_ACAWK
14894_ACEOF
14895cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014896 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014897fi # test -n "$CONFIG_HEADERS"
14898
14899
14900eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14901shift
14902for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903do
14904 case $ac_tag in
14905 :[FHLC]) ac_mode=$ac_tag; continue;;
14906 esac
14907 case $ac_mode$ac_tag in
14908 :[FHL]*:*);;
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014909 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910 :[FH]-) ac_tag=-:-;;
14911 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14912 esac
14913 ac_save_IFS=$IFS
14914 IFS=:
14915 set x $ac_tag
14916 IFS=$ac_save_IFS
14917 shift
14918 ac_file=$1
14919 shift
14920
14921 case $ac_mode in
14922 :L) ac_source=$1;;
14923 :[FH])
14924 ac_file_inputs=
14925 for ac_f
14926 do
14927 case $ac_f in
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014928 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 *) # Look for the file first in the build tree, then in the source tree
14930 # (if the path is not absolute). The absolute path cannot be DOS-style,
14931 # because $ac_f cannot contain `:'.
14932 test -f "$ac_f" ||
14933 case $ac_f in
14934 [\\/$]*) false;;
14935 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14936 esac ||
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014937 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14940 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 done
14942
14943 # Let's still pretend it is `configure' which instantiates (i.e., don't
14944 # use $as_me), people would be surprised to read:
14945 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 configure_input='Generated from '`
14947 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14948 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949 if test x"$ac_file" != x-; then
14950 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14952$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 # Neutralize special characters interpreted by sed in replacement strings.
14955 case $configure_input in #(
14956 *\&* | *\|* | *\\* )
14957 ac_sed_conf_input=`$as_echo "$configure_input" |
14958 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14959 *) ac_sed_conf_input=$configure_input;;
14960 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961
14962 case $ac_tag in
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020014963 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14964 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965 esac
14966 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 esac
14968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014970$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014971 X"$ac_file" : 'X\(//\)[^/]' \| \
14972 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014974$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14976 s//\1/
14977 q
14978 }
14979 /^X\(\/\/\)[^/].*/{
14980 s//\1/
14981 q
14982 }
14983 /^X\(\/\/\)$/{
14984 s//\1/
14985 q
14986 }
14987 /^X\(\/\).*/{
14988 s//\1/
14989 q
14990 }
14991 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 ac_builddir=.
14994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995case "$ac_dir" in
14996.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14997*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001 case $ac_top_builddir_sub in
15002 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15003 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15004 esac ;;
15005esac
15006ac_abs_top_builddir=$ac_pwd
15007ac_abs_builddir=$ac_pwd$ac_dir_suffix
15008# for backward compatibility:
15009ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015010
15011case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014 ac_top_srcdir=$ac_top_builddir_sub
15015 ac_abs_top_srcdir=$ac_pwd ;;
15016 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018 ac_top_srcdir=$srcdir
15019 ac_abs_top_srcdir=$srcdir ;;
15020 *) # Relative name.
15021 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15022 ac_top_srcdir=$ac_top_build_prefix$srcdir
15023 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015024esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015026
Martin v. Löwis11437992002-04-12 09:54:03 +000015027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 case $ac_mode in
15029 :F)
15030 #
15031 # CONFIG_FILE
15032 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015033
15034 case $INSTALL in
15035 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015038_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041# If the template does not know about datarootdir, expand it.
15042# FIXME: This hack should be removed a few years after 2.60.
15043ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015044ac_sed_dataroot='
15045/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046 p
15047 q
15048}
15049/@datadir@/p
15050/@docdir@/p
15051/@infodir@/p
15052/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015053/@mandir@/p'
15054case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055*datarootdir*) ac_datarootdir_seen=yes;;
15056*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15058$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015060cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061 ac_datarootdir_hack='
15062 s&@datadir@&$datadir&g
15063 s&@docdir@&$docdir&g
15064 s&@infodir@&$infodir&g
15065 s&@localedir@&$localedir&g
15066 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068esac
15069_ACEOF
15070
15071# Neutralize VPATH when `$srcdir' = `.'.
15072# Shell code in configure.ac might set extrasub.
15073# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15075ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015076$extrasub
15077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015078cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015079:t
15080/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015081s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015083s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084s&@srcdir@&$ac_srcdir&;t t
15085s&@abs_srcdir@&$ac_abs_srcdir&;t t
15086s&@top_srcdir@&$ac_top_srcdir&;t t
15087s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15088s&@builddir@&$ac_builddir&;t t
15089s&@abs_builddir@&$ac_abs_builddir&;t t
15090s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15091s&@INSTALL@&$ac_INSTALL&;t t
15092$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015093"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015094eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15095 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015098 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15099 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15100 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015102which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015103$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015104which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015105
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015106 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 case $ac_file in
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015108 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15109 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015110 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015111 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112 ;;
15113 :H)
15114 #
15115 # CONFIG_HEADER
15116 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 {
15119 $as_echo "/* $configure_input */" \
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015120 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15121 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015122 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015123 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15125$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 rm -f "$ac_file"
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015128 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015129 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 fi
15131 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015132 $as_echo "/* $configure_input */" \
Antoine Pitroud3b2aef2011-07-27 01:22:41 +020015133 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015134 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138
15139 esac
15140
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015141
15142 case $ac_file$ac_mode in
15143 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15144
15145 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015146done # for ac_tag
15147
Guido van Rossum627b2d71993-12-24 10:39:16 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015150_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015151ac_clean_files=$ac_clean_files_save
15152
Matthias Kloseb9621712010-04-24 17:59:49 +000015153test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015154 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015155
Martin v. Löwis11437992002-04-12 09:54:03 +000015156
15157# configure is writing to config.log, and then calls config.status.
15158# config.status does its own redirection, appending to config.log.
15159# Unfortunately, on DOS this fails, as config.log is still kept open
15160# by configure, so config.status won't be able to write to it; its
15161# output is simply discarded. So we exec the FD to /dev/null,
15162# effectively closing config.log, so it can be properly (re)opened and
15163# appended to by config.status. When coming back to configure, we
15164# need to make the FD available again.
15165if test "$no_create" != yes; then
15166 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015167 ac_config_status_args=
15168 test "$silent" = yes &&
15169 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015171 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 exec 5>>config.log
15173 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15174 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015175 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015176fi
15177if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15179$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015180fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015181
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015182
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015183echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015184if test ! -f Modules/Setup
15185then
15186 cp $srcdir/Modules/Setup.dist Modules/Setup
15187fi
15188
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015189echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015190if test ! -f Modules/Setup.local
15191then
15192 echo "# Edit this file for local setup changes" >Modules/Setup.local
15193fi
15194
15195echo "creating Makefile"
15196$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15197 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015198 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015199mv config.c Modules