blob: 4234a04022052a972fd3fe998b228099f292c2dc [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.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003# Generated by GNU Autoconf 2.67 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.
Matthias Kloseb9621712010-04-24 17:59:49 +000094case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000115fi
116
Matthias Kloseb9621712010-04-24 17:59:49 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000134
Matthias Kloseb9621712010-04-24 17:59:49 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140 emulate sh
141 NULLCMD=:
142 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143 # is contrary to our usage. Disable this feature.
144 alias -g '\${1+\"\$@\"}'='\"\$@\"'
145 setopt NO_GLOB_SUBST
146else
147 case \`(set -o) 2>/dev/null\` in #(
148 *posix*) :
149 set -o posix ;; #(
150 *) :
151 ;;
152esac
153fi
154"
155 as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169 exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177 if (eval "$as_required") 2>/dev/null; then :
178 as_have_required=yes
179else
180 as_have_required=no
181fi
182 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189 IFS=$as_save_IFS
190 test -z "$as_dir" && as_dir=.
191 as_found=:
192 case $as_dir in #(
193 /*)
194 for as_base in sh bash ksh sh5; do
195 # Try only shells that exist, to save several forks.
196 as_shell=$as_dir/$as_base
197 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 CONFIG_SHELL=$as_shell as_have_required=yes
200 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 break 2
202fi
203fi
204 done;;
205 esac
206 as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210 CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215 if test "x$CONFIG_SHELL" != x; then :
216 # We cannot yet assume a decent shell, so we have to provide a
217 # neutralization value for shells without unset; and this also
218 # works around shells that cannot unset nonexistent variables.
219 BASH_ENV=/dev/null
220 ENV=/dev/null
221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222 export CONFIG_SHELL
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500223 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000224fi
225
226 if test x$as_have_required = xno; then :
227 $as_echo "$0: This script requires a shell more modern than all"
228 $as_echo "$0: the shells that I found on your system."
229 if test x${ZSH_VERSION+set} = xset ; then
230 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232 else
233 $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: http://bugs.python.org/ about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238 fi
239 exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257 { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266 return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274 set +e
275 as_fn_set_status $1
276 exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285 case $as_dir in #(
286 -*) as_dir=./$as_dir;;
287 esac
288 test -d "$as_dir" || eval $as_mkdir_p || {
289 as_dirs=
290 while :; do
291 case $as_dir in #(
292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293 *) as_qdir=$as_dir;;
294 esac
295 as_dirs="'$as_qdir' $as_dirs"
296 as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298 X"$as_dir" : 'X\(//\)[^/]' \| \
299 X"$as_dir" : 'X\(//\)$' \| \
300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303 s//\1/
304 q
305 }
306 /^X\(\/\/\)[^/].*/{
307 s//\1/
308 q
309 }
310 /^X\(\/\/\)$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\).*/{
315 s//\1/
316 q
317 }
318 s/.*/./; q'`
319 test -d "$as_dir" && break
320 done
321 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333 eval 'as_fn_append ()
334 {
335 eval $1+=\$2
336 }'
337else
338 as_fn_append ()
339 {
340 eval $1=\$$1\$2
341 }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350 eval 'as_fn_arith ()
351 {
352 as_val=$(( $* ))
353 }'
354else
355 as_fn_arith ()
356 {
357 as_val=`expr "$@" || test $? -eq 1`
358 }
359fi # as_fn_arith
360
361
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200366# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000367as_fn_error ()
368{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200369 as_status=$1; test $as_status -eq 0 && as_status=1
370 if test "$4"; then
371 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000373 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000375 as_fn_exit $as_status
376} # as_fn_error
377
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000378if expr a : '\(a\)' >/dev/null 2>&1 &&
379 test "X`expr 00001 : '.*\(...\)'`" = X001; then
380 as_expr=expr
381else
382 as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386 as_basename=basename
387else
388 as_basename=false
389fi
390
Matthias Kloseb9621712010-04-24 17:59:49 +0000391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392 as_dirname=dirname
393else
394 as_dirname=false
395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000396
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399 X"$0" : 'X\(//\)$' \| \
400 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000401$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000402 sed '/^.*\/\([^/][^/]*\)\/*$/{
403 s//\1/
404 q
405 }
406 /^X\/\(\/\/\)$/{
407 s//\1/
408 q
409 }
410 /^X\/\(\/\).*/{
411 s//\1/
412 q
413 }
414 s/.*/./; q'`
415
Matthias Kloseb9621712010-04-24 17:59:49 +0000416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424 as_lineno_1=$LINENO as_lineno_1a=$LINENO
425 as_lineno_2=$LINENO as_lineno_2a=$LINENO
426 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000429 sed -n '
430 p
431 /[$]LINENO/=
432 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000434 s/[$]LINENO.*/&-/
435 t lineno
436 b
437 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 :loop
440 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000444 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445 { $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 +0000446
447 # Don't try to exec as it changes $[0], causing all sort of problems
448 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000449 # original and so on. Autoconf is especially sensitive to this).
450 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 # Exit status is that of the last command.
452 exit
453}
454
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000455ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000456case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000458 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000459 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000460 xy) ECHO_C='\c';;
461 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
462 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463 esac;;
464*)
465 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000467
Martin v. Löwis11437992002-04-12 09:54:03 +0000468rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if test -d conf$$.dir; then
470 rm -f conf$$.dir/conf$$.file
471else
472 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000473 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000474fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000475if (echo >conf$$.file) 2>/dev/null; then
476 if ln -s conf$$.file conf$$ 2>/dev/null; then
477 as_ln_s='ln -s'
478 # ... but there are two gotchas:
479 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481 # In both cases, we have to default to `cp -p'.
482 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483 as_ln_s='cp -p'
484 elif ln conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s=ln
486 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000489else
490 as_ln_s='cp -p'
491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000494
Skip Montanaro6dead952003-09-25 14:50:04 +0000495if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000497else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000498 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000499 as_mkdir_p=false
500fi
501
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000502if test -x / >/dev/null 2>&1; then
503 as_test_x='test -x'
504else
505 if ls -dL / >/dev/null 2>&1; then
506 as_ls_L_option=L
507 else
508 as_ls_L_option=
509 fi
510 as_test_x='
511 eval sh -c '\''
512 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000513 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000515 case $1 in #(
516 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000518 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000519 ???[sx]*):;;*)false;;esac;fi
520 '\'' sh
521 '
522fi
523as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000524
525# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000526as_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 +0000527
528# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000530
531
Matthias Kloseb9621712010-04-24 17:59:49 +0000532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000534
535# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
Martin v. Löwis11437992002-04-12 09:54:03 +0000540#
541# Initializations.
542#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000543ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000544ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000545ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000546LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000551
Martin v. Löwis11437992002-04-12 09:54:03 +0000552# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000553PACKAGE_NAME='python'
554PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000555PACKAGE_VERSION='3.3'
556PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000557PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000558PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560ac_unique_file="Include/object.h"
561# Factoring default headers for most tests.
562ac_includes_default="\
563#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000564#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# include <sys/types.h>
566#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000567#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000568# include <sys/stat.h>
569#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000570#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000571# include <stdlib.h>
572# include <stddef.h>
573#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# include <stdlib.h>
576# endif
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef HAVE_STRING_H
579# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <memory.h>
581# endif
582# include <string.h>
583#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000584#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000585# include <strings.h>
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000589#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000590#ifdef HAVE_STDINT_H
591# include <stdint.h>
592#endif
593#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <unistd.h>
595#endif"
596
Matthias Kloseb9621712010-04-24 17:59:49 +0000597ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000598SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000599THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000600SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000601LIBC
602LIBM
603HAVE_GETHOSTBYNAME
604HAVE_GETHOSTBYNAME_R
605HAVE_GETHOSTBYNAME_R_3_ARG
606HAVE_GETHOSTBYNAME_R_5_ARG
607HAVE_GETHOSTBYNAME_R_6_ARG
608LIBOBJS
609TRUE
610MACHDEP_OBJS
611DYNLOADFILE
612DLINCLDIR
613THREADOBJ
614LDLAST
615USE_THREAD_MODULE
616SIGNAL_OBJS
617USE_SIGNAL_MODULE
618LIBFFI_INCLUDEDIR
619PKG_CONFIG
620SHLIBS
621CFLAGSFORSHARED
622LINKFORSHARED
623CCSHARED
624BLDSHARED
625LDCXXSHARED
626LDSHARED
627SO
628LIBTOOL_CRUFT
629OTHER_LIBTOOL_OPT
630UNIVERSAL_ARCH_FLAGS
631BASECFLAGS
632OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000633ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000634LN
635INSTALL_DATA
636INSTALL_SCRIPT
637INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500638HAS_PYTHON
639DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000640ARFLAGS
641AR
642RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000643USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000644GNULD
645LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000646LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000647RUNSHARED
648INSTSONAME
649LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000650PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000651BLDLIBRARY
652DLLLIBRARY
653LDLIBRARY
654LIBRARY
655BUILDEXEEXT
656EGREP
657GREP
658CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200659NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000660MAINCC
661CXX
662OBJEXT
663EXEEXT
664ac_ct_CC
665CPPFLAGS
666LDFLAGS
667CFLAGS
668CC
669EXPORT_MACOSX_DEPLOYMENT_TARGET
670CONFIGURE_MACOSX_DEPLOYMENT_TARGET
671SGI_ABI
672MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000673FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000674FRAMEWORKUNIXTOOLSPREFIX
675FRAMEWORKALTINSTALLLAST
676FRAMEWORKALTINSTALLFIRST
677FRAMEWORKINSTALLLAST
678FRAMEWORKINSTALLFIRST
679PYTHONFRAMEWORKINSTALLDIR
680PYTHONFRAMEWORKPREFIX
681PYTHONFRAMEWORKDIR
682PYTHONFRAMEWORKIDENTIFIER
683PYTHONFRAMEWORK
684LIPO_32BIT_FLAGS
685ARCH_RUN_32BIT
686UNIVERSALSDK
687CONFIG_ARGS
688SOVERSION
689VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500690HAS_HG
691HGBRANCH
692HGTAG
693HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000694target_alias
695host_alias
696build_alias
697LIBS
698ECHO_T
699ECHO_N
700ECHO_C
701DEFS
702mandir
703localedir
704libdir
705psdir
706pdfdir
707dvidir
708htmldir
709infodir
710docdir
711oldincludedir
712includedir
713localstatedir
714sharedstatedir
715sysconfdir
716datadir
717datarootdir
718libexecdir
719sbindir
720bindir
721program_transform_name
722prefix
723exec_prefix
724PACKAGE_URL
725PACKAGE_BUGREPORT
726PACKAGE_STRING
727PACKAGE_VERSION
728PACKAGE_TARNAME
729PACKAGE_NAME
730PATH_SEPARATOR
731SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000732ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000733ac_user_opts='
734enable_option_checking
735enable_universalsdk
736with_universal_archs
737with_framework_name
738enable_framework
739with_gcc
740with_cxx_main
741with_suffix
742enable_shared
743enable_profiling
744with_pydebug
745with_libs
746with_system_expat
747with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000748enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000749with_dbmliborder
750with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000751with_threads
752with_thread
753enable_ipv6
754with_doc_strings
755with_tsc
756with_pymalloc
757with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000758with_fpectl
759with_libm
760with_libc
761enable_big_digits
762with_wide_unicode
763with_computed_gotos
764'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000765 ac_precious_vars='build_alias
766host_alias
767target_alias
768CC
769CFLAGS
770LDFLAGS
771LIBS
772CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200773CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774
Guido van Rossum627b2d71993-12-24 10:39:16 +0000775
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000777ac_init_help=
778ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000779ac_unrecognized_opts=
780ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781# The variables have the same names as the options, with
782# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000783cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786no_recursion=
787prefix=NONE
788program_prefix=NONE
789program_suffix=NONE
790program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000791silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795x_includes=NONE
796x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000797
798# Installation directory options.
799# These are left unexpanded so users can "make install exec_prefix=/foo"
800# and all the variables that are supposed to be based on exec_prefix
801# by default will actually change.
802# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804bindir='${exec_prefix}/bin'
805sbindir='${exec_prefix}/sbin'
806libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807datarootdir='${prefix}/share'
808datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000809sysconfdir='${prefix}/etc'
810sharedstatedir='${prefix}/com'
811localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812includedir='${prefix}/include'
813oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
815infodir='${datarootdir}/info'
816htmldir='${docdir}'
817dvidir='${docdir}'
818pdfdir='${docdir}'
819psdir='${docdir}'
820libdir='${exec_prefix}/lib'
821localedir='${datarootdir}/locale'
822mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000823
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000827do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828 # If the previous option needs an argument, assign it.
829 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831 ac_prev=
832 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000835 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200836 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
837 *=) ac_optarg= ;;
838 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841 # Accept the important Cygnus configure options, so we can diagnose typos.
842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_dashdash$ac_option in
844 --)
845 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847 -bindir | --bindir | --bindi | --bind | --bin | --bi)
848 ac_prev=bindir ;;
849 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851
852 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857 -cache-file | --cache-file | --cache-fil | --cache-fi \
858 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
859 ac_prev=cache_file ;;
860 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
861 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 cache_file=$ac_optarg ;;
863
864 --config-cache | -C)
865 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
873 | --dataroo | --dataro | --datar)
874 ac_prev=datarootdir ;;
875 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
876 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
877 datarootdir=$ac_optarg ;;
878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000880 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000882 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200883 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000884 ac_useropt_orig=$ac_useropt
885 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
886 case $ac_user_opts in
887 *"
888"enable_$ac_useropt"
889"*) ;;
890 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
891 ac_unrecognized_sep=', ';;
892 esac
893 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894
895 -docdir | --docdir | --docdi | --doc | --do)
896 ac_prev=docdir ;;
897 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
898 docdir=$ac_optarg ;;
899
900 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
901 ac_prev=dvidir ;;
902 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
903 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
905 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000906 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000908 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200909 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000910 ac_useropt_orig=$ac_useropt
911 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
912 case $ac_user_opts in
913 *"
914"enable_$ac_useropt"
915"*) ;;
916 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
917 ac_unrecognized_sep=', ';;
918 esac
919 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
922 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
923 | --exec | --exe | --ex)
924 ac_prev=exec_prefix ;;
925 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
926 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
927 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
930 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Obsolete; use --with-gas.
932 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 -help | --help | --hel | --he | -h)
935 ac_init_help=long ;;
936 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
937 ac_init_help=recursive ;;
938 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
939 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
941 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
947 ac_prev=htmldir ;;
948 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
949 | --ht=*)
950 htmldir=$ac_optarg ;;
951
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952 -includedir | --includedir | --includedi | --included | --include \
953 | --includ | --inclu | --incl | --inc)
954 ac_prev=includedir ;;
955 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
956 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -infodir | --infodir | --infodi | --infod | --info | --inf)
960 ac_prev=infodir ;;
961 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
964 -libdir | --libdir | --libdi | --libd)
965 ac_prev=libdir ;;
966 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
969 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
970 | --libexe | --libex | --libe)
971 ac_prev=libexecdir ;;
972 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
973 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -localedir | --localedir | --localedi | --localed | --locale)
977 ac_prev=localedir ;;
978 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
979 localedir=$ac_optarg ;;
980
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983 ac_prev=localstatedir ;;
984 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000985 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
989 ac_prev=mandir ;;
990 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Obsolete; use --without-fp.
995 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 no_create=yes ;;
1000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1002 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1003 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1006 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1007 | --oldin | --oldi | --old | --ol | --o)
1008 ac_prev=oldincludedir ;;
1009 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1010 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1011 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1015 ac_prev=prefix ;;
1016 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1020 | --program-pre | --program-pr | --program-p)
1021 ac_prev=program_prefix ;;
1022 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1023 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1027 | --program-suf | --program-su | --program-s)
1028 ac_prev=program_suffix ;;
1029 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1030 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-transform-name | --program-transform-name \
1034 | --program-transform-nam | --program-transform-na \
1035 | --program-transform-n | --program-transform- \
1036 | --program-transform | --program-transfor \
1037 | --program-transfo | --program-transf \
1038 | --program-trans | --program-tran \
1039 | --progr-tra | --program-tr | --program-t)
1040 ac_prev=program_transform_name ;;
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=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1051 ac_prev=pdfdir ;;
1052 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1053 pdfdir=$ac_optarg ;;
1054
1055 -psdir | --psdir | --psdi | --psd | --ps)
1056 ac_prev=psdir ;;
1057 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1058 psdir=$ac_optarg ;;
1059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1061 | -silent | --silent | --silen | --sile | --sil)
1062 silent=yes ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1065 ac_prev=sbindir ;;
1066 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1067 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1071 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1072 | --sharedst | --shareds | --shared | --share | --shar \
1073 | --sha | --sh)
1074 ac_prev=sharedstatedir ;;
1075 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1076 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1077 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1078 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 -site | --site | --sit)
1082 ac_prev=site ;;
1083 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1087 ac_prev=srcdir ;;
1088 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1092 | --syscon | --sysco | --sysc | --sys | --sy)
1093 ac_prev=sysconfdir ;;
1094 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1095 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1104 verbose=yes ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 -version | --version | --versio | --versi | --vers | -V)
1107 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001110 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001112 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001113 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001114 ac_useropt_orig=$ac_useropt
1115 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1116 case $ac_user_opts in
1117 *"
1118"with_$ac_useropt"
1119"*) ;;
1120 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1121 ac_unrecognized_sep=', ';;
1122 esac
1123 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
1125 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001128 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001129 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001130 ac_useropt_orig=$ac_useropt
1131 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132 case $ac_user_opts in
1133 *"
1134"with_$ac_useropt"
1135"*) ;;
1136 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1137 ac_unrecognized_sep=', ';;
1138 esac
1139 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 --x)
1142 # Obsolete; use --with-x.
1143 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
1145 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1146 | --x-incl | --x-inc | --x-in | --x-i)
1147 ac_prev=x_includes ;;
1148 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1149 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1153 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1154 ac_prev=x_libraries ;;
1155 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1156 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001159 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1160Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 ;;
1162
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 *=*)
1164 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1165 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 case $ac_envvar in #(
1167 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001168 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001170 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 export $ac_envvar ;;
1172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001178 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 ;;
1180
1181 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182done
1183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001186 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187fi
1188
Matthias Kloseb9621712010-04-24 17:59:49 +00001189if test -n "$ac_unrecognized_opts"; then
1190 case $enable_option_checking in
1191 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001192 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1194 esac
1195fi
1196
1197# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1199 datadir sysconfdir sharedstatedir localstatedir includedir \
1200 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1201 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 # Remove trailing slashes.
1205 case $ac_val in
1206 */ )
1207 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1208 eval $ac_var=\$ac_val;;
1209 esac
1210 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 [\\/$]* | ?:[\\/]* ) continue;;
1213 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001216done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217
Martin v. Löwis11437992002-04-12 09:54:03 +00001218# There might be people who depend on the old broken behavior: `$host'
1219# used to hold the argument of --host etc.
1220# FIXME: To remove some day.
1221build=$build_alias
1222host=$host_alias
1223target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# FIXME: To remove some day.
1226if test "x$host_alias" != x; then
1227 if test "x$build_alias" = x; then
1228 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001229 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1230 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 elif test "x$build_alias" != "x$host_alias"; then
1232 cross_compiling=yes
1233 fi
1234fi
1235
1236ac_tool_prefix=
1237test -n "$host_alias" && ac_tool_prefix=$host_alias-
1238
1239test "$silent" = yes && exec 6>/dev/null
1240
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242ac_pwd=`pwd` && test -n "$ac_pwd" &&
1243ac_ls_di=`ls -di .` &&
1244ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248
1249
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250# Find the source files, if location was not specified.
1251if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 ac_confdir=`$as_dirname -- "$as_myself" ||
1255$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1256 X"$as_myself" : 'X\(//\)[^/]' \| \
1257 X"$as_myself" : 'X\(//\)$' \| \
1258 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1259$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\/\)[^/].*/{
1265 s//\1/
1266 q
1267 }
1268 /^X\(\/\/\)$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\).*/{
1273 s//\1/
1274 q
1275 }
1276 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279 srcdir=..
1280 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281else
1282 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284if test ! -r "$srcdir/$ac_unique_file"; then
1285 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001286 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1289ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 pwd)`
1292# When building in place, set srcdir=.
1293if test "$ac_abs_confdir" = "$ac_pwd"; then
1294 srcdir=.
1295fi
1296# Remove unnecessary trailing slashes from srcdir.
1297# Double slashes in file names in object file debugging info
1298# mess up M-x gdb in Emacs.
1299case $srcdir in
1300*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1301esac
1302for ac_var in $ac_precious_vars; do
1303 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1304 eval ac_env_${ac_var}_value=\$${ac_var}
1305 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1306 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1307done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309#
1310# Report the --help message.
1311#
1312if test "$ac_init_help" = "long"; then
1313 # Omit some internal or obsolete options to make the list less imposing.
1314 # This message is too long to be a string in the A/UX 3.1 sh.
1315 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001316\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318Usage: $0 [OPTION]... [VAR=VALUE]...
1319
1320To assign environment variables (e.g., CC, CFLAGS...), specify them as
1321VAR=VALUE. See below for descriptions of some of the useful variables.
1322
1323Defaults for the options are specified in brackets.
1324
1325Configuration:
1326 -h, --help display this help and exit
1327 --help=short display options specific to this package
1328 --help=recursive display the short help of all the included packages
1329 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001331 --cache-file=FILE cache test results in FILE [disabled]
1332 -C, --config-cache alias for \`--cache-file=config.cache'
1333 -n, --no-create do not create output files
1334 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1335
Martin v. Löwis11437992002-04-12 09:54:03 +00001336Installation directories:
1337 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342By default, \`make install' will install all the files in
1343\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1344an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1345for instance \`--prefix=\$HOME'.
1346
1347For better control, use the options below.
1348
1349Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 --bindir=DIR user executables [EPREFIX/bin]
1351 --sbindir=DIR system admin executables [EPREFIX/sbin]
1352 --libexecdir=DIR program executables [EPREFIX/libexec]
1353 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1354 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1355 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1356 --libdir=DIR object code libraries [EPREFIX/lib]
1357 --includedir=DIR C header files [PREFIX/include]
1358 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1359 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1360 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1361 --infodir=DIR info documentation [DATAROOTDIR/info]
1362 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1363 --mandir=DIR man documentation [DATAROOTDIR/man]
1364 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1365 --htmldir=DIR html documentation [DOCDIR]
1366 --dvidir=DIR dvi documentation [DOCDIR]
1367 --pdfdir=DIR pdf documentation [DOCDIR]
1368 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001369_ACEOF
1370
1371 cat <<\_ACEOF
1372_ACEOF
1373fi
1374
1375if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001376 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001377 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001378 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 cat <<\_ACEOF
1380
1381Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1384 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001385 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001386 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001387 --enable-framework[=INSTALLDIR]
1388 Build (MacOSX|Darwin) framework
1389 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001390 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001391 --enable-loadable-sqlite-extensions
1392 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001393 --enable-ipv6 Enable ipv6 (with ipv4) support
1394 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001395 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398Optional Packages:
1399 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1400 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001401 --with-universal-archs=ARCH
1402 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001403 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001404 --with-framework-name=FRAMEWORK
1405 specify an alternate name of the framework built
1406 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001408 --with-cxx-main=<compiler>
1409 compile main() and link python executable with C++
1410 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --with-suffix=.exe set executable suffix
1412 --with-pydebug build with Py_DEBUG defined
1413 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001414 --with-system-expat build pyexpat module using an installed expat
1415 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001417 --with-dbmliborder=db1:db2:...
1418 order to check db backends for dbm. Valid value is a
1419 colon separated string with the backend names
1420 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with(out)-threads[=DIRECTORY]
1423 disable/enable thread support
1424 --with(out)-thread[=DIRECTORY]
1425 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001427 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001429 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with-fpectl enable SIGFPE catching
1431 --with-libm=STRING math library
1432 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001433 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001434 --with(out)-computed-gotos
1435 Use computed gotos in evaluation loop (enabled by
1436 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438Some influential environment variables:
1439 CC C compiler command
1440 CFLAGS C compiler flags
1441 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1442 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001445 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 CPP C preprocessor
1447
1448Use these variables to override the choices made by `configure' or to help
1449it to find libraries and programs with nonstandard names/locations.
1450
Georg Brandle2e15612009-05-20 18:25:10 +00001451Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001454fi
1455
1456if test "$ac_init_help" = "recursive"; then
1457 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 test -d "$ac_dir" ||
1460 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1461 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 ac_builddir=.
1463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464case "$ac_dir" in
1465.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1466*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001468 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001469 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 case $ac_top_builddir_sub in
1471 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1472 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1473 esac ;;
1474esac
1475ac_abs_top_builddir=$ac_pwd
1476ac_abs_builddir=$ac_pwd$ac_dir_suffix
1477# for backward compatibility:
1478ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001479
1480case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 ac_top_srcdir=$ac_top_builddir_sub
1484 ac_abs_top_srcdir=$ac_pwd ;;
1485 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 ac_top_srcdir=$srcdir
1488 ac_abs_top_srcdir=$srcdir ;;
1489 *) # Relative name.
1490 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1491 ac_top_srcdir=$ac_top_build_prefix$srcdir
1492 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001493esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 cd "$ac_dir" || { ac_status=$?; continue; }
1497 # Check for guested configure.
1498 if test -f "$ac_srcdir/configure.gnu"; then
1499 echo &&
1500 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1501 elif test -f "$ac_srcdir/configure"; then
1502 echo &&
1503 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001505 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 fi || ac_status=$?
1507 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 done
1509fi
1510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001512if $ac_init_version; then
1513 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001514python configure 3.3
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001515generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001516
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001517Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518This configure script is free software; the Free Software Foundation
1519gives unlimited permission to copy, distribute and modify it.
1520_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001523
1524## ------------------------ ##
1525## Autoconf initialization. ##
1526## ------------------------ ##
1527
1528# ac_fn_c_try_compile LINENO
1529# --------------------------
1530# Try to compile conftest.$ac_ext, and return whether this succeeded.
1531ac_fn_c_try_compile ()
1532{
1533 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1534 rm -f conftest.$ac_objext
1535 if { { ac_try="$ac_compile"
1536case "(($ac_try" in
1537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1538 *) ac_try_echo=$ac_try;;
1539esac
1540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1541$as_echo "$ac_try_echo"; } >&5
1542 (eval "$ac_compile") 2>conftest.err
1543 ac_status=$?
1544 if test -s conftest.err; then
1545 grep -v '^ *+' conftest.err >conftest.er1
1546 cat conftest.er1 >&5
1547 mv -f conftest.er1 conftest.err
1548 fi
1549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1550 test $ac_status = 0; } && {
1551 test -z "$ac_c_werror_flag" ||
1552 test ! -s conftest.err
1553 } && test -s conftest.$ac_objext; then :
1554 ac_retval=0
1555else
1556 $as_echo "$as_me: failed program was:" >&5
1557sed 's/^/| /' conftest.$ac_ext >&5
1558
1559 ac_retval=1
1560fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001561 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001562 as_fn_set_status $ac_retval
1563
1564} # ac_fn_c_try_compile
1565
Matthias Kloseb9621712010-04-24 17:59:49 +00001566# ac_fn_c_try_link LINENO
1567# -----------------------
1568# Try to link conftest.$ac_ext, and return whether this succeeded.
1569ac_fn_c_try_link ()
1570{
1571 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1572 rm -f conftest.$ac_objext conftest$ac_exeext
1573 if { { ac_try="$ac_link"
1574case "(($ac_try" in
1575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1576 *) ac_try_echo=$ac_try;;
1577esac
1578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1579$as_echo "$ac_try_echo"; } >&5
1580 (eval "$ac_link") 2>conftest.err
1581 ac_status=$?
1582 if test -s conftest.err; then
1583 grep -v '^ *+' conftest.err >conftest.er1
1584 cat conftest.er1 >&5
1585 mv -f conftest.er1 conftest.err
1586 fi
1587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1588 test $ac_status = 0; } && {
1589 test -z "$ac_c_werror_flag" ||
1590 test ! -s conftest.err
1591 } && test -s conftest$ac_exeext && {
1592 test "$cross_compiling" = yes ||
1593 $as_test_x conftest$ac_exeext
1594 }; then :
1595 ac_retval=0
1596else
1597 $as_echo "$as_me: failed program was:" >&5
1598sed 's/^/| /' conftest.$ac_ext >&5
1599
1600 ac_retval=1
1601fi
1602 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1603 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1604 # interfere with the next link command; also delete a directory that is
1605 # left behind by Apple's compiler. We do this before executing the actions.
1606 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001607 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 as_fn_set_status $ac_retval
1609
1610} # ac_fn_c_try_link
1611
Matthias Kloseb9621712010-04-24 17:59:49 +00001612# ac_fn_c_try_cpp LINENO
1613# ----------------------
1614# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1615ac_fn_c_try_cpp ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1618 if { { ac_try="$ac_cpp conftest.$ac_ext"
1619case "(($ac_try" in
1620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1621 *) ac_try_echo=$ac_try;;
1622esac
1623eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1624$as_echo "$ac_try_echo"; } >&5
1625 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1626 ac_status=$?
1627 if test -s conftest.err; then
1628 grep -v '^ *+' conftest.err >conftest.er1
1629 cat conftest.er1 >&5
1630 mv -f conftest.er1 conftest.err
1631 fi
1632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001633 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1635 test ! -s conftest.err
1636 }; then :
1637 ac_retval=0
1638else
1639 $as_echo "$as_me: failed program was:" >&5
1640sed 's/^/| /' conftest.$ac_ext >&5
1641
1642 ac_retval=1
1643fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001644 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001645 as_fn_set_status $ac_retval
1646
1647} # ac_fn_c_try_cpp
1648
1649# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1650# -------------------------------------------------------
1651# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1652# the include files in INCLUDES and setting the cache variable VAR
1653# accordingly.
1654ac_fn_c_check_header_mongrel ()
1655{
1656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001657 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1659$as_echo_n "checking for $2... " >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001660if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001661 $as_echo_n "(cached) " >&6
1662fi
1663eval ac_res=\$$3
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1665$as_echo "$ac_res" >&6; }
1666else
1667 # Is the header compilable?
1668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1669$as_echo_n "checking $2 usability... " >&6; }
1670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1671/* end confdefs.h. */
1672$4
1673#include <$2>
1674_ACEOF
1675if ac_fn_c_try_compile "$LINENO"; then :
1676 ac_header_compiler=yes
1677else
1678 ac_header_compiler=no
1679fi
1680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1682$as_echo "$ac_header_compiler" >&6; }
1683
1684# Is the header present?
1685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1686$as_echo_n "checking $2 presence... " >&6; }
1687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1688/* end confdefs.h. */
1689#include <$2>
1690_ACEOF
1691if ac_fn_c_try_cpp "$LINENO"; then :
1692 ac_header_preproc=yes
1693else
1694 ac_header_preproc=no
1695fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001696rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1698$as_echo "$ac_header_preproc" >&6; }
1699
1700# So? What about this header?
1701case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1702 yes:no: )
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1704$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1706$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1707 ;;
1708 no:yes:* )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1710$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1712$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1714$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1716$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1718$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001719( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001720## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001721## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001722 ) | sed "s/^/$as_me: WARNING: /" >&2
1723 ;;
1724esac
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1726$as_echo_n "checking for $2... " >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001727if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 $as_echo_n "(cached) " >&6
1729else
1730 eval "$3=\$ac_header_compiler"
1731fi
1732eval ac_res=\$$3
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1734$as_echo "$ac_res" >&6; }
1735fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001736 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001737
1738} # ac_fn_c_check_header_mongrel
1739
1740# ac_fn_c_try_run LINENO
1741# ----------------------
1742# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1743# that executables *can* be run.
1744ac_fn_c_try_run ()
1745{
1746 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1747 if { { ac_try="$ac_link"
1748case "(($ac_try" in
1749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1750 *) ac_try_echo=$ac_try;;
1751esac
1752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1753$as_echo "$ac_try_echo"; } >&5
1754 (eval "$ac_link") 2>&5
1755 ac_status=$?
1756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1757 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1758 { { case "(($ac_try" in
1759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1760 *) ac_try_echo=$ac_try;;
1761esac
1762eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1763$as_echo "$ac_try_echo"; } >&5
1764 (eval "$ac_try") 2>&5
1765 ac_status=$?
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; }; }; then :
1768 ac_retval=0
1769else
1770 $as_echo "$as_me: program exited with status $ac_status" >&5
1771 $as_echo "$as_me: failed program was:" >&5
1772sed 's/^/| /' conftest.$ac_ext >&5
1773
1774 ac_retval=$ac_status
1775fi
1776 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001777 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 as_fn_set_status $ac_retval
1779
1780} # ac_fn_c_try_run
1781
1782# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1783# -------------------------------------------------------
1784# Tests whether HEADER exists and can be compiled using the include files in
1785# INCLUDES, setting the cache variable VAR accordingly.
1786ac_fn_c_check_header_compile ()
1787{
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1790$as_echo_n "checking for $2... " >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001791if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 $as_echo_n "(cached) " >&6
1793else
1794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1795/* end confdefs.h. */
1796$4
1797#include <$2>
1798_ACEOF
1799if ac_fn_c_try_compile "$LINENO"; then :
1800 eval "$3=yes"
1801else
1802 eval "$3=no"
1803fi
1804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1805fi
1806eval ac_res=\$$3
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1808$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001809 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001810
1811} # ac_fn_c_check_header_compile
1812
Matthias Kloseb9621712010-04-24 17:59:49 +00001813# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1814# -------------------------------------------
1815# Tests whether TYPE exists after having included INCLUDES, setting cache
1816# variable VAR accordingly.
1817ac_fn_c_check_type ()
1818{
1819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1821$as_echo_n "checking for $2... " >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001822if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001823 $as_echo_n "(cached) " >&6
1824else
1825 eval "$3=no"
1826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1827/* end confdefs.h. */
1828$4
1829int
1830main ()
1831{
1832if (sizeof ($2))
1833 return 0;
1834 ;
1835 return 0;
1836}
1837_ACEOF
1838if ac_fn_c_try_compile "$LINENO"; then :
1839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1840/* end confdefs.h. */
1841$4
1842int
1843main ()
1844{
1845if (sizeof (($2)))
1846 return 0;
1847 ;
1848 return 0;
1849}
1850_ACEOF
1851if ac_fn_c_try_compile "$LINENO"; then :
1852
1853else
1854 eval "$3=yes"
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001863 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001864
1865} # ac_fn_c_check_type
1866
1867# ac_fn_c_find_uintX_t LINENO BITS VAR
1868# ------------------------------------
1869# Finds an unsigned integer type with width BITS, setting cache variable VAR
1870# accordingly.
1871ac_fn_c_find_uintX_t ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1875$as_echo_n "checking for uint$2_t... " >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001876if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 $as_echo_n "(cached) " >&6
1878else
1879 eval "$3=no"
1880 # Order is important - never check a type that is potentially smaller
1881 # than half of the expected target width.
1882 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1883 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885/* end confdefs.h. */
1886$ac_includes_default
1887int
1888main ()
1889{
1890static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1891test_array [0] = 0
1892
1893 ;
1894 return 0;
1895}
1896_ACEOF
1897if ac_fn_c_try_compile "$LINENO"; then :
1898 case $ac_type in #(
1899 uint$2_t) :
1900 eval "$3=yes" ;; #(
1901 *) :
1902 eval "$3=\$ac_type" ;;
1903esac
1904fi
1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001906 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907
1908else
1909 break
1910fi
1911 done
1912fi
1913eval ac_res=\$$3
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1915$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001916 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001917
1918} # ac_fn_c_find_uintX_t
1919
1920# ac_fn_c_find_intX_t LINENO BITS VAR
1921# -----------------------------------
1922# Finds a signed integer type with width BITS, setting cache variable VAR
1923# accordingly.
1924ac_fn_c_find_intX_t ()
1925{
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1928$as_echo_n "checking for int$2_t... " >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001929if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=no"
1933 # Order is important - never check a type that is potentially smaller
1934 # than half of the expected target width.
1935 for ac_type in int$2_t 'int' 'long int' \
1936 'long long int' 'short int' 'signed char'; do
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001940 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001941int
1942main ()
1943{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001944static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001945test_array [0] = 0
1946
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_compile "$LINENO"; then :
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001955 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001956int
1957main ()
1958{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001959static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001960 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1961test_array [0] = 0
1962
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968
1969else
1970 case $ac_type in #(
1971 int$2_t) :
1972 eval "$3=yes" ;; #(
1973 *) :
1974 eval "$3=\$ac_type" ;;
1975esac
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001980 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001990 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_intX_t
1993
1994# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1995# --------------------------------------------
1996# Tries to find the compile-time value of EXPR in a program that includes
1997# INCLUDES, setting VAR accordingly. Returns whether the value could be
1998# computed
1999ac_fn_c_compute_int ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 if test "$cross_compiling" = yes; then
2003 # Depending upon the size, compute the lo and hi bounds.
2004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) >= 0)];
2011test_array [0] = 0
2012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_lo=0 ac_mid=0
2019 while :; do
2020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021/* end confdefs.h. */
2022$4
2023int
2024main ()
2025{
2026static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2027test_array [0] = 0
2028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 ac_hi=$ac_mid; break
2035else
2036 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2037 if test $ac_lo -le $ac_mid; then
2038 ac_lo= ac_hi=
2039 break
2040 fi
2041 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2044 done
2045else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052static int test_array [1 - 2 * !(($2) < 0)];
2053test_array [0] = 0
2054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_hi=-1 ac_mid=-1
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2069test_array [0] = 0
2070
2071 ;
2072 return 0;
2073}
2074_ACEOF
2075if ac_fn_c_try_compile "$LINENO"; then :
2076 ac_lo=$ac_mid; break
2077else
2078 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2079 if test $ac_mid -le $ac_hi; then
2080 ac_lo= ac_hi=
2081 break
2082 fi
2083 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086 done
2087else
2088 ac_lo= ac_hi=
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093# Binary search between lo and hi bounds.
2094while test "x$ac_lo" != "x$ac_hi"; do
2095 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
2098$4
2099int
2100main ()
2101{
2102static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2103test_array [0] = 0
2104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=$ac_mid
2111else
2112 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115done
2116case $ac_lo in #((
2117?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2118'') ac_retval=1 ;;
2119esac
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124static long int longval () { return $2; }
2125static unsigned long int ulongval () { return $2; }
2126#include <stdio.h>
2127#include <stdlib.h>
2128int
2129main ()
2130{
2131
2132 FILE *f = fopen ("conftest.val", "w");
2133 if (! f)
2134 return 1;
2135 if (($2) < 0)
2136 {
2137 long int i = longval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%ld", i);
2141 }
2142 else
2143 {
2144 unsigned long int i = ulongval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%lu", i);
2148 }
2149 /* Do not output a trailing newline, as this causes \r\n confusion
2150 on some platforms. */
2151 return ferror (f) || fclose (f) != 0;
2152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_run "$LINENO"; then :
2158 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2159else
2160 ac_retval=1
2161fi
2162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2163 conftest.$ac_objext conftest.beam conftest.$ac_ext
2164rm -f conftest.val
2165
2166 fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002167 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_compute_int
2171
2172# ac_fn_c_check_func LINENO FUNC VAR
2173# ----------------------------------
2174# Tests whether FUNC exists, setting the cache variable VAR accordingly
2175ac_fn_c_check_func ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2179$as_echo_n "checking for $2... " >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002180if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 $as_echo_n "(cached) " >&6
2182else
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2187#define $2 innocuous_$2
2188
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $2 (); below.
2191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2192 <limits.h> exists even on freestanding compilers. */
2193
2194#ifdef __STDC__
2195# include <limits.h>
2196#else
2197# include <assert.h>
2198#endif
2199
2200#undef $2
2201
2202/* Override any GCC internal prototype to avoid an error.
2203 Use char because int might match the return type of a GCC
2204 builtin and then its argument prototype would still apply. */
2205#ifdef __cplusplus
2206extern "C"
2207#endif
2208char $2 ();
2209/* The GNU C library defines this for functions which it implements
2210 to always fail with ENOSYS. Some functions are actually named
2211 something starting with __ and the normal name is an alias. */
2212#if defined __stub_$2 || defined __stub___$2
2213choke me
2214#endif
2215
2216int
2217main ()
2218{
2219return $2 ();
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_link "$LINENO"; then :
2225 eval "$3=yes"
2226else
2227 eval "$3=no"
2228fi
2229rm -f core conftest.err conftest.$ac_objext \
2230 conftest$ac_exeext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002235 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002236
2237} # ac_fn_c_check_func
2238
2239# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2240# ----------------------------------------------------
2241# Tries to find if the field MEMBER exists in type AGGR, after including
2242# INCLUDES, setting cache variable VAR accordingly.
2243ac_fn_c_check_member ()
2244{
2245 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2247$as_echo_n "checking for $2.$3... " >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002248if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$5
2254int
2255main ()
2256{
2257static $2 ac_aggr;
2258if (ac_aggr.$3)
2259return 0;
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$4=yes"
2266else
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$5
2270int
2271main ()
2272{
2273static $2 ac_aggr;
2274if (sizeof ac_aggr.$3)
2275return 0;
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$4=yes"
2282else
2283 eval "$4=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289eval ac_res=\$$4
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2291$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002292 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002293
2294} # ac_fn_c_check_member
2295
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002296# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2297# ---------------------------------------------
2298# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2299# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002300ac_fn_c_check_decl ()
2301{
2302 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002303 as_decl_name=`echo $2|sed 's/ *(.*//'`
2304 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2306$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2307if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002308 $as_echo_n "(cached) " >&6
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$4
2313int
2314main ()
2315{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002316#ifndef $as_decl_name
2317#ifdef __cplusplus
2318 (void) $as_decl_use;
2319#else
2320 (void) $as_decl_name;
2321#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002322#endif
2323
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329 eval "$3=yes"
2330else
2331 eval "$3=no"
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334fi
2335eval ac_res=\$$3
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002338 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002339
2340} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002341cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002342This file contains any messages produced by compilers while
2343running configure, to aid debugging if configure makes a mistake.
2344
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002345It was created by python $as_me 3.3, which was
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002346generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002347
2348 $ $0 $@
2349
2350_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002352{
2353cat <<_ASUNAME
2354## --------- ##
2355## Platform. ##
2356## --------- ##
2357
2358hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2359uname -m = `(uname -m) 2>/dev/null || echo unknown`
2360uname -r = `(uname -r) 2>/dev/null || echo unknown`
2361uname -s = `(uname -s) 2>/dev/null || echo unknown`
2362uname -v = `(uname -v) 2>/dev/null || echo unknown`
2363
2364/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2365/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2366
2367/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2368/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2369/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002371/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2372/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2373/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2374
2375_ASUNAME
2376
2377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2378for as_dir in $PATH
2379do
2380 IFS=$as_save_IFS
2381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002382 $as_echo "PATH: $as_dir"
2383 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002385
2386} >&5
2387
2388cat >&5 <<_ACEOF
2389
2390
2391## ----------- ##
2392## Core tests. ##
2393## ----------- ##
2394
2395_ACEOF
2396
2397
2398# Keep a trace of the command line.
2399# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002403ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_configure_args0=
2405ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002406ac_must_keep_next=false
2407for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002408do
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 for ac_arg
2410 do
2411 case $ac_arg in
2412 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2413 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2414 | -silent | --silent | --silen | --sile | --sil)
2415 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002416 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 esac
2419 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002426 case $ac_arg in
2427 *=* | --config-cache | -C | -disable-* | --disable-* \
2428 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2429 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2430 | -with-* | --with-* | -without-* | --without-* | --x)
2431 case "$ac_configure_args0 " in
2432 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2433 esac
2434 ;;
2435 -* ) ac_must_keep_next=true ;;
2436 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002438 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 ;;
2440 esac
2441 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002442done
Matthias Kloseb9621712010-04-24 17:59:49 +00002443{ ac_configure_args0=; unset ac_configure_args0;}
2444{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446# When interrupted or exit'd, cleanup temporary files, and complete
2447# config.log. We remove comments because anyway the quotes in there
2448# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449# WARNING: Use '\'' to represent an apostrophe within the trap.
2450# 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 +00002451trap 'exit_status=$?
2452 # Save into config.log some information that might help in debugging.
2453 {
2454 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002455
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002457## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002458## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 echo
2460 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461(
2462 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2463 eval ac_val=\$$ac_var
2464 case $ac_val in #(
2465 *${as_nl}*)
2466 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2468$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac
2470 case $ac_var in #(
2471 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2473 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac ;;
2475 esac
2476 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2479 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 "s/'\''/'\''\\\\'\'''\''/g;
2482 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2483 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002486 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 esac |
2488 sort
2489)
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002491
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002493## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 echo
2496 for ac_var in $ac_subst_vars
2497 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 eval ac_val=\$$ac_var
2499 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 done | sort
2504 echo
2505
2506 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002509## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 echo
2511 for ac_var in $ac_subst_files
2512 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 eval ac_val=\$$ac_var
2514 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 done | sort
2519 echo
2520 fi
2521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 fi
2530 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$as_me: caught signal $ac_signal"
2532 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 rm -f core *.core core.conftest.* &&
2535 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002538for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541ac_signal=0
2542
2543# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002545
Matthias Kloseb9621712010-04-24 17:59:49 +00002546$as_echo "/* confdefs.h */" > confdefs.h
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548# Predefined preprocessor variables.
2549
2550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_NAME "$PACKAGE_NAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_VERSION "$PACKAGE_VERSION"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_STRING "$PACKAGE_STRING"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2568_ACEOF
2569
Matthias Kloseb9621712010-04-24 17:59:49 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_URL "$PACKAGE_URL"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574
2575# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002576# Prefer an explicitly selected file to automatically selected ones.
2577ac_site_file1=NONE
2578ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580 # We do not want a PATH search for config.site.
2581 case $CONFIG_SITE in #((
2582 -*) ac_site_file1=./$CONFIG_SITE;;
2583 */*) ac_site_file1=$CONFIG_SITE;;
2584 *) ac_site_file1=./$CONFIG_SITE;;
2585 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$prefix/share/config.site
2588 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589else
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 ac_site_file1=$ac_default_prefix/share/config.site
2591 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002593for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594do
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 test "x$ac_site_file" = xNONE && continue
2596 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2598$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600 . "$ac_site_file" \
2601 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2603as_fn_error $? "failed to load site script $ac_site_file
2604See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605 fi
2606done
2607
2608if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 # Some versions of bash will fail to source /dev/null (special files
2610 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2611 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2613$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2616 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 esac
2618 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619else
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2621$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 >$cache_file
2623fi
2624
2625# Check that the precious variables saved in the cache have kept the same
2626# value.
2627ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2630 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2632 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 case $ac_old_set,$ac_new_set in
2634 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2636$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 +00002637 ac_cache_corrupted=: ;;
2638 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2640$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 ac_cache_corrupted=: ;;
2642 ,);;
2643 *)
2644 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 # differences in whitespace do not lead to failure.
2646 ac_old_val_w=`echo x $ac_old_val`
2647 ac_new_val_w=`echo x $ac_new_val`
2648 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2650$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2651 ac_cache_corrupted=:
2652 else
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2654$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2655 eval $ac_var=\$ac_old_val
2656 fi
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2658$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2660$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 fi;;
2662 esac
2663 # Pass precious variables to config.status.
2664 if test "$ac_new_set" = set; then
2665 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 *) ac_arg=$ac_var=$ac_new_val ;;
2668 esac
2669 case " $ac_configure_args " in
2670 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 esac
2673 fi
2674done
2675if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2679$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002680 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002682## -------------------- ##
2683## Main body of script. ##
2684## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685
Guido van Rossum7f43da71994-08-01 12:15:30 +00002686ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2690ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691
Guido van Rossum627b2d71993-12-24 10:39:16 +00002692
Michael W. Hudson54241132001-12-07 15:38:26 +00002693
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002694
2695
2696
2697
2698if test -e $srcdir/.hg/00changelog.i
2699then
2700# Extract the first word of "hg", so it can be a program name with args.
2701set dummy hg; ac_word=$2
2702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2703$as_echo_n "checking for $ac_word... " >&6; }
2704if test "${ac_cv_prog_HAS_HG+set}" = set; then :
2705 $as_echo_n "(cached) " >&6
2706else
2707 if test -n "$HAS_HG"; then
2708 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2709else
2710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2711for as_dir in $PATH
2712do
2713 IFS=$as_save_IFS
2714 test -z "$as_dir" && as_dir=.
2715 for ac_exec_ext in '' $ac_executable_extensions; do
2716 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2717 ac_cv_prog_HAS_HG="found"
2718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2719 break 2
2720 fi
2721done
2722 done
2723IFS=$as_save_IFS
2724
2725 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2726fi
2727fi
2728HAS_HG=$ac_cv_prog_HAS_HG
2729if test -n "$HAS_HG"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2731$as_echo "$HAS_HG" >&6; }
2732else
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2734$as_echo "no" >&6; }
2735fi
2736
2737
2738else
2739HAS_HG=no-repository
2740fi
2741if test $HAS_HG = found
2742then
2743 HGVERSION="hg id -i \$(srcdir)"
2744 HGTAG="hg id -t \$(srcdir)"
2745 HGBRANCH="hg id -b \$(srcdir)"
2746else
2747 HGVERSION=""
2748 HGTAG=""
2749 HGBRANCH=""
2750fi
2751
2752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002754
2755
Martin v. Löwis11437992002-04-12 09:54:03 +00002756
Benjamin Petersond23f8222009-04-05 19:13:16 +00002757if test "$prefix" != "/"; then
2758 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2759fi
2760
2761
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
2763
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002764# We don't use PACKAGE_ variables, and they cause conflicts
2765# with other autoconf-based packages that include Python.h
2766grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2767rm confdefs.h
2768mv confdefs.h.new confdefs.h
2769
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002770
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002771VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002772
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002773# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002774
2775SOVERSION=1.0
2776
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002777# The later defininition of _XOPEN_SOURCE disables certain features
2778# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2779
Matthias Kloseb9621712010-04-24 17:59:49 +00002780$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002781
2782
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002783# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2784# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2785# them.
2786
Matthias Kloseb9621712010-04-24 17:59:49 +00002787$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002788
2789
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002790# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2791# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2792# them.
2793
Matthias Kloseb9621712010-04-24 17:59:49 +00002794$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002795
2796
Martin v. Löwisd6320502004-08-12 13:45:08 +00002797# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2798# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2799
Matthias Kloseb9621712010-04-24 17:59:49 +00002800$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002801
2802
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002803# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2804# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2805# them.
2806
Matthias Kloseb9621712010-04-24 17:59:49 +00002807$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808
2809
2810
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002811define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002812
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002813# Arguments passed to configure.
2814
2815CONFIG_ARGS="$ac_configure_args"
2816
Matthias Kloseb9621712010-04-24 17:59:49 +00002817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2818$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002819# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002820if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002821 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002822 case $enableval in
2823 yes)
2824 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002825 if test ! -d "${enableval}"
2826 then
2827 enableval=/
2828 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002829 ;;
2830 esac
2831 case $enableval in
2832 no)
2833 UNIVERSALSDK=
2834 enable_universalsdk=
2835 ;;
2836 *)
2837 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002838 if test ! -d "${UNIVERSALSDK}"
2839 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002840 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002841 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002842 ;;
2843 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002844
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002845
Thomas Wouters477c8d52006-05-27 19:21:47 +00002846else
2847
2848 UNIVERSALSDK=
2849 enable_universalsdk=
2850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002852
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002853if test -n "${UNIVERSALSDK}"
2854then
Matthias Kloseb9621712010-04-24 17:59:49 +00002855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2856$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002857else
Matthias Kloseb9621712010-04-24 17:59:49 +00002858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2859$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002860fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002862
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002863
2864
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002865UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002866
Matthias Kloseb9621712010-04-24 17:59:49 +00002867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2868$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002869
2870# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002871if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002872 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2874$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002875 UNIVERSAL_ARCHS="$withval"
2876
2877else
2878
Matthias Kloseb9621712010-04-24 17:59:49 +00002879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2880$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002881
2882fi
2883
2884
2885
2886
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002887
2888# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002889if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002890 withval=$with_framework_name;
2891 PYTHONFRAMEWORK=${withval}
2892 PYTHONFRAMEWORKDIR=${withval}.framework
2893 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2894
2895else
2896
2897 PYTHONFRAMEWORK=Python
2898 PYTHONFRAMEWORKDIR=Python.framework
2899 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2900
2901fi
2902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002903# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002904if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002905 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002906 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002908 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002909 esac
2910 case $enableval in
2911 no)
2912 PYTHONFRAMEWORK=
2913 PYTHONFRAMEWORKDIR=no-framework
2914 PYTHONFRAMEWORKPREFIX=
2915 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916 FRAMEWORKINSTALLFIRST=
2917 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002918 FRAMEWORKALTINSTALLFIRST=
2919 FRAMEWORKALTINSTALLLAST=
2920 if test "x${prefix}" = "xNONE"; then
2921 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2922 else
2923 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2924 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002925 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002926 ;;
2927 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002928 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002929 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002931 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002932 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2933 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002934 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002935
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002936 if test "x${prefix}" = "xNONE" ; then
2937 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002938
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002939 else
2940 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2941 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002942
2943 case "${enableval}" in
2944 /System*)
2945 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2946 if test "${prefix}" = "NONE" ; then
2947 # See below
2948 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2949 fi
2950 ;;
2951
2952 /Library*)
2953 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2954 ;;
2955
2956 */Library/Frameworks)
2957 MDIR="`dirname "${enableval}"`"
2958 MDIR="`dirname "${MDIR}"`"
2959 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2960
2961 if test "${prefix}" = "NONE"; then
2962 # User hasn't specified the
2963 # --prefix option, but wants to install
2964 # the framework in a non-default location,
2965 # ensure that the compatibility links get
2966 # installed relative to that prefix as well
2967 # instead of in /usr/local.
2968 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2969 fi
2970 ;;
2971
2972 *)
2973 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2974 ;;
2975 esac
2976
Jack Jansen127e56e2001-09-11 14:41:54 +00002977 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002978
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002979 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002980 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002981 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002983 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002984
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002985 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2986
2987 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2988
Jack Jansene578a632001-08-15 01:27:14 +00002989 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002990
Guido van Rossum563e7081996-09-10 18:20:48 +00002991else
Martin v. Löwis11437992002-04-12 09:54:03 +00002992
Jack Jansene578a632001-08-15 01:27:14 +00002993 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002994 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002995 PYTHONFRAMEWORKPREFIX=
2996 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002997 FRAMEWORKINSTALLFIRST=
2998 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002999 FRAMEWORKALTINSTALLFIRST=
3000 FRAMEWORKALTINSTALLLAST=
3001 if test "x${prefix}" = "xNONE" ; then
3002 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3003 else
3004 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3005 fi
Jack Jansene578a632001-08-15 01:27:14 +00003006 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003007
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009fi
3010
Thomas Wouters477c8d52006-05-27 19:21:47 +00003011
3012
Michael W. Hudson54241132001-12-07 15:38:26 +00003013
3014
3015
3016
Jack Jansene578a632001-08-15 01:27:14 +00003017
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003018
3019
3020
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003021
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003022
Jack Jansene578a632001-08-15 01:27:14 +00003023##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003024## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003025## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003026##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003027# Set name for machine-dependent library files
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3030$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003031if test -z "$MACHDEP"
3032then
Guido van Rossum563e7081996-09-10 18:20:48 +00003033 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003034 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003035 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003036 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003037 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003038 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003039 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003040 ac_md_system=`echo $ac_sys_system |
3041 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3042 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003043 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003044 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003045
Guido van Rossum07397971997-04-29 21:49:50 +00003046 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003047 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003048 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003049 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003050 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003051 esac
3052fi
Guido van Rossum91922671997-10-09 20:24:13 +00003053
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003054# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3055# disable features if it is defined, without any means to access these
3056# features as extensions. For these systems, we skip the definition of
3057# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3058# some feature, make sure there is no alternative way to access this
3059# feature. Also, when using wildcards, make sure you have verified the
3060# need for not defining _XOPEN_SOURCE on all systems matching the
3061# wildcard, and that the wildcard does not include future systems
3062# (which may remove their limitations).
3063case $ac_sys_system/$ac_sys_release in
3064 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3065 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003066 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003067 # In addition, Stefan Krah confirms that issue #1244610 exists through
3068 # OpenBSD 4.6, but is fixed in 4.7.
3069 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003070 define_xopen_source=no
3071 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3072 # also defined. This can be overridden by defining _BSD_SOURCE
3073 # As this has a different meaning on Linux, only define it on OpenBSD
3074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003076
3077 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003078 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003079 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3080 # also defined. This can be overridden by defining _BSD_SOURCE
3081 # As this has a different meaning on Linux, only define it on OpenBSD
3082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003084
3085 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003086 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3087 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3088 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003089 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 +00003090 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003091 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3092 # request to enable features supported by the standard as a request
3093 # to disable features not supported by the standard. The best way
3094 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3095 # entirely and define __EXTENSIONS__ instead.
3096 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003097 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003098 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3099 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003100 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003101 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003102 define_xopen_source=no;;
3103 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003104 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003105 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003106 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003107 # On FreeBSD 4, the math functions C89 does not cover are never defined
3108 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3109 FreeBSD/4.*)
3110 define_xopen_source=no;;
3111 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3112 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3113 # identifies itself as Darwin/7.*
3114 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3115 # disables platform specific features beyond repair.
3116 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3117 # has no effect, don't bother defining them
3118 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003119 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003120 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003121 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003122 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3123 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3124 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003125 AIX/4)
3126 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003127 AIX/5)
3128 if test `uname -r` -eq 1; then
3129 define_xopen_source=no
3130 fi
3131 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003132 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3133 # defining NI_NUMERICHOST.
3134 QNX/6.3.2)
3135 define_xopen_source=no
3136 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003137
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003138esac
3139
3140if test $define_xopen_source = yes
3141then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003142
Matthias Kloseb9621712010-04-24 17:59:49 +00003143$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003144
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003145
3146 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3147 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3148 # several APIs are not declared. Since this is also needed in some
3149 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003150
Matthias Kloseb9621712010-04-24 17:59:49 +00003151$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003152
3153
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003154
Matthias Kloseb9621712010-04-24 17:59:49 +00003155$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003156
3157
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003158fi
3159
Guido van Rossum91922671997-10-09 20:24:13 +00003160#
3161# SGI compilers allow the specification of the both the ABI and the
3162# ISA on the command line. Depending on the values of these switches,
3163# different and often incompatable code will be generated.
3164#
3165# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3166# thus supply support for various ABI/ISA combinations. The MACHDEP
3167# variable is also adjusted.
3168#
3169
3170if test ! -z "$SGI_ABI"
3171then
3172 CC="cc $SGI_ABI"
3173 LDFLAGS="$SGI_ABI $LDFLAGS"
3174 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3177$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003178
Jack Jansen6b08a402004-06-03 12:41:45 +00003179# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3180# it may influence the way we can build extensions, so distutils
3181# needs to check it
3182
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183
Jack Jansen6b08a402004-06-03 12:41:45 +00003184CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003186
Matthias Kloseb9621712010-04-24 17:59:49 +00003187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3188$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003189ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3191$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003192
Guido van Rossum627b2d71993-12-24 10:39:16 +00003193# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003194
3195# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3196# for debug/optimization stuff. BASECFLAGS is for flags that are required
3197# just to get things to compile and link. Users are free to override OPT
3198# when running configure or make. The build should not break if they do.
3199# BASECFLAGS should generally not be messed with, however.
3200
3201# XXX shouldn't some/most/all of this code be merged with the stuff later
3202# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3204$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003207if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003209 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003210 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003211 without_gcc=yes;;
3212 yes) CC=gcc
3213 without_gcc=no;;
3214 *) CC=$withval
3215 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003216 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003217else
Martin v. Löwis11437992002-04-12 09:54:03 +00003218
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003219 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003220 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003221 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003222 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003223 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224fi
3225
Matthias Kloseb9621712010-04-24 17:59:49 +00003226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3227$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003228
Guido van Rossum8b131c51995-03-09 14:10:13 +00003229# If the user switches compilers, we can't believe the cache
3230if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3231then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003232 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003233(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003234fi
3235
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003236# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3237# when the compiler supports them, but we don't always want -O2, and
3238# we set -g later.
3239if test -z "$CFLAGS"; then
3240 CFLAGS=
3241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003242ac_ext=c
3243ac_cpp='$CPP $CPPFLAGS'
3244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3246ac_compiler_gnu=$ac_cv_c_compiler_gnu
3247if test -n "$ac_tool_prefix"; then
3248 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3249set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3251$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003252if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003253 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003254else
3255 if test -n "$CC"; then
3256 ac_cv_prog_CC="$CC" # Let the user override the test.
3257else
Martin v. Löwis11437992002-04-12 09:54:03 +00003258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259for as_dir in $PATH
3260do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003263 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264 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 +00003265 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003266 $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 +00003267 break 2
3268 fi
3269done
Matthias Kloseb9621712010-04-24 17:59:49 +00003270 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003272
Jack Jansendd19cf82001-12-06 22:36:17 +00003273fi
3274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003275CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003276if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3278$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003279else
Matthias Kloseb9621712010-04-24 17:59:49 +00003280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3281$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003282fi
3283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284
Martin v. Löwis11437992002-04-12 09:54:03 +00003285fi
3286if test -z "$ac_cv_prog_CC"; then
3287 ac_ct_CC=$CC
3288 # Extract the first word of "gcc", so it can be a program name with args.
3289set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3291$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003292if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003294else
3295 if test -n "$ac_ct_CC"; then
3296 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3297else
3298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3299for as_dir in $PATH
3300do
3301 IFS=$as_save_IFS
3302 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304 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 +00003305 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003306 $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 +00003307 break 2
3308 fi
3309done
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003312
3313fi
3314fi
3315ac_ct_CC=$ac_cv_prog_ac_ct_CC
3316if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3318$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003319else
Matthias Kloseb9621712010-04-24 17:59:49 +00003320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3321$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003322fi
3323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003324 if test "x$ac_ct_CC" = x; then
3325 CC=""
3326 else
3327 case $cross_compiling:$ac_tool_warned in
3328yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003329{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3330$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331ac_tool_warned=yes ;;
3332esac
3333 CC=$ac_ct_CC
3334 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003335else
3336 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003337fi
3338
Jack Jansendd19cf82001-12-06 22:36:17 +00003339if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003340 if test -n "$ac_tool_prefix"; then
3341 # 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 +00003342set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3344$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003345if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003346 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003347else
3348 if test -n "$CC"; then
3349 ac_cv_prog_CC="$CC" # Let the user override the test.
3350else
Martin v. Löwis11437992002-04-12 09:54:03 +00003351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3352for as_dir in $PATH
3353do
3354 IFS=$as_save_IFS
3355 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003356 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003357 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 +00003358 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003359 $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 +00003360 break 2
3361 fi
3362done
Matthias Kloseb9621712010-04-24 17:59:49 +00003363 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003364IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003365
3366fi
3367fi
3368CC=$ac_cv_prog_CC
3369if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3371$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003372else
Matthias Kloseb9621712010-04-24 17:59:49 +00003373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3374$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003375fi
3376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003377
Martin v. Löwis11437992002-04-12 09:54:03 +00003378 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003379fi
3380if test -z "$CC"; then
3381 # Extract the first word of "cc", so it can be a program name with args.
3382set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3384$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003385if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003386 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003387else
3388 if test -n "$CC"; then
3389 ac_cv_prog_CC="$CC" # Let the user override the test.
3390else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003391 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3393for as_dir in $PATH
3394do
3395 IFS=$as_save_IFS
3396 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003397 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003398 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 +00003399 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3400 ac_prog_rejected=yes
3401 continue
3402 fi
3403 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 break 2
3406 fi
3407done
Matthias Kloseb9621712010-04-24 17:59:49 +00003408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411if test $ac_prog_rejected = yes; then
3412 # We found a bogon in the path, so make sure we never use it.
3413 set dummy $ac_cv_prog_CC
3414 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003416 # We chose a different compiler from the bogus one.
3417 # However, it has the same basename, so the bogon will be chosen
3418 # first if we set CC to just the basename; use the full file name.
3419 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003420 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421 fi
3422fi
3423fi
3424fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003425CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003426if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3428$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429else
Matthias Kloseb9621712010-04-24 17:59:49 +00003430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3431$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003432fi
3433
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434
Martin v. Löwis11437992002-04-12 09:54:03 +00003435fi
3436if test -z "$CC"; then
3437 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003438 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 do
3440 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3441set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3443$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003444if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003446else
3447 if test -n "$CC"; then
3448 ac_cv_prog_CC="$CC" # Let the user override the test.
3449else
Martin v. Löwis11437992002-04-12 09:54:03 +00003450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3451for as_dir in $PATH
3452do
3453 IFS=$as_save_IFS
3454 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003455 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 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 +00003457 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003458 $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 +00003459 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461done
Matthias Kloseb9621712010-04-24 17:59:49 +00003462 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
3465fi
3466fi
3467CC=$ac_cv_prog_CC
3468if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3470$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471else
Matthias Kloseb9621712010-04-24 17:59:49 +00003472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3473$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003474fi
3475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 test -n "$CC" && break
3478 done
3479fi
3480if test -z "$CC"; then
3481 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003483do
3484 # Extract the first word of "$ac_prog", so it can be a program name with args.
3485set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3487$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003488if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003490else
3491 if test -n "$ac_ct_CC"; then
3492 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3493else
3494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3495for as_dir in $PATH
3496do
3497 IFS=$as_save_IFS
3498 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003499 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003500 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 +00003501 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003502 $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 +00003503 break 2
3504 fi
3505done
Matthias Kloseb9621712010-04-24 17:59:49 +00003506 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003508
Martin v. Löwis11437992002-04-12 09:54:03 +00003509fi
3510fi
3511ac_ct_CC=$ac_cv_prog_ac_ct_CC
3512if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3514$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003515else
Matthias Kloseb9621712010-04-24 17:59:49 +00003516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3517$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003518fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 test -n "$ac_ct_CC" && break
3522done
Michael W. Hudson54241132001-12-07 15:38:26 +00003523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003524 if test "x$ac_ct_CC" = x; then
3525 CC=""
3526 else
3527 case $cross_compiling:$ac_tool_warned in
3528yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531ac_tool_warned=yes ;;
3532esac
3533 CC=$ac_ct_CC
3534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003535fi
3536
3537fi
3538
3539
Matthias Kloseb9621712010-04-24 17:59:49 +00003540test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003542as_fn_error $? "no acceptable C compiler found in \$PATH
3543See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003544
3545# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003546$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3547set X $ac_compile
3548ac_compiler=$2
3549for ac_option in --version -v -V -qversion; do
3550 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551case "(($ac_try" in
3552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3553 *) ac_try_echo=$ac_try;;
3554esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3556$as_echo "$ac_try_echo"; } >&5
3557 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003559 if test -s conftest.err; then
3560 sed '10a\
3561... rest of stderr output deleted ...
3562 10q' conftest.err >conftest.er1
3563 cat conftest.er1 >&5
3564 fi
3565 rm -f conftest.er1 conftest.err
3566 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3567 test $ac_status = 0; }
3568done
Martin v. Löwis11437992002-04-12 09:54:03 +00003569
Matthias Kloseb9621712010-04-24 17:59:49 +00003570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003571/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573int
3574main ()
3575{
3576
3577 ;
3578 return 0;
3579}
3580_ACEOF
3581ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003582ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003583# Try to create an executable without -o first, disregard a.out.
3584# It will help us diagnose broken compilers, and finding out an intuition
3585# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3587$as_echo_n "checking whether the C compiler works... " >&6; }
3588ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3589
3590# The possible output files:
3591ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593ac_rmfiles=
3594for ac_file in $ac_files
3595do
3596 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3599 esac
3600done
3601rm -f $ac_rmfiles
3602
Matthias Kloseb9621712010-04-24 17:59:49 +00003603if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604case "(($ac_try" in
3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3606 *) ac_try_echo=$ac_try;;
3607esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003608eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3609$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3613 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3615# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3616# in a Makefile. We should not override ac_cv_exeext if it was cached,
3617# so that the user can short-circuit this test for compilers unknown to
3618# Autoconf.
3619for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003620do
3621 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003624 ;;
3625 [ab].out )
3626 # We found the default executable, but exeext='' is most
3627 # certainly right.
3628 break;;
3629 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 then :; else
3632 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3633 fi
3634 # We set ac_cv_exeext here because the later test for it is not
3635 # safe: cross compilers may not add the suffix if given an `-o'
3636 # argument, so we may need to know it at that point already.
3637 # Even if this section looks crufty: it has the advantage of
3638 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003639 break;;
3640 * )
3641 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 esac
3643done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644test "$ac_cv_exeext" = no && ac_cv_exeext=
3645
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003646else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647 ac_file=''
3648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003649if test -z "$ac_file"; then :
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3651$as_echo "no" >&6; }
3652$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003653sed 's/^/| /' conftest.$ac_ext >&5
3654
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003657as_fn_error 77 "C compiler cannot create executables
3658See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003659else
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3661$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3664$as_echo_n "checking for C compiler default output file name... " >&6; }
3665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3666$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003667ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003668
Matthias Kloseb9621712010-04-24 17:59:49 +00003669rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003670ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3672$as_echo_n "checking for suffix of executables... " >&6; }
3673if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674case "(($ac_try" in
3675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3676 *) ac_try_echo=$ac_try;;
3677esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3679$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3683 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003684 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3685# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3686# work properly (i.e., refer to `conftest.exe'), while it won't with
3687# `rm'.
3688for ac_file in conftest.exe conftest conftest.*; do
3689 test -f "$ac_file" || continue
3690 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003692 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3693 break;;
3694 * ) break;;
3695 esac
3696done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003697else
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003700as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3701See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003703rm -f conftest conftest$ac_cv_exeext
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3705$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003706
3707rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003708EXEEXT=$ac_cv_exeext
3709ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3711/* end confdefs.h. */
3712#include <stdio.h>
3713int
3714main ()
3715{
3716FILE *f = fopen ("conftest.out", "w");
3717 return ferror (f) || fclose (f) != 0;
3718
3719 ;
3720 return 0;
3721}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003723ac_clean_files="$ac_clean_files conftest.out"
3724# Check that the compiler produces executables we can run. If not, either
3725# the compiler is broken, or we cross compile.
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3727$as_echo_n "checking whether we are cross compiling... " >&6; }
3728if test "$cross_compiling" != yes; then
3729 { { ac_try="$ac_link"
3730case "(($ac_try" in
3731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3732 *) ac_try_echo=$ac_try;;
3733esac
3734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3735$as_echo "$ac_try_echo"; } >&5
3736 (eval "$ac_link") 2>&5
3737 ac_status=$?
3738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3739 test $ac_status = 0; }
3740 if { ac_try='./conftest$ac_cv_exeext'
3741 { { case "(($ac_try" in
3742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3743 *) ac_try_echo=$ac_try;;
3744esac
3745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3746$as_echo "$ac_try_echo"; } >&5
3747 (eval "$ac_try") 2>&5
3748 ac_status=$?
3749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3750 test $ac_status = 0; }; }; then
3751 cross_compiling=no
3752 else
3753 if test "$cross_compiling" = maybe; then
3754 cross_compiling=yes
3755 else
3756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003758as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003759If you meant to cross compile, use \`--host'.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003760See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 fi
3762 fi
3763fi
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3765$as_echo "$cross_compiling" >&6; }
3766
3767rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3768ac_clean_files=$ac_clean_files_save
3769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3770$as_echo_n "checking for suffix of object files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003771if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $as_echo_n "(cached) " >&6
3773else
3774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003775/* end confdefs.h. */
3776
3777int
3778main ()
3779{
3780
3781 ;
3782 return 0;
3783}
3784_ACEOF
3785rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003786if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787case "(($ac_try" in
3788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3789 *) ac_try_echo=$ac_try;;
3790esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3792$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3796 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797 for ac_file in conftest.o conftest.obj conftest.*; do
3798 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3802 break;;
3803 esac
3804done
3805else
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003807sed 's/^/| /' conftest.$ac_ext >&5
3808
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003811as_fn_error $? "cannot compute suffix of object files: cannot compile
3812See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003814rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3817$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003818OBJEXT=$ac_cv_objext
3819ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3821$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003822if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828int
3829main ()
3830{
3831#ifndef __GNUC__
3832 choke me
3833#endif
3834
3835 ;
3836 return 0;
3837}
3838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003839if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 ac_compiler_gnu=yes
3841else
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003845ac_cv_c_compiler_gnu=$ac_compiler_gnu
3846
3847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3849$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3850if test $ac_compiler_gnu = yes; then
3851 GCC=yes
3852else
3853 GCC=
3854fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003855ac_test_CFLAGS=${CFLAGS+set}
3856ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3858$as_echo_n "checking whether $CC accepts -g... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003859if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003861else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862 ac_save_c_werror_flag=$ac_c_werror_flag
3863 ac_c_werror_flag=yes
3864 ac_cv_prog_cc_g=no
3865 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869int
3870main ()
3871{
3872
3873 ;
3874 return 0;
3875}
3876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003877if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003878 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003879else
Matthias Kloseb9621712010-04-24 17:59:49 +00003880 CFLAGS=""
3881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882/* end confdefs.h. */
3883
3884int
3885main ()
3886{
3887
3888 ;
3889 return 0;
3890}
3891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003892if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893
Matthias Kloseb9621712010-04-24 17:59:49 +00003894else
3895 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898/* end confdefs.h. */
3899
3900int
3901main ()
3902{
3903
3904 ;
3905 return 0;
3906}
3907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003908if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3916 ac_c_werror_flag=$ac_save_c_werror_flag
3917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3919$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003920if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003921 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003922elif test $ac_cv_prog_cc_g = yes; then
3923 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003924 CFLAGS="-g -O2"
3925 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003926 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003927 fi
3928else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003929 if test "$GCC" = yes; then
3930 CFLAGS="-O2"
3931 else
3932 CFLAGS=
3933 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3936$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003937if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003939else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003941ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003943/* end confdefs.h. */
3944#include <stdarg.h>
3945#include <stdio.h>
3946#include <sys/types.h>
3947#include <sys/stat.h>
3948/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3949struct buf { int x; };
3950FILE * (*rcsopen) (struct buf *, struct stat *, int);
3951static char *e (p, i)
3952 char **p;
3953 int i;
3954{
3955 return p[i];
3956}
3957static char *f (char * (*g) (char **, int), char **p, ...)
3958{
3959 char *s;
3960 va_list v;
3961 va_start (v,p);
3962 s = g (p, va_arg (v,int));
3963 va_end (v);
3964 return s;
3965}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966
3967/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3968 function prototypes and stuff, but not '\xHH' hex character constants.
3969 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003971 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3972 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003974int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3977 inside strings and character constants. */
3978#define FOO(x) 'x'
3979int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3980
Skip Montanaro6dead952003-09-25 14:50:04 +00003981int test (int i, double x);
3982struct s1 {int (*f) (int a);};
3983struct s2 {int (*f) (double a);};
3984int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3985int argc;
3986char **argv;
3987int
3988main ()
3989{
3990return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3991 ;
3992 return 0;
3993}
3994_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3996 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003997do
3998 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003999 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002rm -f core conftest.err conftest.$ac_objext
4003 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004006CC=$ac_save_CC
4007
4008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009# AC_CACHE_VAL
4010case "x$ac_cv_prog_cc_c89" in
4011 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4013$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4016$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004017 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4020$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004021esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004022if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004023
Matthias Kloseb9621712010-04-24 17:59:49 +00004024fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004025
Martin v. Löwis11437992002-04-12 09:54:03 +00004026ac_ext=c
4027ac_cpp='$CPP $CPPFLAGS'
4028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4030ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004032
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004033
4034
Matthias Kloseb9621712010-04-24 17:59:49 +00004035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4036$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004039if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041
4042 case $withval in
4043 no) with_cxx_main=no
4044 MAINCC='$(CC)';;
4045 yes) with_cxx_main=yes
4046 MAINCC='$(CXX)';;
4047 *) with_cxx_main=yes
4048 MAINCC=$withval
4049 if test -z "$CXX"
4050 then
4051 CXX=$withval
4052 fi;;
4053 esac
4054else
4055
4056 with_cxx_main=no
4057 MAINCC='$(CC)'
4058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059fi
4060
Matthias Kloseb9621712010-04-24 17:59:49 +00004061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4062$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063
4064preset_cxx="$CXX"
4065if test -z "$CXX"
4066then
4067 case "$CC" in
4068 gcc) # Extract the first word of "g++", so it can be a program name with args.
4069set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4071$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004072if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004074else
4075 case $CXX in
4076 [\\/]* | ?:[\\/]*)
4077 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4078 ;;
4079 *)
4080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4081for as_dir in notfound
4082do
4083 IFS=$as_save_IFS
4084 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004086 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 +00004087 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004089 break 2
4090 fi
4091done
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004093IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004094
4095 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4096 ;;
4097esac
4098fi
4099CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004100if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4102$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004103else
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4105$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004108 ;;
4109 cc) # Extract the first word of "c++", so it can be a program name with args.
4110set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4112$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004113if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004115else
4116 case $CXX in
4117 [\\/]* | ?:[\\/]*)
4118 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4119 ;;
4120 *)
4121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4122for as_dir in notfound
4123do
4124 IFS=$as_save_IFS
4125 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004127 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 +00004128 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130 break 2
4131 fi
4132done
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004135
4136 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4137 ;;
4138esac
4139fi
4140CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004141if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4143$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004144else
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4146$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004149 ;;
4150 esac
4151 if test "$CXX" = "notfound"
4152 then
4153 CXX=""
4154 fi
4155fi
4156if test -z "$CXX"
4157then
4158 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4159do
4160 # Extract the first word of "$ac_prog", so it can be a program name with args.
4161set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4163$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004164if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004166else
4167 if test -n "$CXX"; then
4168 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4169else
4170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4171for as_dir in $PATH
4172do
4173 IFS=$as_save_IFS
4174 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 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 +00004177 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004179 break 2
4180 fi
4181done
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004184
4185fi
4186fi
4187CXX=$ac_cv_prog_CXX
4188if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4190$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004191else
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4193$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004194fi
4195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004197 test -n "$CXX" && break
4198done
4199test -n "$CXX" || CXX="notfound"
4200
4201 if test "$CXX" = "notfound"
4202 then
4203 CXX=""
4204 fi
4205fi
4206if test "$preset_cxx" != "$CXX"
4207then
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004209
4210 By default, distutils will build C++ extension modules with \"$CXX\".
4211 If this is not intended, then set CXX on the configure command line.
4212 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004213$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004214
4215 By default, distutils will build C++ extension modules with \"$CXX\".
4216 If this is not intended, then set CXX on the configure command line.
4217 " >&2;}
4218fi
4219
4220
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4222$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4223save_LDFLAGS="$LDFLAGS"
4224LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004225
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227/* end confdefs.h. */
4228
4229int
4230main ()
4231{
4232
4233 ;
4234 return 0;
4235}
4236_ACEOF
4237if ac_fn_c_try_link "$LINENO"; then :
4238 NO_AS_NEEDED="-Wl,--no-as-needed"
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4240$as_echo "yes" >&6; }
4241else
4242 NO_AS_NEEDED=""
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4244$as_echo "no" >&6; }
4245fi
4246rm -f core conftest.err conftest.$ac_objext \
4247 conftest$ac_exeext conftest.$ac_ext
4248LDFLAGS="$save_LDFLAGS"
4249
4250
4251
4252# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004253ac_ext=c
4254ac_cpp='$CPP $CPPFLAGS'
4255ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4256ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4257ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4259$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004260# On Suns, sometimes $CPP names a directory.
4261if test -n "$CPP" && test -d "$CPP"; then
4262 CPP=
4263fi
4264if test -z "$CPP"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004265 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004267else
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 # Double quotes because CPP needs to be expanded
4269 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4270 do
4271 ac_preproc_ok=false
4272for ac_c_preproc_warn_flag in '' yes
4273do
4274 # Use a header file that comes with gcc, so configuring glibc
4275 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004276 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4277 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004278 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004281/* end confdefs.h. */
4282#ifdef __STDC__
4283# include <limits.h>
4284#else
4285# include <assert.h>
4286#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004289if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004290
Matthias Kloseb9621712010-04-24 17:59:49 +00004291else
Martin v. Löwis11437992002-04-12 09:54:03 +00004292 # Broken: fails on valid input.
4293continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004294fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004295rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004296
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004298 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004301#include <ac_nonexistent.h>
4302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004303if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004304 # Broken: success on invalid input.
4305continue
4306else
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 # Passes both tests.
4308ac_preproc_ok=:
4309break
4310fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004311rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004312
4313done
4314# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004315rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004316if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 break
4318fi
4319
4320 done
4321 ac_cv_prog_CPP=$CPP
4322
4323fi
4324 CPP=$ac_cv_prog_CPP
4325else
4326 ac_cv_prog_CPP=$CPP
4327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4329$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004330ac_preproc_ok=false
4331for ac_c_preproc_warn_flag in '' yes
4332do
4333 # Use a header file that comes with gcc, so configuring glibc
4334 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004335 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4336 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004337 # On the NeXT, cc -E runs the code through the compiler's parser,
4338 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004340/* end confdefs.h. */
4341#ifdef __STDC__
4342# include <limits.h>
4343#else
4344# include <assert.h>
4345#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004346 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004348if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004349
Matthias Kloseb9621712010-04-24 17:59:49 +00004350else
Martin v. Löwis11437992002-04-12 09:54:03 +00004351 # Broken: fails on valid input.
4352continue
4353fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004354rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004357 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004360#include <ac_nonexistent.h>
4361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004362if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004363 # Broken: success on invalid input.
4364continue
4365else
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 # Passes both tests.
4367ac_preproc_ok=:
4368break
4369fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004370rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004371
4372done
4373# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004374rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004375if $ac_preproc_ok; then :
4376
Martin v. Löwis11437992002-04-12 09:54:03 +00004377else
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004380as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4381See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004382fi
4383
4384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
4389
4390
Matthias Kloseb9621712010-04-24 17:59:49 +00004391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4392$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004393if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004395else
Matthias Kloseb9621712010-04-24 17:59:49 +00004396 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004398 # Loop through the user's path and test for each of PROGNAME-LIST
4399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4401do
4402 IFS=$as_save_IFS
4403 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 for ac_prog in grep ggrep; do
4405 for ac_exec_ext in '' $ac_executable_extensions; do
4406 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4407 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4408# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409 # Check for GNU $ac_path_GREP
4410case `"$ac_path_GREP" --version 2>&1` in
4411*GNU*)
4412 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4413*)
4414 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004415 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416 while :
4417 do
4418 cat "conftest.in" "conftest.in" >"conftest.tmp"
4419 mv "conftest.tmp" "conftest.in"
4420 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4423 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4426 # Best one so far, save it but keep looking for a better one
4427 ac_cv_path_GREP="$ac_path_GREP"
4428 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004429 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 # 10*(2^10) chars as input seems more than enough
4431 test $ac_count -gt 10 && break
4432 done
4433 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4434esac
4435
Matthias Kloseb9621712010-04-24 17:59:49 +00004436 $ac_path_GREP_found && break 3
4437 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004442 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 +00004443 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444else
4445 ac_cv_path_GREP=$GREP
4446fi
4447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4450$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004451 GREP="$ac_cv_path_GREP"
4452
4453
Matthias Kloseb9621712010-04-24 17:59:49 +00004454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4455$as_echo_n "checking for egrep... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004456if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004457 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004458else
4459 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4460 then ac_cv_path_EGREP="$GREP -E"
4461 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004463 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 # Loop through the user's path and test for each of PROGNAME-LIST
4465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4467do
4468 IFS=$as_save_IFS
4469 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 for ac_prog in egrep; do
4471 for ac_exec_ext in '' $ac_executable_extensions; do
4472 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4473 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4474# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004475 # Check for GNU $ac_path_EGREP
4476case `"$ac_path_EGREP" --version 2>&1` in
4477*GNU*)
4478 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4479*)
4480 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004481 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482 while :
4483 do
4484 cat "conftest.in" "conftest.in" >"conftest.tmp"
4485 mv "conftest.tmp" "conftest.in"
4486 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004487 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004488 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4489 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004490 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4492 # Best one so far, save it but keep looking for a better one
4493 ac_cv_path_EGREP="$ac_path_EGREP"
4494 ac_path_EGREP_max=$ac_count
4495 fi
4496 # 10*(2^10) chars as input seems more than enough
4497 test $ac_count -gt 10 && break
4498 done
4499 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4500esac
4501
Matthias Kloseb9621712010-04-24 17:59:49 +00004502 $ac_path_EGREP_found && break 3
4503 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004504 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004506IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004507 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004508 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 +00004509 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004510else
4511 ac_cv_path_EGREP=$EGREP
4512fi
4513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004514 fi
4515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4517$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004518 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004519
4520
Matthias Kloseb9621712010-04-24 17:59:49 +00004521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4522$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004523if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004524 $as_echo_n "(cached) " >&6
4525else
4526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004527/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004528#include <stdlib.h>
4529#include <stdarg.h>
4530#include <string.h>
4531#include <float.h>
4532
4533int
4534main ()
4535{
4536
4537 ;
4538 return 0;
4539}
4540_ACEOF
4541if ac_fn_c_try_compile "$LINENO"; then :
4542 ac_cv_header_stdc=yes
4543else
4544 ac_cv_header_stdc=no
4545fi
4546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4547
4548if test $ac_cv_header_stdc = yes; then
4549 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4551/* end confdefs.h. */
4552#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004553
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004554_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004557
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004558else
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004560fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004561rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004562
Matthias Kloseb9621712010-04-24 17:59:49 +00004563fi
4564
4565if test $ac_cv_header_stdc = yes; then
4566 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4568/* end confdefs.h. */
4569#include <stdlib.h>
4570
4571_ACEOF
4572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4573 $EGREP "free" >/dev/null 2>&1; then :
4574
4575else
4576 ac_cv_header_stdc=no
4577fi
4578rm -f conftest*
4579
4580fi
4581
4582if test $ac_cv_header_stdc = yes; then
4583 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4584 if test "$cross_compiling" = yes; then :
4585 :
4586else
4587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588/* end confdefs.h. */
4589#include <ctype.h>
4590#include <stdlib.h>
4591#if ((' ' & 0x0FF) == 0x020)
4592# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4593# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4594#else
4595# define ISLOWER(c) \
4596 (('a' <= (c) && (c) <= 'i') \
4597 || ('j' <= (c) && (c) <= 'r') \
4598 || ('s' <= (c) && (c) <= 'z'))
4599# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4600#endif
4601
4602#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4603int
4604main ()
4605{
4606 int i;
4607 for (i = 0; i < 256; i++)
4608 if (XOR (islower (i), ISLOWER (i))
4609 || toupper (i) != TOUPPER (i))
4610 return 2;
4611 return 0;
4612}
4613_ACEOF
4614if ac_fn_c_try_run "$LINENO"; then :
4615
4616else
4617 ac_cv_header_stdc=no
4618fi
4619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4620 conftest.$ac_objext conftest.beam conftest.$ac_ext
4621fi
4622
4623fi
4624fi
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4626$as_echo "$ac_cv_header_stdc" >&6; }
4627if test $ac_cv_header_stdc = yes; then
4628
4629$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4630
4631fi
4632
4633# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4634for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4635 inttypes.h stdint.h unistd.h
4636do :
4637 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4638ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4639"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004640if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004641 cat >>confdefs.h <<_ACEOF
4642#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4643_ACEOF
4644
4645fi
4646
4647done
4648
4649
4650
4651 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004652if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004653 MINIX=yes
4654else
4655 MINIX=
4656fi
4657
4658
4659 if test "$MINIX" = yes; then
4660
4661$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4662
4663
4664$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4665
4666
4667$as_echo "#define _MINIX 1" >>confdefs.h
4668
4669 fi
4670
4671
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4673$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004674if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004675 $as_echo_n "(cached) " >&6
4676else
4677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678/* end confdefs.h. */
4679
4680# define __EXTENSIONS__ 1
4681 $ac_includes_default
4682int
4683main ()
4684{
4685
4686 ;
4687 return 0;
4688}
4689_ACEOF
4690if ac_fn_c_try_compile "$LINENO"; then :
4691 ac_cv_safe_to_define___extensions__=yes
4692else
4693 ac_cv_safe_to_define___extensions__=no
4694fi
4695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4696fi
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4698$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4699 test $ac_cv_safe_to_define___extensions__ = yes &&
4700 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4701
4702 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4703
4704 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4705
4706 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4707
4708 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4709
4710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004712# Check for unsupported systems
4713case $ac_sys_system/$ac_sys_release in
4714atheos*|Linux*/1*)
4715 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4716 echo See README for details.
4717 exit 1;;
4718esac
4719
4720
Matthias Kloseb9621712010-04-24 17:59:49 +00004721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4722$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004723
4724# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004725if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004726 withval=$with_suffix;
4727 case $withval in
4728 no) EXEEXT=;;
4729 yes) EXEEXT=.exe;;
4730 *) EXEEXT=$withval;;
4731 esac
4732fi
4733
Matthias Kloseb9621712010-04-24 17:59:49 +00004734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4735$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736
4737# Test whether we're running on a non-case-sensitive system, in which
4738# case we give a warning if no ext is given
4739
Matthias Kloseb9621712010-04-24 17:59:49 +00004740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4741$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004742if test ! -d CaseSensitiveTestDir; then
4743mkdir CaseSensitiveTestDir
4744fi
4745
4746if test -d casesensitivetestdir
4747then
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4749$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750 BUILDEXEEXT=.exe
4751else
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4753$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754 BUILDEXEEXT=$EXEEXT
4755fi
4756rmdir CaseSensitiveTestDir
4757
4758case $MACHDEP in
4759bsdos*)
4760 case $CC in
4761 gcc) CC="$CC -D_HAVE_BSDI";;
4762 esac;;
4763esac
4764
4765case $ac_sys_system in
4766hp*|HP*)
4767 case $CC in
4768 cc|*/cc) CC="$CC -Ae";;
4769 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004770esac
4771
4772
4773
Matthias Kloseb9621712010-04-24 17:59:49 +00004774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4775$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776if test -z "$LIBRARY"
4777then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004778 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4781$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782
4783# LDLIBRARY is the name of the library to link against (as opposed to the
4784# name of the library into which to insert object files). BLDLIBRARY is also
4785# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4786# is blank as the main program is not linked directly against LDLIBRARY.
4787# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4788# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4789# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4790# DLLLIBRARY is the shared (i.e., DLL) library.
4791#
4792# RUNSHARED is used to run shared python without installed libraries
4793#
4794# INSTSONAME is the name of the shared library that will be use to install
4795# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004796#
4797# LDVERSION is the shared library version number, normally the Python version
4798# with the ABI build flags appended.
4799
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004800
4801
4802
4803
4804
4805
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004806
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807LDLIBRARY="$LIBRARY"
4808BLDLIBRARY='$(LDLIBRARY)'
4809INSTSONAME='$(LDLIBRARY)'
4810DLLLIBRARY=''
4811LDLIBRARYDIR=''
4812RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004813LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004814
4815# LINKCC is the command that links the python executable -- default is $(CC).
4816# If CXX is set, and if it is needed to link a main function that was
4817# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4818# python might then depend on the C++ runtime
4819# This is altered for AIX in order to build the export list before
4820# linking.
4821
Matthias Kloseb9621712010-04-24 17:59:49 +00004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4823$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824if test -z "$LINKCC"
4825then
4826 LINKCC='$(PURIFY) $(MAINCC)'
4827 case $ac_sys_system in
4828 AIX*)
4829 exp_extra="\"\""
4830 if test $ac_sys_release -ge 5 -o \
4831 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4832 exp_extra="."
4833 fi
4834 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 QNX*)
4836 # qcc must be used because the other compilers do not
4837 # support -N.
4838 LINKCC=qcc;;
4839 esac
4840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4842$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843
4844# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4845# make sure we default having it set to "no": this is used by
4846# distutils.unixccompiler to know if it should add --enable-new-dtags
4847# to linker command lines, and failing to detect GNU ld simply results
4848# in the same bahaviour as before.
4849
Matthias Kloseb9621712010-04-24 17:59:49 +00004850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4851$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852ac_prog=ld
4853if test "$GCC" = yes; then
4854 ac_prog=`$CC -print-prog-name=ld`
4855fi
4856case `"$ac_prog" -V 2>&1 < /dev/null` in
4857 *GNU*)
4858 GNULD=yes;;
4859 *)
4860 GNULD=no;;
4861esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4863$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4866$as_echo_n "checking for inline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004867if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004868 $as_echo_n "(cached) " >&6
4869else
4870 ac_cv_c_inline=no
4871for ac_kw in inline __inline__ __inline; do
4872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4873/* end confdefs.h. */
4874#ifndef __cplusplus
4875typedef int foo_t;
4876static $ac_kw foo_t static_foo () {return 0; }
4877$ac_kw foo_t foo () {return 0; }
4878#endif
4879
4880_ACEOF
4881if ac_fn_c_try_compile "$LINENO"; then :
4882 ac_cv_c_inline=$ac_kw
4883fi
4884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4885 test "$ac_cv_c_inline" != no && break
4886done
4887
4888fi
4889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4890$as_echo "$ac_cv_c_inline" >&6; }
4891
4892case $ac_cv_c_inline in
4893 inline | yes) ;;
4894 *)
4895 case $ac_cv_c_inline in
4896 no) ac_val=;;
4897 *) ac_val=$ac_cv_c_inline;;
4898 esac
4899 cat >>confdefs.h <<_ACEOF
4900#ifndef __cplusplus
4901#define inline $ac_val
4902#endif
4903_ACEOF
4904 ;;
4905esac
4906
4907if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004908
4909$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004910
4911
4912fi
4913
4914
Matthias Kloseb9621712010-04-24 17:59:49 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4916$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004918if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919 enableval=$enable_shared;
4920fi
4921
4922
4923if test -z "$enable_shared"
4924then
4925 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004926 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 enable_shared="yes";;
4928 *)
4929 enable_shared="no";;
4930 esac
4931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4933$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934
Matthias Kloseb9621712010-04-24 17:59:49 +00004935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4936$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004938if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939 enableval=$enable_profiling; ac_save_cc="$CC"
4940 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004941 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942 ac_enable_profiling="no"
4943else
Matthias Kloseb9621712010-04-24 17:59:49 +00004944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945/* end confdefs.h. */
4946int main() { return 0; }
4947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004948if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 ac_enable_profiling="yes"
4950else
Matthias Kloseb9621712010-04-24 17:59:49 +00004951 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955fi
4956
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 CC="$ac_save_cc"
4958fi
4959
Matthias Kloseb9621712010-04-24 17:59:49 +00004960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4961$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962
4963case "$ac_enable_profiling" in
4964 "yes")
4965 BASECFLAGS="-pg $BASECFLAGS"
4966 LDFLAGS="-pg $LDFLAGS"
4967 ;;
4968esac
4969
Matthias Kloseb9621712010-04-24 17:59:49 +00004970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4971$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972
4973# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4974# library that we build, but we do not want to link against it (we
4975# will find it with a -framework option). For this reason there is an
4976# extra variable BLDLIBRARY against which Python and the extension
4977# modules are linked, BLDLIBRARY. This is normally the same as
4978# LDLIBRARY, but empty for MacOSX framework builds.
4979if test "$enable_framework"
4980then
4981 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4982 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4983 BLDLIBRARY=''
4984else
4985 BLDLIBRARY='$(LDLIBRARY)'
4986fi
4987
4988# Other platforms follow
4989if test $enable_shared = "yes"; then
4990
Matthias Kloseb9621712010-04-24 17:59:49 +00004991$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992
4993 case $ac_sys_system in
4994 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004995 LDLIBRARY='libpython$(LDVERSION).dll.a'
4996 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997 ;;
4998 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004999 LDLIBRARY='libpython$(LDVERSION).so'
5000 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005001 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5002 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005003 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005004 then
5005 PY3LIBRARY=libpython3.so
5006 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007 ;;
5008 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005009 LDLIBRARY='libpython$(LDVERSION).so'
5010 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5012 case $ac_sys_system in
5013 FreeBSD*)
5014 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5015 ;;
5016 esac
5017 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005018 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005019 then
5020 PY3LIBRARY=libpython3.so
5021 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022 ;;
5023 hp*|HP*)
5024 case `uname -m` in
5025 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005026 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027 ;;
5028 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005029 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030 ;;
5031 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005032 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5034 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005036 LDLIBRARY='libpython$(LDVERSION).dylib'
5037 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5039 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005040 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005041 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005042 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5043 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044
5045 esac
5046else # shared is disabled
5047 case $ac_sys_system in
5048 CYGWIN*)
5049 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005050 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051 ;;
5052 esac
5053fi
5054
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5056$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057
5058if test -n "$ac_tool_prefix"; then
5059 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5060set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005063if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065else
5066 if test -n "$RANLIB"; then
5067 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5068else
5069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070for as_dir in $PATH
5071do
5072 IFS=$as_save_IFS
5073 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5076 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078 break 2
5079 fi
5080done
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082IFS=$as_save_IFS
5083
5084fi
5085fi
5086RANLIB=$ac_cv_prog_RANLIB
5087if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5089$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090else
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093fi
5094
5095
5096fi
5097if test -z "$ac_cv_prog_RANLIB"; then
5098 ac_ct_RANLIB=$RANLIB
5099 # Extract the first word of "ranlib", so it can be a program name with args.
5100set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5102$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005103if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005105else
5106 if test -n "$ac_ct_RANLIB"; then
5107 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5108else
5109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5110for as_dir in $PATH
5111do
5112 IFS=$as_save_IFS
5113 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005115 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5116 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118 break 2
5119 fi
5120done
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122IFS=$as_save_IFS
5123
5124fi
5125fi
5126ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5127if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5129$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130else
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5132$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133fi
5134
5135 if test "x$ac_ct_RANLIB" = x; then
5136 RANLIB=":"
5137 else
5138 case $cross_compiling:$ac_tool_warned in
5139yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142ac_tool_warned=yes ;;
5143esac
5144 RANLIB=$ac_ct_RANLIB
5145 fi
5146else
5147 RANLIB="$ac_cv_prog_RANLIB"
5148fi
5149
5150
5151for ac_prog in ar aal
5152do
5153 # Extract the first word of "$ac_prog", so it can be a program name with args.
5154set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005157if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005158 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159else
5160 if test -n "$AR"; then
5161 ac_cv_prog_AR="$AR" # Let the user override the test.
5162else
5163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5164for as_dir in $PATH
5165do
5166 IFS=$as_save_IFS
5167 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005168 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5170 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172 break 2
5173 fi
5174done
Matthias Kloseb9621712010-04-24 17:59:49 +00005175 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005176IFS=$as_save_IFS
5177
5178fi
5179fi
5180AR=$ac_cv_prog_AR
5181if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5183$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184else
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5186$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005187fi
5188
5189
5190 test -n "$AR" && break
5191done
5192test -n "$AR" || AR="ar"
5193
5194
5195# tweak ARFLAGS only if the user didn't set it on the command line
5196
5197if test -z "$ARFLAGS"
5198then
5199 ARFLAGS="rc"
5200fi
5201
5202
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005203DISABLE_ASDLGEN=""
5204# Extract the first word of "python", so it can be a program name with args.
5205set dummy python; ac_word=$2
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5207$as_echo_n "checking for $ac_word... " >&6; }
5208if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
5209 $as_echo_n "(cached) " >&6
5210else
5211 if test -n "$HAS_PYTHON"; then
5212 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5213else
5214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5215for as_dir in $PATH
5216do
5217 IFS=$as_save_IFS
5218 test -z "$as_dir" && as_dir=.
5219 for ac_exec_ext in '' $ac_executable_extensions; do
5220 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5221 ac_cv_prog_HAS_PYTHON="found"
5222 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5223 break 2
5224 fi
5225done
5226 done
5227IFS=$as_save_IFS
5228
5229 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5230fi
5231fi
5232HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5233if test -n "$HAS_PYTHON"; then
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5235$as_echo "$HAS_PYTHON" >&6; }
5236else
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238$as_echo "no" >&6; }
5239fi
5240
5241
5242if test $HAS_HG != found -o $HAS_PYTHON != found
5243then
5244 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5245fi
5246
5247
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005248case $MACHDEP in
5249bsdos*|hp*|HP*)
5250 # install -d does not work on BSDI or HP-UX
5251 if test -z "$INSTALL"
5252 then
5253 INSTALL="${srcdir}/install-sh -c"
5254 fi
5255esac
5256ac_aux_dir=
5257for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005258 if test -f "$ac_dir/install-sh"; then
5259 ac_aux_dir=$ac_dir
5260 ac_install_sh="$ac_aux_dir/install-sh -c"
5261 break
5262 elif test -f "$ac_dir/install.sh"; then
5263 ac_aux_dir=$ac_dir
5264 ac_install_sh="$ac_aux_dir/install.sh -c"
5265 break
5266 elif test -f "$ac_dir/shtool"; then
5267 ac_aux_dir=$ac_dir
5268 ac_install_sh="$ac_aux_dir/shtool install -c"
5269 break
5270 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005271done
5272if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005273 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274fi
5275
5276# These three variables are undocumented and unsupported,
5277# and are intended to be withdrawn in a future Autoconf release.
5278# They can cause serious problems if a builder's source tree is in a directory
5279# whose full name contains unusual characters.
5280ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5281ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5282ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5283
5284
5285# Find a good install program. We prefer a C program (faster),
5286# so one script is as good as another. But avoid the broken or
5287# incompatible versions:
5288# SysV /etc/install, /usr/sbin/install
5289# SunOS /usr/etc/install
5290# IRIX /sbin/install
5291# AIX /bin/install
5292# AmigaOS /C/install, which installs bootblocks on floppy discs
5293# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5294# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5295# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5296# OS/2's system install, which has a completely different semantic
5297# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005298# Reject install programs that cannot install multiple files.
5299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5300$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301if test -z "$INSTALL"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005302if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005303 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304else
5305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5306for as_dir in $PATH
5307do
5308 IFS=$as_save_IFS
5309 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005310 # Account for people who put trailing slashes in PATH elements.
5311case $as_dir/ in #((
5312 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005314 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315 /usr/ucb/* ) ;;
5316 *)
5317 # OSF1 and SCO ODT 3.0 have their own names for install.
5318 # Don't use installbsd from OSF since it installs stuff as root
5319 # by default.
5320 for ac_prog in ginstall scoinst install; do
5321 for ac_exec_ext in '' $ac_executable_extensions; do
5322 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5323 if test $ac_prog = install &&
5324 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5325 # AIX install. It has an incompatible calling convention.
5326 :
5327 elif test $ac_prog = install &&
5328 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5329 # program-specific install script used by HP pwplus--don't use.
5330 :
5331 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005332 rm -rf conftest.one conftest.two conftest.dir
5333 echo one > conftest.one
5334 echo two > conftest.two
5335 mkdir conftest.dir
5336 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5337 test -s conftest.one && test -s conftest.two &&
5338 test -s conftest.dir/conftest.one &&
5339 test -s conftest.dir/conftest.two
5340 then
5341 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5342 break 3
5343 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344 fi
5345 fi
5346 done
5347 done
5348 ;;
5349esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005350
5351 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352IFS=$as_save_IFS
5353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355
5356fi
5357 if test "${ac_cv_path_install+set}" = set; then
5358 INSTALL=$ac_cv_path_install
5359 else
5360 # As a last resort, use the slow shell script. Don't cache a
5361 # value for INSTALL within a source directory, because that will
5362 # break other packages using the cache if that directory is
5363 # removed, or if the value is a relative name.
5364 INSTALL=$ac_install_sh
5365 fi
5366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5368$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369
5370# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5371# It thinks the first close brace ends the variable substitution.
5372test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5373
5374test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5375
5376test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5377
5378
5379# Not every filesystem supports hard links
5380
5381if test -z "$LN" ; then
5382 case $ac_sys_system in
5383 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005384 *) LN=ln;;
5385 esac
5386fi
5387
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005388# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005389
5390ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005391
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5394$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005395
5396# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005397if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398 withval=$with_pydebug;
5399if test "$withval" != no
5400then
5401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5405$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005407 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005408else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5409$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410fi
5411else
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5413$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414fi
5415
5416
5417# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5418# merged with this chunk of code?
5419
5420# Optimizer/debugger flags
5421# ------------------------
5422# (The following bit of code is complicated enough - please keep things
5423# indented properly. Just pretend you're editing Python code. ;-)
5424
5425# There are two parallel sets of case statements below, one that checks to
5426# see if OPT was set and one that does BASECFLAGS setting based upon
5427# compiler and platform. BASECFLAGS tweaks need to be made even if the
5428# user set OPT.
5429
5430# tweak OPT based on compiler and platform, only if the user didn't set
5431# it on the command line
5432
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005433if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434then
5435 case $GCC in
5436 yes)
5437 if test "$CC" != 'g++' ; then
5438 STRICT_PROTO="-Wstrict-prototypes"
5439 fi
5440 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5441 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5442 WRAP="-fwrapv"
5443 fi
5444 case $ac_cv_prog_cc_g in
5445 yes)
5446 if test "$Py_DEBUG" = 'true' ; then
5447 # Optimization messes up debuggers, so turn it off for
5448 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005449 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450 else
5451 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5452 fi
5453 ;;
5454 *)
5455 OPT="-O3 -Wall $STRICT_PROTO"
5456 ;;
5457 esac
5458 case $ac_sys_system in
5459 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5460 ;;
5461 esac
5462 ;;
5463
5464 *)
5465 OPT="-O"
5466 ;;
5467 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468fi
5469
5470
5471
5472# The -arch flags for universal builds on OSX
5473UNIVERSAL_ARCH_FLAGS=
5474
5475
5476# tweak BASECFLAGS based on compiler and platform
5477case $GCC in
5478yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005479 # Python doesn't violate C99 aliasing rules, but older versions of
5480 # GCC produce warnings for legal Python code. Enable
5481 # -fno-strict-aliasing on versions of GCC that support but produce
5482 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5484$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485 ac_save_cc="$CC"
5486 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005487 save_CFLAGS="$CFLAGS"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005488 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005489 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005490else
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005493
Matthias Kloseb159a552010-04-25 21:00:44 +00005494
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005495int
5496main ()
5497{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005498
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005499 ;
5500 return 0;
5501}
Matthias Kloseb159a552010-04-25 21:00:44 +00005502
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005504if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005505
5506 CC="$ac_save_cc -fstrict-aliasing"
5507 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005509/* end confdefs.h. */
5510
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005511 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005512int
5513main ()
5514{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005515double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005516 ;
5517 return 0;
5518}
Matthias Kloseb159a552010-04-25 21:00:44 +00005519
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005521if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005522
5523 ac_cv_no_strict_aliasing=no
5524
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525else
Matthias Kloseb159a552010-04-25 21:00:44 +00005526
5527 ac_cv_no_strict_aliasing=yes
5528
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005529fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005531
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005532else
Matthias Kloseb159a552010-04-25 21:00:44 +00005533
5534 ac_cv_no_strict_aliasing=no
5535
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005538fi
5539
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005540 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5543$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005544 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545 then
5546 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5547 fi
5548
5549 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5550 # support. Without this, treatment of subnormals doesn't follow
5551 # the standard.
5552 case $ac_sys_machine in
5553 alpha*)
5554 BASECFLAGS="$BASECFLAGS -mieee"
5555 ;;
5556 esac
5557
5558 case $ac_sys_system in
5559 SCO_SV*)
5560 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5561 ;;
5562 # is there any other compiler on Darwin besides gcc?
5563 Darwin*)
5564 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5565 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005566 if test "${CC}" = gcc
5567 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5569$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005570 case "${UNIVERSALSDK}" in
5571 */MacOSX10.4u.sdk)
5572 # Build using 10.4 SDK, force usage of gcc when the
5573 # compiler is gcc, otherwise the user will get very
5574 # confusing error messages when building on OSX 10.6
5575 CC=gcc-4.0
5576 CPP=cpp-4.0
5577 ;;
5578 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5580$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005581 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582
5583
5584 if test "${enable_universalsdk}"; then
5585 UNIVERSAL_ARCH_FLAGS=""
5586 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5587 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5588 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005589 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5591 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005592 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005593 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594
5595 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5596 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005597 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005598 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005600 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5601 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005602 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005603 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005604
5605 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5606 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005607 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005608 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005611 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 +00005612
5613 fi
5614
5615
Ronald Oussoren666028b2010-04-18 19:07:43 +00005616 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5617 if test "${UNIVERSALSDK}" != "/"
5618 then
5619 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5620 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005621 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 fi
5623 fi
5624
5625 # Calculate the right deployment target for this build.
5626 #
5627 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5628 if test ${cur_target} '>' 10.2; then
5629 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005630 if test ${enable_universalsdk}; then
5631 if test "${UNIVERSAL_ARCHS}" = "all"; then
5632 # Ensure that the default platform for a
5633 # 4-way universal build is OSX 10.5,
5634 # that's the first OS release where
5635 # 4-way builds make sense.
5636 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005637
5638 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5639 cur_target='10.5'
5640
5641 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5642 cur_target='10.5'
5643
5644 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5645 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005646 fi
5647 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005648 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005649 # On Intel macs default to a deployment
5650 # target of 10.4, that's the first OSX
5651 # release with Intel support.
5652 cur_target="10.4"
5653 fi
5654 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 fi
5656 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5657
5658 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5659 # environment with a value that is the same as what we'll use
5660 # in the Makefile to ensure that we'll get the same compiler
5661 # environment during configure and build time.
5662 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5663 export MACOSX_DEPLOYMENT_TARGET
5664 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5665
5666 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 esac
5668 ;;
5669
5670*)
5671 case $ac_sys_system in
5672 OpenUNIX*|UnixWare*)
5673 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5674 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 SCO_SV*)
5676 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5677 ;;
5678 esac
5679 ;;
5680esac
5681
5682if test "$Py_DEBUG" = 'true'; then
5683 :
5684else
5685 OPT="-DNDEBUG $OPT"
5686fi
5687
5688if test "$ac_arch_flags"
5689then
5690 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5691fi
5692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693# Check whether GCC supports PyArg_ParseTuple format
5694if test "$GCC" = "yes"
5695then
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5697$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698 save_CFLAGS=$CFLAGS
5699 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701/* end confdefs.h. */
5702
5703 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704int
5705main ()
5706{
5707
5708 ;
5709 return 0;
5710}
Matthias Kloseb159a552010-04-25 21:00:44 +00005711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005713if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
Matthias Kloseb159a552010-04-25 21:00:44 +00005715
Matthias Kloseb9621712010-04-24 17:59:49 +00005716$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
Matthias Kloseb159a552010-04-25 21:00:44 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005719$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721else
Matthias Kloseb159a552010-04-25 21:00:44 +00005722
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005724$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
5726fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5728 CFLAGS=$save_CFLAGS
5729fi
5730
5731# On some compilers, pthreads are available without further options
5732# (e.g. MacOS X). On some of these systems, the compiler will not
5733# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5734# So we have to see first whether pthreads are available without
5735# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5737$as_echo_n "checking whether pthreads are available without options... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005738if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740else
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742 ac_cv_pthread_is_default=no
5743else
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745/* end confdefs.h. */
5746
5747#include <pthread.h>
5748
5749void* routine(void* p){return NULL;}
5750
5751int main(){
5752 pthread_t p;
5753 if(pthread_create(&p,NULL,routine,NULL)!=0)
5754 return 1;
5755 (void)pthread_detach(p);
5756 return 0;
5757}
5758
5759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005760if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761
5762 ac_cv_pthread_is_default=yes
5763 ac_cv_kthread=no
5764 ac_cv_pthread=no
5765
5766else
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771fi
5772
5773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774fi
5775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5777$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779
5780if test $ac_cv_pthread_is_default = yes
5781then
5782 ac_cv_kpthread=no
5783else
5784# -Kpthread, if available, provides the right #defines
5785# and linker options to make pthread_create available
5786# Some compilers won't report that they do not support -Kpthread,
5787# so we need to run a program to see whether it really made the
5788# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5790$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005791if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005792 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793else
5794 ac_save_cc="$CC"
5795CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005796if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797 ac_cv_kpthread=no
5798else
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800/* end confdefs.h. */
5801
5802#include <pthread.h>
5803
5804void* routine(void* p){return NULL;}
5805
5806int main(){
5807 pthread_t p;
5808 if(pthread_create(&p,NULL,routine,NULL)!=0)
5809 return 1;
5810 (void)pthread_detach(p);
5811 return 0;
5812}
5813
5814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005815if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 ac_cv_kpthread=yes
5817else
Matthias Kloseb9621712010-04-24 17:59:49 +00005818 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822fi
5823
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824CC="$ac_save_cc"
5825fi
5826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5828$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829fi
5830
5831if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5832then
5833# -Kthread, if available, provides the right #defines
5834# and linker options to make pthread_create available
5835# Some compilers won't report that they do not support -Kthread,
5836# so we need to run a program to see whether it really made the
5837# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5839$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005840if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005841 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842else
5843 ac_save_cc="$CC"
5844CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005845if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 ac_cv_kthread=no
5847else
Matthias Kloseb9621712010-04-24 17:59:49 +00005848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849/* end confdefs.h. */
5850
5851#include <pthread.h>
5852
5853void* routine(void* p){return NULL;}
5854
5855int main(){
5856 pthread_t p;
5857 if(pthread_create(&p,NULL,routine,NULL)!=0)
5858 return 1;
5859 (void)pthread_detach(p);
5860 return 0;
5861}
5862
5863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 ac_cv_kthread=yes
5866else
Matthias Kloseb9621712010-04-24 17:59:49 +00005867 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
5872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873CC="$ac_save_cc"
5874fi
5875
Matthias Kloseb9621712010-04-24 17:59:49 +00005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5877$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878fi
5879
5880if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5881then
5882# -pthread, if available, provides the right #defines
5883# and linker options to make pthread_create available
5884# Some compilers won't report that they do not support -pthread,
5885# so we need to run a program to see whether it really made the
5886# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5888$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005889if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005890 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891else
5892 ac_save_cc="$CC"
5893CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005894if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 ac_cv_pthread=no
5896else
Matthias Kloseb9621712010-04-24 17:59:49 +00005897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898/* end confdefs.h. */
5899
5900#include <pthread.h>
5901
5902void* routine(void* p){return NULL;}
5903
5904int main(){
5905 pthread_t p;
5906 if(pthread_create(&p,NULL,routine,NULL)!=0)
5907 return 1;
5908 (void)pthread_detach(p);
5909 return 0;
5910}
5911
5912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005913if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ac_cv_pthread=yes
5915else
Matthias Kloseb9621712010-04-24 17:59:49 +00005916 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920fi
5921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922CC="$ac_save_cc"
5923fi
5924
Matthias Kloseb9621712010-04-24 17:59:49 +00005925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5926$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927fi
5928
5929# If we have set a CC compiler flag for thread support then
5930# check if it works for CXX, too.
5931ac_cv_cxx_thread=no
5932if test ! -z "$CXX"
5933then
Matthias Kloseb9621712010-04-24 17:59:49 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5935$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936ac_save_cxx="$CXX"
5937
5938if test "$ac_cv_kpthread" = "yes"
5939then
5940 CXX="$CXX -Kpthread"
5941 ac_cv_cxx_thread=yes
5942elif test "$ac_cv_kthread" = "yes"
5943then
5944 CXX="$CXX -Kthread"
5945 ac_cv_cxx_thread=yes
5946elif test "$ac_cv_pthread" = "yes"
5947then
5948 CXX="$CXX -pthread"
5949 ac_cv_cxx_thread=yes
5950fi
5951
5952if test $ac_cv_cxx_thread = yes
5953then
5954 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5955 $CXX -c conftest.$ac_ext 2>&5
5956 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5957 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5958 then
5959 ac_cv_cxx_thread=yes
5960 else
5961 ac_cv_cxx_thread=no
5962 fi
5963 rm -fr conftest*
5964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5966$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967fi
5968CXX="$ac_save_cxx"
5969
5970
5971# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5973$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005974if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976else
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978/* end confdefs.h. */
5979#include <stdlib.h>
5980#include <stdarg.h>
5981#include <string.h>
5982#include <float.h>
5983
5984int
5985main ()
5986{
5987
5988 ;
5989 return 0;
5990}
5991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005992if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ac_cv_header_stdc=yes
5994else
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5998
5999if test $ac_cv_header_stdc = yes; then
6000 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002/* end confdefs.h. */
6003#include <string.h>
6004
6005_ACEOF
6006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 $EGREP "memchr" >/dev/null 2>&1; then :
6008
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009else
6010 ac_cv_header_stdc=no
6011fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006012rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013
6014fi
6015
6016if test $ac_cv_header_stdc = yes; then
6017 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019/* end confdefs.h. */
6020#include <stdlib.h>
6021
6022_ACEOF
6023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 $EGREP "free" >/dev/null 2>&1; then :
6025
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026else
6027 ac_cv_header_stdc=no
6028fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006029rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030
6031fi
6032
6033if test $ac_cv_header_stdc = yes; then
6034 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036 :
6037else
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039/* end confdefs.h. */
6040#include <ctype.h>
6041#include <stdlib.h>
6042#if ((' ' & 0x0FF) == 0x020)
6043# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6044# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6045#else
6046# define ISLOWER(c) \
6047 (('a' <= (c) && (c) <= 'i') \
6048 || ('j' <= (c) && (c) <= 'r') \
6049 || ('s' <= (c) && (c) <= 'z'))
6050# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6051#endif
6052
6053#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6054int
6055main ()
6056{
6057 int i;
6058 for (i = 0; i < 256; i++)
6059 if (XOR (islower (i), ISLOWER (i))
6060 || toupper (i) != TOUPPER (i))
6061 return 2;
6062 return 0;
6063}
6064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006065if ac_fn_c_try_run "$LINENO"; then :
6066
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067else
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6071 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072fi
6073
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074fi
6075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6077$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078if test $ac_cv_header_stdc = yes; then
6079
Matthias Kloseb9621712010-04-24 17:59:49 +00006080$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081
6082fi
6083
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006084for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6085fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006086ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006087shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006088unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006089sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6090sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006091sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6092sys/stat.h sys/termio.h sys/time.h \
6093sys/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 -07006094libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006095bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006096do :
6097 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6098ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006099if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006100 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006101#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006102_ACEOF
6103
6104fi
6105
Guido van Rossum627b2d71993-12-24 10:39:16 +00006106done
6107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006108ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006109for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6112$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006113if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006115else
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006117/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006118#include <sys/types.h>
6119#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006120
Martin v. Löwis11437992002-04-12 09:54:03 +00006121int
6122main ()
6123{
6124if ((DIR *) 0)
6125return 0;
6126 ;
6127 return 0;
6128}
6129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006131 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006132else
Matthias Kloseb9621712010-04-24 17:59:49 +00006133 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006137eval ac_res=\$$as_ac_Header
6138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6139$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006140if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006141 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006142#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006143_ACEOF
6144
6145ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148done
6149# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6150if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6152$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006153if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006155else
Martin v. Löwis11437992002-04-12 09:54:03 +00006156 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160/* Override any GCC internal prototype to avoid an error.
6161 Use char because int might match the return type of a GCC
6162 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006163#ifdef __cplusplus
6164extern "C"
6165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006166char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006167int
6168main ()
6169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006171 ;
6172 return 0;
6173}
6174_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175for ac_lib in '' dir; do
6176 if test -z "$ac_lib"; then
6177 ac_res="none required"
6178 else
6179 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006180 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006185rm -f core conftest.err conftest.$ac_objext \
6186 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006187 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006188 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006191if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006193else
6194 ac_cv_search_opendir=no
6195fi
6196rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006197LIBS=$ac_func_search_save_LIBS
6198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6200$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006202if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006204
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006205fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006206
Michael W. Hudson54241132001-12-07 15:38:26 +00006207else
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6209$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006210if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006212else
6213 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006217/* Override any GCC internal prototype to avoid an error.
6218 Use char because int might match the return type of a GCC
6219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006220#ifdef __cplusplus
6221extern "C"
6222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006223char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006224int
6225main ()
6226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006227return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006228 ;
6229 return 0;
6230}
6231_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232for ac_lib in '' x; do
6233 if test -z "$ac_lib"; then
6234 ac_res="none required"
6235 else
6236 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006237 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006239 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006242rm -f core conftest.err conftest.$ac_objext \
6243 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006244 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006245 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006247done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006248if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006250else
6251 ac_cv_search_opendir=no
6252fi
6253rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006254LIBS=$ac_func_search_save_LIBS
6255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6257$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006258ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006259if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006261
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006262fi
6263
6264fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006265
Matthias Kloseb9621712010-04-24 17:59:49 +00006266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6267$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006268if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006269 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006270else
Matthias Kloseb9621712010-04-24 17:59:49 +00006271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006272/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274int
6275main ()
6276{
6277return makedev(0, 0);
6278 ;
6279 return 0;
6280}
6281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006282if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283 ac_cv_header_sys_types_h_makedev=yes
6284else
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006287rm -f core conftest.err conftest.$ac_objext \
6288 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289
6290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6292$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006293
6294if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006295ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006296if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006297
Matthias Kloseb9621712010-04-24 17:59:49 +00006298$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299
6300fi
6301
6302
6303
6304 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006305 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006306if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006307
Matthias Kloseb9621712010-04-24 17:59:49 +00006308$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006309
6310fi
6311
6312
6313 fi
6314fi
6315
Michael W. Hudson54241132001-12-07 15:38:26 +00006316
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006317# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6318for ac_header in net/if.h
6319do :
6320 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6321#ifdef STDC_HEADERS
6322# include <stdlib.h>
6323# include <stddef.h>
6324#else
6325# ifdef HAVE_STDLIB_H
6326# include <stdlib.h>
6327# endif
6328#endif
6329#ifdef HAVE_SYS_SOCKET_H
6330# include <sys/socket.h>
6331#endif
6332
6333"
6334if test "x$ac_cv_header_net_if_h" = x""yes; then :
6335 cat >>confdefs.h <<_ACEOF
6336#define HAVE_NET_IF_H 1
6337_ACEOF
6338
6339fi
6340
6341done
6342
6343
6344
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006346for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006347do :
6348 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006349#ifdef HAVE_CURSES_H
6350#include <curses.h>
6351#endif
6352
Matthias Kloseb9621712010-04-24 17:59:49 +00006353"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006354if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006355 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006356#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006357_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006359fi
6360
6361done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362
6363
Martin v. Löwis11017b12006-01-14 18:12:57 +00006364# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006365for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006366do :
6367 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 +00006368#ifdef HAVE_ASM_TYPES_H
6369#include <asm/types.h>
6370#endif
6371#ifdef HAVE_SYS_SOCKET_H
6372#include <sys/socket.h>
6373#endif
6374
Matthias Kloseb9621712010-04-24 17:59:49 +00006375"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006376if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006378#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006379_ACEOF
6380
6381fi
6382
6383done
6384
6385
Guido van Rossum627b2d71993-12-24 10:39:16 +00006386# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006387was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6389$as_echo_n "checking for clock_t in time.h... " >&6; }
6390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006391/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006392#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006393
6394_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006396 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006397 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006398else
Martin v. Löwis11437992002-04-12 09:54:03 +00006399
6400
Matthias Kloseb9621712010-04-24 17:59:49 +00006401$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006402
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006403
Guido van Rossum627b2d71993-12-24 10:39:16 +00006404fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006405rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006406
Matthias Kloseb9621712010-04-24 17:59:49 +00006407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6408$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6411$as_echo_n "checking for makedev... " >&6; }
6412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006413/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006414
Jesus Cea740f53a2010-04-28 11:35:30 +00006415#if defined(MAJOR_IN_MKDEV)
6416#include <sys/mkdev.h>
6417#elif defined(MAJOR_IN_SYSMACROS)
6418#include <sys/sysmacros.h>
6419#else
6420#include <sys/types.h>
6421#endif
6422
Neal Norwitz11690112002-07-30 01:08:28 +00006423int
6424main ()
6425{
Jesus Cea740f53a2010-04-28 11:35:30 +00006426
6427 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006428 ;
6429 return 0;
6430}
Matthias Kloseb159a552010-04-25 21:00:44 +00006431
Neal Norwitz11690112002-07-30 01:08:28 +00006432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006433if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006434 ac_cv_has_makedev=yes
6435else
Matthias Kloseb9621712010-04-24 17:59:49 +00006436 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006438rm -f core conftest.err conftest.$ac_objext \
6439 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6441$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006442if test "$ac_cv_has_makedev" = "yes"; then
6443
Matthias Kloseb9621712010-04-24 17:59:49 +00006444$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006445
6446fi
6447
Martin v. Löwis399a6892002-10-04 10:22:02 +00006448# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6449# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6450# defined, but the compiler does not support pragma redefine_extname,
6451# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6452# structures (such as rlimit64) without declaring them. As a
6453# work-around, disable LFS on such configurations
6454
6455use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6457$as_echo_n "checking Solaris LFS bug... " >&6; }
6458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006459/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006460
6461#define _LARGEFILE_SOURCE 1
6462#define _FILE_OFFSET_BITS 64
6463#include <sys/resource.h>
6464
Martin v. Löwis399a6892002-10-04 10:22:02 +00006465int
6466main ()
6467{
6468struct rlimit foo;
6469 ;
6470 return 0;
6471}
6472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474 sol_lfs_bug=no
6475else
Matthias Kloseb9621712010-04-24 17:59:49 +00006476 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6480$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006481if test "$sol_lfs_bug" = "yes"; then
6482 use_lfs=no
6483fi
6484
6485if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006486# Two defines needed to enable largefile support on various platforms
6487# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006488case $ac_sys_system/$ac_sys_release in
6489AIX*)
6490
6491$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6492
6493 ;;
6494esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006495
Matthias Kloseb9621712010-04-24 17:59:49 +00006496$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006497
6498
Matthias Kloseb9621712010-04-24 17:59:49 +00006499$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006500
Martin v. Löwis399a6892002-10-04 10:22:02 +00006501fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006502
Guido van Rossum84e7b241996-08-19 21:59:00 +00006503# Add some code to confdefs.h so that the test for off_t works on SCO
6504cat >> confdefs.h <<\EOF
6505#if defined(SCO_DS)
6506#undef _OFF_T
6507#endif
6508EOF
6509
Guido van Rossumef2255b2000-03-10 22:30:29 +00006510# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006511ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006512if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006513
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006514else
Martin v. Löwis11437992002-04-12 09:54:03 +00006515
6516cat >>confdefs.h <<_ACEOF
6517#define mode_t int
6518_ACEOF
6519
6520fi
6521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006523if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525else
Martin v. Löwis11437992002-04-12 09:54:03 +00006526
6527cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006528#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006529_ACEOF
6530
6531fi
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006534if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006536else
Martin v. Löwis11437992002-04-12 09:54:03 +00006537
6538cat >>confdefs.h <<_ACEOF
6539#define pid_t int
6540_ACEOF
6541
6542fi
6543
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006544
Martin v. Löwis11437992002-04-12 09:54:03 +00006545cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006546#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006548
Matthias Kloseb9621712010-04-24 17:59:49 +00006549ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006550if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006552else
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
6554cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006556_ACEOF
6557
6558fi
6559
Matthias Kloseb9621712010-04-24 17:59:49 +00006560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6561$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006562if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006563 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006564else
Matthias Kloseb9621712010-04-24 17:59:49 +00006565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006566/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006568
6569_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006572 ac_cv_type_uid_t=yes
6573else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006574 ac_cv_type_uid_t=no
6575fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006576rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006577
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6580$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006581if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006582
Matthias Kloseb9621712010-04-24 17:59:49 +00006583$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006584
6585
Matthias Kloseb9621712010-04-24 17:59:49 +00006586$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006587
6588fi
6589
Matthias Kloseb9621712010-04-24 17:59:49 +00006590ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6591case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006592 no|yes) ;; #(
6593 *)
6594
Matthias Kloseb9621712010-04-24 17:59:49 +00006595$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006596
6597
6598cat >>confdefs.h <<_ACEOF
6599#define uint32_t $ac_cv_c_uint32_t
6600_ACEOF
6601;;
6602 esac
6603
Matthias Kloseb9621712010-04-24 17:59:49 +00006604ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6605case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006606 no|yes) ;; #(
6607 *)
6608
Matthias Kloseb9621712010-04-24 17:59:49 +00006609$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006610
6611
6612cat >>confdefs.h <<_ACEOF
6613#define uint64_t $ac_cv_c_uint64_t
6614_ACEOF
6615;;
6616 esac
6617
Matthias Kloseb9621712010-04-24 17:59:49 +00006618ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6619case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006620 no|yes) ;; #(
6621 *)
6622
6623cat >>confdefs.h <<_ACEOF
6624#define int32_t $ac_cv_c_int32_t
6625_ACEOF
6626;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006627esac
6628
Matthias Kloseb9621712010-04-24 17:59:49 +00006629ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6630case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006631 no|yes) ;; #(
6632 *)
6633
6634cat >>confdefs.h <<_ACEOF
6635#define int64_t $ac_cv_c_int64_t
6636_ACEOF
6637;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006638esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006639
Matthias Kloseb9621712010-04-24 17:59:49 +00006640ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006641if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006642
Matthias Kloseb9621712010-04-24 17:59:49 +00006643$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006644
6645fi
6646
Jack Jansendd19cf82001-12-06 22:36:17 +00006647
Michael W. Hudson54241132001-12-07 15:38:26 +00006648# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006649# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650# The cast to long int works around a bug in the HP C Compiler
6651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6653# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6655$as_echo_n "checking size of int... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006656if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006658else
Matthias Kloseb9621712010-04-24 17:59:49 +00006659 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 +00006660
Martin v. Löwis11437992002-04-12 09:54:03 +00006661else
Matthias Kloseb9621712010-04-24 17:59:49 +00006662 if test "$ac_cv_type_int" = yes; then
6663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006665as_fn_error 77 "cannot compute sizeof (int)
6666See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667 else
6668 ac_cv_sizeof_int=0
6669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6674$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675
6676
6677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006679#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006680_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006681
6682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683# The cast to long int works around a bug in the HP C Compiler
6684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6686# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6688$as_echo_n "checking size of long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006689if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006691else
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 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 +00006693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694else
Matthias Kloseb9621712010-04-24 17:59:49 +00006695 if test "$ac_cv_type_long" = yes; then
6696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006698as_fn_error 77 "cannot compute sizeof (long)
6699See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700 else
6701 ac_cv_sizeof_long=0
6702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6707$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006708
6709
6710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006712#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006713_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006714
6715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006716# The cast to long int works around a bug in the HP C Compiler
6717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6719# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6721$as_echo_n "checking size of void *... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006722if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006724else
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 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 +00006726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 if test "$ac_cv_type_void_p" = yes; then
6729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006731as_fn_error 77 "cannot compute sizeof (void *)
6732See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733 else
6734 ac_cv_sizeof_void_p=0
6735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6740$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006741
6742
6743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006745#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006746_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006747
6748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006749# The cast to long int works around a bug in the HP C Compiler
6750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6752# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6754$as_echo_n "checking size of short... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006755if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006756 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006757else
Matthias Kloseb9621712010-04-24 17:59:49 +00006758 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 +00006759
Martin v. Löwis11437992002-04-12 09:54:03 +00006760else
Matthias Kloseb9621712010-04-24 17:59:49 +00006761 if test "$ac_cv_type_short" = yes; then
6762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006764as_fn_error 77 "cannot compute sizeof (short)
6765See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766 else
6767 ac_cv_sizeof_short=0
6768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6773$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774
6775
6776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006778#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006779_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006780
6781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782# The cast to long int works around a bug in the HP C Compiler
6783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6785# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6787$as_echo_n "checking size of float... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006788if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 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 +00006792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793else
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 if test "$ac_cv_type_float" = yes; then
6795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006797as_fn_error 77 "cannot compute sizeof (float)
6798See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799 else
6800 ac_cv_sizeof_float=0
6801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006803
Martin v. Löwis11437992002-04-12 09:54:03 +00006804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6806$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807
6808
6809
Martin v. Löwis11437992002-04-12 09:54:03 +00006810cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006812_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006813
6814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815# The cast to long int works around a bug in the HP C Compiler
6816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6818# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6820$as_echo_n "checking size of double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006821if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006823else
Matthias Kloseb9621712010-04-24 17:59:49 +00006824 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 +00006825
Martin v. Löwis11437992002-04-12 09:54:03 +00006826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 if test "$ac_cv_type_double" = yes; then
6828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006830as_fn_error 77 "cannot compute sizeof (double)
6831See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006832 else
6833 ac_cv_sizeof_double=0
6834 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006836
Martin v. Löwis11437992002-04-12 09:54:03 +00006837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6839$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006840
6841
6842
Martin v. Löwis11437992002-04-12 09:54:03 +00006843cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006844#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006845_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006846
6847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006848# The cast to long int works around a bug in the HP C Compiler
6849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6851# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6853$as_echo_n "checking size of fpos_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006854if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006855 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006856else
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 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 +00006858
Martin v. Löwis11437992002-04-12 09:54:03 +00006859else
Matthias Kloseb9621712010-04-24 17:59:49 +00006860 if test "$ac_cv_type_fpos_t" = yes; then
6861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006863as_fn_error 77 "cannot compute sizeof (fpos_t)
6864See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006865 else
6866 ac_cv_sizeof_fpos_t=0
6867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006869
Martin v. Löwis11437992002-04-12 09:54:03 +00006870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6872$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873
6874
6875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006877#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006878_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006879
Michael W. Hudson54241132001-12-07 15:38:26 +00006880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006881# The cast to long int works around a bug in the HP C Compiler
6882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6884# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6886$as_echo_n "checking size of size_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006887if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006889else
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 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 +00006891
Martin v. Löwis18e16552006-02-15 17:27:45 +00006892else
Matthias Kloseb9621712010-04-24 17:59:49 +00006893 if test "$ac_cv_type_size_t" = yes; then
6894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006896as_fn_error 77 "cannot compute sizeof (size_t)
6897See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006898 else
6899 ac_cv_sizeof_size_t=0
6900 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006902
Martin v. Löwis18e16552006-02-15 17:27:45 +00006903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6905$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906
6907
6908
Martin v. Löwis18e16552006-02-15 17:27:45 +00006909cat >>confdefs.h <<_ACEOF
6910#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6911_ACEOF
6912
6913
Christian Heimes400adb02008-02-01 08:12:03 +00006914# The cast to long int works around a bug in the HP C Compiler
6915# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6916# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6917# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6919$as_echo_n "checking size of pid_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006920if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006921 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006922else
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 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 +00006924
Christian Heimes400adb02008-02-01 08:12:03 +00006925else
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 if test "$ac_cv_type_pid_t" = yes; then
6927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006929as_fn_error 77 "cannot compute sizeof (pid_t)
6930See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006931 else
6932 ac_cv_sizeof_pid_t=0
6933 fi
6934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006935
Christian Heimes400adb02008-02-01 08:12:03 +00006936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6938$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006939
6940
6941
6942cat >>confdefs.h <<_ACEOF
6943#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6944_ACEOF
6945
6946
Michael W. Hudson54241132001-12-07 15:38:26 +00006947
Matthias Kloseb9621712010-04-24 17:59:49 +00006948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6949$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006950have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006952/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006953
Martin v. Löwis11437992002-04-12 09:54:03 +00006954int
6955main ()
6956{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006957long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 ;
6959 return 0;
6960}
6961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006963
6964
Matthias Kloseb9621712010-04-24 17:59:49 +00006965$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006966
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006967 have_long_long=yes
6968
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6972$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006973if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006974# The cast to long int works around a bug in the HP C Compiler
6975# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6976# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6977# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6979$as_echo_n "checking size of long long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006980if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006982else
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 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 +00006984
Martin v. Löwis11437992002-04-12 09:54:03 +00006985else
Matthias Kloseb9621712010-04-24 17:59:49 +00006986 if test "$ac_cv_type_long_long" = yes; then
6987 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006989as_fn_error 77 "cannot compute sizeof (long long)
6990See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006991 else
6992 ac_cv_sizeof_long_long=0
6993 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006995
Martin v. Löwis11437992002-04-12 09:54:03 +00006996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6998$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006999
7000
7001
Martin v. Löwis11437992002-04-12 09:54:03 +00007002cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007003#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007004_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007005
Michael W. Hudson54241132001-12-07 15:38:26 +00007006
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007007fi
7008
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7010$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007011have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007013/* end confdefs.h. */
7014
7015int
7016main ()
7017{
7018long double x; x = (long double)0;
7019 ;
7020 return 0;
7021}
7022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007023if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007024
7025
Matthias Kloseb9621712010-04-24 17:59:49 +00007026$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007027
7028 have_long_double=yes
7029
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007030fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7033$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007034if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007035# The cast to long int works around a bug in the HP C Compiler
7036# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7037# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7038# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7040$as_echo_n "checking size of long double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007041if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007042 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 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 +00007045
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 if test "$ac_cv_type_long_double" = yes; then
7048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007050as_fn_error 77 "cannot compute sizeof (long double)
7051See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007052 else
7053 ac_cv_sizeof_long_double=0
7054 fi
7055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007056
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7059$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007060
7061
7062
7063cat >>confdefs.h <<_ACEOF
7064#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7065_ACEOF
7066
7067
7068fi
7069
7070
Matthias Kloseb9621712010-04-24 17:59:49 +00007071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7072$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007073have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007075/* end confdefs.h. */
7076
7077int
7078main ()
7079{
7080_Bool x; x = (_Bool)0;
7081 ;
7082 return 0;
7083}
7084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007085if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007086
7087
Matthias Kloseb9621712010-04-24 17:59:49 +00007088$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007089
7090 have_c99_bool=yes
7091
Thomas Woutersb2137042007-02-01 18:02:27 +00007092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7095$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007096if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097# The cast to long int works around a bug in the HP C Compiler
7098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7100# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7102$as_echo_n "checking size of _Bool... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007103if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007105else
Matthias Kloseb9621712010-04-24 17:59:49 +00007106 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 +00007107
Thomas Woutersb2137042007-02-01 18:02:27 +00007108else
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 if test "$ac_cv_type__Bool" = yes; then
7110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007112as_fn_error 77 "cannot compute sizeof (_Bool)
7113See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114 else
7115 ac_cv_sizeof__Bool=0
7116 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118
Thomas Woutersb2137042007-02-01 18:02:27 +00007119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7121$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007122
7123
7124
Thomas Woutersb2137042007-02-01 18:02:27 +00007125cat >>confdefs.h <<_ACEOF
7126#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7127_ACEOF
7128
7129
7130fi
7131
Matthias Kloseb9621712010-04-24 17:59:49 +00007132ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007133 #include <stdint.h>
7134 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007135 #ifdef HAVE_INTTYPES_H
7136 #include <inttypes.h>
7137 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007138"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007139if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007140
7141cat >>confdefs.h <<_ACEOF
7142#define HAVE_UINTPTR_T 1
7143_ACEOF
7144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007145# The cast to long int works around a bug in the HP C Compiler
7146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7148# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7150$as_echo_n "checking size of uintptr_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007151if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007152 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007153else
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 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 +00007155
Martin v. Löwis11437992002-04-12 09:54:03 +00007156else
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 if test "$ac_cv_type_uintptr_t" = yes; then
7158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007160as_fn_error 77 "cannot compute sizeof (uintptr_t)
7161See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007162 else
7163 ac_cv_sizeof_uintptr_t=0
7164 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007166
Martin v. Löwis11437992002-04-12 09:54:03 +00007167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7169$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007170
7171
7172
Martin v. Löwis11437992002-04-12 09:54:03 +00007173cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007174#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007175_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007176
Michael W. Hudson54241132001-12-07 15:38:26 +00007177
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007178fi
7179
Thomas Wouters89f507f2006-12-13 04:49:30 +00007180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007181# The cast to long int works around a bug in the HP C Compiler
7182# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7183# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7184# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7186$as_echo_n "checking size of off_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007187if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007189else
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007191#ifdef HAVE_SYS_TYPES_H
7192#include <sys/types.h>
7193#endif
7194
Matthias Kloseb9621712010-04-24 17:59:49 +00007195"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197else
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 if test "$ac_cv_type_off_t" = yes; then
7199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007201as_fn_error 77 "cannot compute sizeof (off_t)
7202See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203 else
7204 ac_cv_sizeof_off_t=0
7205 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007207
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7210$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007211
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212
7213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007215#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007216_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007217
Michael W. Hudson54241132001-12-07 15:38:26 +00007218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219
Matthias Kloseb9621712010-04-24 17:59:49 +00007220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7221$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007222if test "$have_long_long" = yes
7223then
7224if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007225 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007226
Matthias Kloseb9621712010-04-24 17:59:49 +00007227$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007228
Matthias Kloseb9621712010-04-24 17:59:49 +00007229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7230$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007231else
Matthias Kloseb9621712010-04-24 17:59:49 +00007232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7233$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007234fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7237$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007238fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007239
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007240# The cast to long int works around a bug in the HP C Compiler
7241# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7242# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7243# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7245$as_echo_n "checking size of time_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007246if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248else
Matthias Kloseb9621712010-04-24 17:59:49 +00007249 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250#ifdef HAVE_SYS_TYPES_H
7251#include <sys/types.h>
7252#endif
7253#ifdef HAVE_TIME_H
7254#include <time.h>
7255#endif
7256
Matthias Kloseb9621712010-04-24 17:59:49 +00007257"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259else
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 if test "$ac_cv_type_time_t" = yes; then
7261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007263as_fn_error 77 "cannot compute sizeof (time_t)
7264See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265 else
7266 ac_cv_sizeof_time_t=0
7267 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007269
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7272$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007273
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274
7275
Martin v. Löwis11437992002-04-12 09:54:03 +00007276cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007277#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007278_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007279
Michael W. Hudson54241132001-12-07 15:38:26 +00007280
7281
Trent Mick635f6fb2000-08-23 21:33:05 +00007282# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007283ac_save_cc="$CC"
7284if test "$ac_cv_kpthread" = "yes"
7285then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007286elif test "$ac_cv_kthread" = "yes"
7287then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007288elif test "$ac_cv_pthread" = "yes"
7289then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007290fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007291
Matthias Kloseb9621712010-04-24 17:59:49 +00007292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7293$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007294have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007296/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007297
7298 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007299int
7300main ()
7301{
Guido van Rossum12580492000-09-24 16:47:19 +00007302pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007303 ;
7304 return 0;
7305}
Matthias Kloseb159a552010-04-25 21:00:44 +00007306
Martin v. Löwis11437992002-04-12 09:54:03 +00007307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007308if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007309 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7313$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007314if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7318# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7320$as_echo_n "checking size of pthread_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007321if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007322 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007323else
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007325#ifdef HAVE_PTHREAD_H
7326#include <pthread.h>
7327#endif
7328
Matthias Kloseb9621712010-04-24 17:59:49 +00007329"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 if test "$ac_cv_type_pthread_t" = yes; then
7333 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007335as_fn_error 77 "cannot compute sizeof (pthread_t)
7336See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007337 else
7338 ac_cv_sizeof_pthread_t=0
7339 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007341
Trent Mick635f6fb2000-08-23 21:33:05 +00007342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7344$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007345
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007346
7347
Martin v. Löwis11437992002-04-12 09:54:03 +00007348cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007349#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007350_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007351
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007352
Trent Mick635f6fb2000-08-23 21:33:05 +00007353fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007354CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007355
Michael W. Hudson54241132001-12-07 15:38:26 +00007356
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007357case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007358 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007359 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7360 ;;
7361 Darwin/*)
7362 OTHER_LIBTOOL_OPT=""
7363 ;;
7364esac
7365
7366
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007367ARCH_RUN_32BIT=""
7368
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007369case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007370 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007371 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7372 if test "${enable_universalsdk}"; then
7373 :
7374 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007375 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007376 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007377 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007378 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007379 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007380 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007381 if test ${gcc_version} '<' 4.0
7382 then
7383 LIBTOOL_CRUFT="-lcc_dynamic"
7384 else
7385 LIBTOOL_CRUFT=""
7386 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007388 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007389else
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007391/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007392
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007393 #include <unistd.h>
7394 int main(int argc, char*argv[])
7395 {
7396 if (sizeof(long) == 4) {
7397 return 0;
7398 } else {
7399 return 1;
7400 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007401 }
7402
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007404if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007405 ac_osx_32bit=yes
7406else
Matthias Kloseb9621712010-04-24 17:59:49 +00007407 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7410 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007411fi
7412
7413
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007414 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007415 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007416 i386)
7417 MACOSX_DEFAULT_ARCH="i386"
7418 ;;
7419 ppc)
7420 MACOSX_DEFAULT_ARCH="ppc"
7421 ;;
7422 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007423 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007424 ;;
7425 esac
7426 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007427 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007428 i386)
7429 MACOSX_DEFAULT_ARCH="x86_64"
7430 ;;
7431 ppc)
7432 MACOSX_DEFAULT_ARCH="ppc64"
7433 ;;
7434 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007435 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007436 ;;
7437 esac
7438
7439 #ARCH_RUN_32BIT="true"
7440 fi
7441
7442 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007443 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007444 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007445esac
7446
Matthias Kloseb9621712010-04-24 17:59:49 +00007447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7448$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007449if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007450then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007451 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007452 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007453 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7458$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007459 if test $enable_shared = "yes"
7460 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007461 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 +00007462 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007463else
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007466fi
7467
Matthias Kloseb9621712010-04-24 17:59:49 +00007468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7469$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007470case $ac_sys_system/$ac_sys_release in
7471 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007472
Matthias Kloseb9621712010-04-24 17:59:49 +00007473$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7476$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007477 ;;
7478 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7480$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007481 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007482esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007483
Guido van Rossum0a516c91994-09-12 10:58:40 +00007484# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007485
Michael W. Hudson54241132001-12-07 15:38:26 +00007486
7487
7488
7489
Benjamin Peterson99f03762010-04-11 22:15:28 +00007490
Thomas Wouters477c8d52006-05-27 19:21:47 +00007491
Georg Brandlb1441c72009-01-03 22:33:39 +00007492
Thomas Wouters477c8d52006-05-27 19:21:47 +00007493cat >>confdefs.h <<_ACEOF
7494#define SHLIB_EXT "$SO"
7495_ACEOF
7496
Guido van Rossum0a516c91994-09-12 10:58:40 +00007497# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007498# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007499# (Shared libraries in this instance are shared modules to be loaded into
7500# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7502$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007503if test -z "$LDSHARED"
7504then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007505 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007506 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007507 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007508 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007509 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007510 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007511 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007512 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007513 if test "$GCC" = "yes" ; then
7514 LDSHARED='$(CC) -shared'
7515 LDCXXSHARED='$(CXX) -shared'
7516 else
7517 LDSHARED='$(CC) -G'
7518 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007519 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007520 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007521 if test "$GCC" = "yes" ; then
7522 LDSHARED='$(CC) -shared'
7523 LDCXXSHARED='$(CXX) -shared'
7524 else
7525 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007526 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007527 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007528 LDSHARED='$(CC) -bundle'
7529 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007530 if test "$enable_framework" ; then
7531 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007532 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7533 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007534 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007535 else
7536 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007537 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007538 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007539 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007540 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007541 LDSHARED='$(CC) -bundle'
7542 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007543 if test "$enable_framework" ; then
7544 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007545 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7546 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007548 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007549 # No framework, use the Python app as bundle-loader
7550 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007551 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007552 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007553 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007554 Darwin/*)
7555 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7556 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007557
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007558 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007559 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007560 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007561 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007562 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007563 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7564 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007565 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007566 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007567 LDSHARED='$(CC) -bundle'
7568 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007569 if test "$enable_framework" ; then
7570 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007571 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7572 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007573 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007574 else
7575 # No framework, use the Python app as bundle-loader
7576 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7577 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007578 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007579 fi
7580 fi
7581 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007582 Linux*|GNU*|QNX*)
7583 LDSHARED='$(CC) -shared'
7584 LDCXXSHARED='$(CXX) -shared';;
7585 BSD/OS*/4*)
7586 LDSHARED="gcc -shared"
7587 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007588 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007589 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007590 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007591 LDSHARED='$(CC) -shared'
7592 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007593 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007594 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007595 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007596 OpenBSD*)
7597 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7598 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007599 LDSHARED='$(CC) -shared $(CCSHARED)'
7600 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007601 else
7602 case `uname -r` in
7603 [01].* | 2.[0-7] | 2.[0-7].*)
7604 LDSHARED="ld -Bshareable ${LDFLAGS}"
7605 ;;
7606 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007607 LDSHARED='$(CC) -shared $(CCSHARED)'
7608 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007609 ;;
7610 esac
7611 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007612 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007613 LDSHARED='$(CC) -shared'
7614 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007615 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007616 if test "$GCC" = "yes" ; then
7617 LDSHARED='$(CC) -shared'
7618 LDCXXSHARED='$(CXX) -shared'
7619 else
7620 LDSHARED='$(CC) -G'
7621 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007622 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007623 SCO_SV*)
7624 LDSHARED='$(CC) -Wl,-G,-Bexport'
7625 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7626 CYGWIN*)
7627 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7628 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007629 *) LDSHARED="ld";;
7630 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7633$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007634LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007635BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007636# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007637# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7639$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640if test -z "$CCSHARED"
7641then
Guido van Rossum07397971997-04-29 21:49:50 +00007642 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007643 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007644 then CCSHARED="-fPIC";
7645 elif test `uname -p` = sparc;
7646 then CCSHARED="-xcode=pic32";
7647 else CCSHARED="-Kpic";
7648 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007649 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007650 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007651 else CCSHARED="+z";
7652 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007653 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007654 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007655 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007656 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007657 if test "$GCC" = "yes"
7658 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007659 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007660 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007661 SCO_SV*)
7662 if test "$GCC" = "yes"
7663 then CCSHARED="-fPIC"
7664 else CCSHARED="-Kpic -belf"
7665 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007666 IRIX*/6*) case $CC in
7667 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007668 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007669 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007670 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7673$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007674# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007675# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7677$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007678if test -z "$LINKFORSHARED"
7679then
Guido van Rossum07397971997-04-29 21:49:50 +00007680 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007681 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007682 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007683 LINKFORSHARED="-Wl,-E -Wl,+s";;
7684# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007685 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007686 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007687 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007688 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007689 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007690 if test "$enable_framework"
7691 then
Jack Jansenda49e192005-01-07 13:08:22 +00007692 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007693 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007694 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007695 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007696 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007697 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007698 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007699 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7700 then
7701 LINKFORSHARED="-Wl,--export-dynamic"
7702 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007703 SunOS/5*) case $CC in
7704 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007705 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007706 then
7707 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007708 fi;;
7709 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007710 CYGWIN*)
7711 if test $enable_shared = "no"
7712 then
7713 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7714 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007715 QNX*)
7716 # -Wl,-E causes the symbols to be added to the dynamic
7717 # symbol table so that they can be found when a module
7718 # is loaded. -N 2048K causes the stack size to be set
7719 # to 2048 kilobytes so that the stack doesn't overflow
7720 # when running test_compile.py.
7721 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007722 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7725$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007726
Michael W. Hudson54241132001-12-07 15:38:26 +00007727
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007728
Matthias Kloseb9621712010-04-24 17:59:49 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7730$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007731if test ! "$LIBRARY" = "$LDLIBRARY"
7732then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007733 case $ac_sys_system in
7734 CYGWIN*)
7735 # Cygwin needs CCSHARED when building extension DLLs
7736 # but not when building the interpreter DLL.
7737 CFLAGSFORSHARED='';;
7738 *)
7739 CFLAGSFORSHARED='$(CCSHARED)'
7740 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7743$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007744
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007745# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7746# library (with --enable-shared).
7747# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007748# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7749# if it is not required, since it creates a dependency of the shared library
7750# to LIBS. This, in turn, means that applications linking the shared libpython
7751# don't need to link LIBS explicitly. The default should be only changed
7752# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007753
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7755$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007756case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007757 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007758 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007759esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7761$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007762
7763
Guido van Rossum627b2d71993-12-24 10:39:16 +00007764# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7766$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007767if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007768 $as_echo_n "(cached) " >&6
7769else
7770 ac_check_lib_save_LIBS=$LIBS
7771LIBS="-lsendfile $LIBS"
7772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7773/* end confdefs.h. */
7774
7775/* Override any GCC internal prototype to avoid an error.
7776 Use char because int might match the return type of a GCC
7777 builtin and then its argument prototype would still apply. */
7778#ifdef __cplusplus
7779extern "C"
7780#endif
7781char sendfile ();
7782int
7783main ()
7784{
7785return sendfile ();
7786 ;
7787 return 0;
7788}
7789_ACEOF
7790if ac_fn_c_try_link "$LINENO"; then :
7791 ac_cv_lib_sendfile_sendfile=yes
7792else
7793 ac_cv_lib_sendfile_sendfile=no
7794fi
7795rm -f core conftest.err conftest.$ac_objext \
7796 conftest$ac_exeext conftest.$ac_ext
7797LIBS=$ac_check_lib_save_LIBS
7798fi
7799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7800$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007801if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007802 cat >>confdefs.h <<_ACEOF
7803#define HAVE_LIBSENDFILE 1
7804_ACEOF
7805
7806 LIBS="-lsendfile $LIBS"
7807
7808fi
7809
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7811$as_echo_n "checking for dlopen in -ldl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007812if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007814else
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007816LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820/* Override any GCC internal prototype to avoid an error.
7821 Use char because int might match the return type of a GCC
7822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007823#ifdef __cplusplus
7824extern "C"
7825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007826char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007827int
7828main ()
7829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 ;
7832 return 0;
7833}
7834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007835if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007836 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007837else
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007840rm -f core conftest.err conftest.$ac_objext \
7841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007842LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7845$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007846if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 cat >>confdefs.h <<_ACEOF
7848#define HAVE_LIBDL 1
7849_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007850
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007851 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007852
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007853fi
7854 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7856$as_echo_n "checking for shl_load in -ldld... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007857if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859else
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007861LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865/* Override any GCC internal prototype to avoid an error.
7866 Use char because int might match the return type of a GCC
7867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007868#ifdef __cplusplus
7869extern "C"
7870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007871char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007872int
7873main ()
7874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 ;
7877 return 0;
7878}
7879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007882else
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007885rm -f core conftest.err conftest.$ac_objext \
7886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007887LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7890$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007891if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 cat >>confdefs.h <<_ACEOF
7893#define HAVE_LIBDLD 1
7894_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007895
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007896 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007897
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007898fi
7899 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007900
Georg Brandlb1441c72009-01-03 22:33:39 +00007901# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007902if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7904$as_echo_n "checking for library containing sem_init... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007905if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007907else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007908 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912/* Override any GCC internal prototype to avoid an error.
7913 Use char because int might match the return type of a GCC
7914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007915#ifdef __cplusplus
7916extern "C"
7917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007918char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007919int
7920main ()
7921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 ;
7924 return 0;
7925}
7926_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927for ac_lib in '' pthread rt posix4; do
7928 if test -z "$ac_lib"; then
7929 ac_res="none required"
7930 else
7931 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007932 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937rm -f core conftest.err conftest.$ac_objext \
7938 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007939 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007943if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945else
7946 ac_cv_search_sem_init=no
7947fi
7948rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007949LIBS=$ac_func_search_save_LIBS
7950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7952$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007954if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007956
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007957fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007958 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007959 # posix4 on Solaris 2.6
7960 # pthread (first!) on Linux
7961fi
7962
Martin v. Löwis19d17342003-06-14 21:03:05 +00007963# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7965$as_echo_n "checking for textdomain in -lintl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007966if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007967 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007968else
7969 ac_check_lib_save_LIBS=$LIBS
7970LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974/* Override any GCC internal prototype to avoid an error.
7975 Use char because int might match the return type of a GCC
7976 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007977#ifdef __cplusplus
7978extern "C"
7979#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007980char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007981int
7982main ()
7983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007985 ;
7986 return 0;
7987}
7988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007990 ac_cv_lib_intl_textdomain=yes
7991else
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994rm -f core conftest.err conftest.$ac_objext \
7995 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007996LIBS=$ac_check_lib_save_LIBS
7997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7999$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008000if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008001
Matthias Kloseb9621712010-04-24 17:59:49 +00008002$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008003
Brett Cannonc6d936e2009-06-07 20:09:53 +00008004 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005fi
8006
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008007
8008# checks for system dependent C++ extensions support
8009case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8011$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008014
Georg Brandl59e87bd2011-02-15 19:48:59 +00008015 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008016int
8017main ()
8018{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008019loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ;
8021 return 0;
8022}
Matthias Kloseb159a552010-04-25 21:00:44 +00008023
Martin v. Löwis11437992002-04-12 09:54:03 +00008024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008025if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008026
Matthias Kloseb159a552010-04-25 21:00:44 +00008027
Matthias Kloseb9621712010-04-24 17:59:49 +00008028$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008029
Matthias Kloseb159a552010-04-25 21:00:44 +00008030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008031$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008032
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008033else
Matthias Kloseb159a552010-04-25 21:00:44 +00008034
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008036$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008037
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008039rm -f core conftest.err conftest.$ac_objext \
8040 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008041 *) ;;
8042esac
8043
Guido van Rossum70c7f481998-03-26 18:44:10 +00008044# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8046$as_echo_n "checking for t_open in -lnsl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008047if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008049else
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008051LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055/* Override any GCC internal prototype to avoid an error.
8056 Use char because int might match the return type of a GCC
8057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008058#ifdef __cplusplus
8059extern "C"
8060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008061char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008062int
8063main ()
8064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 ;
8067 return 0;
8068}
8069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008070if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008075rm -f core conftest.err conftest.$ac_objext \
8076 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008077LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8080$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008081if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008082 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008084 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8086$as_echo_n "checking for socket in -lsocket... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008087if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008089else
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008091LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095/* Override any GCC internal prototype to avoid an error.
8096 Use char because int might match the return type of a GCC
8097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008098#ifdef __cplusplus
8099extern "C"
8100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008101char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008102int
8103main ()
8104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 ;
8107 return 0;
8108}
8109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008112else
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115rm -f core conftest.err conftest.$ac_objext \
8116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008117LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8120$as_echo "$ac_cv_lib_socket_socket" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008121if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008122 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008123fi
8124 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8127$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008130if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8133$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008134LIBS="$withval $LIBS"
8135
8136else
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8138$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139fi
8140
Guido van Rossum7f43da71994-08-01 12:15:30 +00008141
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008142if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8144set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8146$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008147if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008149else
8150 case $PKG_CONFIG in
8151 [\\/]* | ?:[\\/]*)
8152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8153 ;;
8154 *)
8155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8156for as_dir in $PATH
8157do
8158 IFS=$as_save_IFS
8159 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008161 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8162 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008164 break 2
8165 fi
8166done
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008168IFS=$as_save_IFS
8169
8170 ;;
8171esac
8172fi
8173PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8174if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8176$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008177else
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8179$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008180fi
8181
8182
8183fi
8184if test -z "$ac_cv_path_PKG_CONFIG"; then
8185 ac_pt_PKG_CONFIG=$PKG_CONFIG
8186 # Extract the first word of "pkg-config", so it can be a program name with args.
8187set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8189$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008190if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008191 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008192else
8193 case $ac_pt_PKG_CONFIG in
8194 [\\/]* | ?:[\\/]*)
8195 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8196 ;;
8197 *)
8198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8199for as_dir in $PATH
8200do
8201 IFS=$as_save_IFS
8202 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008203 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8205 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008207 break 2
8208 fi
8209done
Matthias Kloseb9621712010-04-24 17:59:49 +00008210 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008211IFS=$as_save_IFS
8212
8213 ;;
8214esac
8215fi
8216ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8217if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8219$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008220else
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8222$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008223fi
8224
8225 if test "x$ac_pt_PKG_CONFIG" = x; then
8226 PKG_CONFIG=""
8227 else
8228 case $cross_compiling:$ac_tool_warned in
8229yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8231$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008232ac_tool_warned=yes ;;
8233esac
8234 PKG_CONFIG=$ac_pt_PKG_CONFIG
8235 fi
8236else
8237 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8238fi
8239
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008240
8241# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8243$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008244
8245# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008246if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008247 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008248else
8249 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008250fi
8251
8252
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8254$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008255
8256# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8258$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008259
8260# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008262 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008263else
8264 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008265fi
8266
8267
8268if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008269 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8270else
8271 LIBFFI_INCLUDEDIR=""
8272fi
8273
8274
Matthias Kloseb9621712010-04-24 17:59:49 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8276$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008277
Benjamin Peterson076ed002010-10-31 17:11:02 +00008278# Check for support for loadable sqlite extensions
8279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8280$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8281# Check whether --enable-loadable-sqlite-extensions was given.
8282if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8283 enableval=$enable_loadable_sqlite_extensions;
8284else
8285 enable_loadable_sqlite_extensions="no"
8286fi
8287
8288
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8290$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8291
Matthias Klose55708cc2009-04-30 08:06:49 +00008292# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8294$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008295
8296# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008297if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008298 withval=$with_dbmliborder;
8299if test x$with_dbmliborder = xyes
8300then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008301as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008302else
8303 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8304 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8305 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008306 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008307 fi
8308 done
8309fi
8310fi
8311
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8313$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008314
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008315# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008316
8317
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8319$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008321# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008322if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008323 withval=$with_signal_module;
8324fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008325
8326
8327if test -z "$with_signal_module"
8328then with_signal_module="yes"
8329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8331$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008332
8333if test "${with_signal_module}" = "yes"; then
8334 USE_SIGNAL_MODULE=""
8335 SIGNAL_OBJS=""
8336else
8337 USE_SIGNAL_MODULE="#"
8338 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8339fi
8340
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008341# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008342
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008343USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
8347# Templates for things AC_DEFINEd more than once.
8348# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008349
8350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351
8352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8354$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008357if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358 withval=$with_threads;
8359fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008360
8361
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008362# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366 withval=$with_thread; with_threads=$with_thread
8367fi
8368
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008369
8370if test -z "$with_threads"
8371then with_threads="yes"
8372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8374$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008375
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008376
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008377if test "$with_threads" = "no"
8378then
8379 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008380elif test "$ac_cv_pthread_is_default" = yes
8381then
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008383
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008384 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008386
8387 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008388 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008389elif test "$ac_cv_kpthread" = "yes"
8390then
8391 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008392 if test "$ac_cv_cxx_thread" = "yes"; then
8393 CXX="$CXX -Kpthread"
8394 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008397 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008398 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008399elif test "$ac_cv_kthread" = "yes"
8400then
8401 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008402 if test "$ac_cv_cxx_thread" = "yes"; then
8403 CXX="$CXX -Kthread"
8404 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008406
8407 posix_threads=yes
8408 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008409elif test "$ac_cv_pthread" = "yes"
8410then
8411 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008412 if test "$ac_cv_cxx_thread" = "yes"; then
8413 CXX="$CXX -pthread"
8414 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008416
8417 posix_threads=yes
8418 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008419else
8420 if test ! -z "$with_threads" -a -d "$with_threads"
8421 then LDFLAGS="$LDFLAGS -L$with_threads"
8422 fi
8423 if test ! -z "$withval" -a -d "$withval"
8424 then LDFLAGS="$LDFLAGS -L$withval"
8425 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008426
8427 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008428 # define _POSIX_THREADS in unistd.h. Some apparently don't
8429 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8431$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008433/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008434
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008435#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008436#ifdef _POSIX_THREADS
8437yes
8438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008439
8440_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008443 unistd_defines_pthreads=yes
8444else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008445 unistd_defines_pthreads=no
8446fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008447rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008448
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8450$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008451
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008453
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008455if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008459
Martin v. Löwis11437992002-04-12 09:54:03 +00008460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008462
8463 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008464 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008465else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008468if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008470
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008472
Martin v. Löwis11437992002-04-12 09:54:03 +00008473
Matthias Kloseb9621712010-04-24 17:59:49 +00008474$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008475
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008476 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008477else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008478
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008479 # Just looking for pthread_create in libpthread is not enough:
8480 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8481 # So we really have to include pthread.h, and then link.
8482 _libs=$LIBS
8483 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8485$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008487/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008488#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008489
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008490void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008491int
8492main ()
8493{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008494
8495pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ;
8497 return 0;
8498}
8499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008500if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8503$as_echo "yes" >&6; }
8504 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008505
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008506 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008507 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008508else
Martin v. Löwis11437992002-04-12 09:54:03 +00008509
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008510 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008512if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008514
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008515 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008516 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008517else
Guido van Rossumad678af1998-10-02 14:42:15 +00008518
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8520$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008521if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008523else
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008525LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529/* Override any GCC internal prototype to avoid an error.
8530 Use char because int might match the return type of a GCC
8531 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008532#ifdef __cplusplus
8533extern "C"
8534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008535char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008536int
8537main ()
8538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008540 ;
8541 return 0;
8542}
8543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008546else
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549rm -f core conftest.err conftest.$ac_objext \
8550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008551LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8554$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008555if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008557
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008558 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008559 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008560 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008561else
Greg Steinadf63d62000-07-05 10:38:09 +00008562
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8564$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008565if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008567else
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008569LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573/* Override any GCC internal prototype to avoid an error.
8574 Use char because int might match the return type of a GCC
8575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008576#ifdef __cplusplus
8577extern "C"
8578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008579char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008580int
8581main ()
8582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 ;
8585 return 0;
8586}
8587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008588if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593rm -f core conftest.err conftest.$ac_objext \
8594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008595LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8598$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008599if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008601
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008602 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008603 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008604 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008605else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008606
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8608$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008609if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008611else
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008613LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617/* Override any GCC internal prototype to avoid an error.
8618 Use char because int might match the return type of a GCC
8619 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008620#ifdef __cplusplus
8621extern "C"
8622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008623char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008624int
8625main ()
8626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 ;
8629 return 0;
8630}
8631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008632if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008634else
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008637rm -f core conftest.err conftest.$ac_objext \
8638 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008639LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8642$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008643if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008645
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008646 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008647 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008648 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008649else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008650
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8652$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008653if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008655else
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008657LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661/* Override any GCC internal prototype to avoid an error.
8662 Use char because int might match the return type of a GCC
8663 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008664#ifdef __cplusplus
8665extern "C"
8666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008667char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008668int
8669main ()
8670{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 ;
8673 return 0;
8674}
8675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008676if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008678else
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681rm -f core conftest.err conftest.$ac_objext \
8682 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008683LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8686$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008687if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008689
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008690 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008691 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008692 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008693else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008694
Martin v. Löwis130fb172001-07-19 11:00:41 +00008695 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008696fi
8697
Guido van Rossum627b2d71993-12-24 10:39:16 +00008698
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008699fi
8700
Guido van Rossum0be3e491997-05-22 20:33:33 +00008701fi
8702
Guido van Rossum49545951997-12-02 19:28:29 +00008703fi
8704
Guido van Rossumb93a8621998-05-07 13:27:32 +00008705fi
8706
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708rm -f core conftest.err conftest.$ac_objext \
8709 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710fi
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712
8713fi
8714
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008715
Michael W. Hudson54241132001-12-07 15:38:26 +00008716
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8718$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008719if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008721else
Martin v. Löwis11437992002-04-12 09:54:03 +00008722 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008723LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008727/* Override any GCC internal prototype to avoid an error.
8728 Use char because int might match the return type of a GCC
8729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730#ifdef __cplusplus
8731extern "C"
8732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008733char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008734int
8735main ()
8736{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008737return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 ;
8739 return 0;
8740}
8741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008744else
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008747rm -f core conftest.err conftest.$ac_objext \
8748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008749LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8752$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008753if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008755
Martin v. Löwis130fb172001-07-19 11:00:41 +00008756 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008757 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008758 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008759fi
8760
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008761
Neal Norwitza978ab02002-11-02 16:58:05 +00008762 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8764$as_echo_n "checking for thr_create in -lthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008765if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008767else
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008769LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773/* Override any GCC internal prototype to avoid an error.
8774 Use char because int might match the return type of a GCC
8775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008776#ifdef __cplusplus
8777extern "C"
8778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008779char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008780int
8781main ()
8782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 ;
8785 return 0;
8786}
8787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793rm -f core conftest.err conftest.$ac_objext \
8794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8798$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008799if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008801
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008802 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008803 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008804 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008805fi
8806
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008807 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008809
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810if test "$posix_threads" = "yes"; then
8811 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008812
Matthias Kloseb9621712010-04-24 17:59:49 +00008813$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814
8815 fi
8816
8817 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8818 case $ac_sys_system/$ac_sys_release in
8819 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008820$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008821
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008822 ;;
8823 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008824$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008825
8826 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008827 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008828$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008829
8830 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008831 AIX/6)
8832$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8833
8834 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008835 esac
8836
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8838$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008839 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008841else
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008843 ac_cv_pthread_system_supported=no
8844else
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008846/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008847#include <pthread.h>
8848 void *foo(void *parm) {
8849 return NULL;
8850 }
8851 main() {
8852 pthread_attr_t attr;
8853 pthread_t id;
8854 if (pthread_attr_init(&attr)) exit(-1);
8855 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8856 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8857 exit(0);
8858 }
8859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008860if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008861 ac_cv_pthread_system_supported=yes
8862else
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8866 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008867fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008869
Guido van Rossum627b2d71993-12-24 10:39:16 +00008870fi
8871
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8873$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008874 if test "$ac_cv_pthread_system_supported" = "yes"; then
8875
Matthias Kloseb9621712010-04-24 17:59:49 +00008876$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008877
8878 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 for ac_func in pthread_sigmask
8880do :
8881 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008882if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008883 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008884#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008885_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008886 case $ac_sys_system in
8887 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008890
8891 ;;
8892 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008893fi
8894done
8895
8896fi
8897
8898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008899# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008900
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8902$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008904if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008905 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008906 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8908$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008909 ipv6=no
8910 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8912$as_echo "yes" >&6; }
8913 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008914
8915 ipv6=yes
8916 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918else
Martin v. Löwis11437992002-04-12 09:54:03 +00008919
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 if test "$cross_compiling" = yes; then :
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
8925
8926else
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008928/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929 /* AF_INET6 available check */
8930#include <sys/types.h>
8931#include <sys/socket.h>
8932main()
8933{
8934 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8935 exit(1);
8936 else
8937 exit(0);
8938}
8939
Martin v. Löwis11437992002-04-12 09:54:03 +00008940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008941if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8944$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008945 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008946
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008947else
Matthias Kloseb159a552010-04-25 21:00:44 +00008948
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8950$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008952
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8955 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956fi
8957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008959if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8961$as_echo_n "checking if RFC2553 API is available... " >&6; }
8962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008963/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008964
8965 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008966#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008967int
8968main ()
8969{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008970struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008971 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 ;
8973 return 0;
8974}
Matthias Kloseb159a552010-04-25 21:00:44 +00008975
Martin v. Löwis11437992002-04-12 09:54:03 +00008976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008977if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008978
8979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008980$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008981 ipv6=yes
8982
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008983else
Matthias Kloseb159a552010-04-25 21:00:44 +00008984
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008986$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008987 ipv6=no
8988
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008991fi
8992
8993if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008995
8996fi
8997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998fi
8999
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000
9001ipv6type=unknown
9002ipv6lib=none
9003ipv6trylibc=no
9004
9005if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9007$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009008 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9009 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010 case $i in
9011 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009014
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015#include <netinet/in.h>
9016#ifdef IPV6_INRIA_VERSION
9017yes
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009022 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009024rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025
9026 ;;
9027 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009029/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009030
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031#include <netinet/in.h>
9032#ifdef __KAME__
9033yes
9034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009035_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038 ipv6type=$i;
9039 ipv6lib=inet6
9040 ipv6libdir=/usr/local/v6/lib
9041 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009043rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009044
9045 ;;
9046 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050#include <features.h>
9051#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9052yes
9053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057 ipv6type=$i;
9058 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009060rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061
9062 ;;
9063 linux-inet6)
9064 if test -d /usr/inet6; then
9065 ipv6type=$i
9066 ipv6lib=inet6
9067 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009068 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069 fi
9070 ;;
9071 solaris)
9072 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009073 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074 ipv6type=$i
9075 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076 fi
9077 fi
9078 ;;
9079 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009081/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009082
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009083#include <sys/param.h>
9084#ifdef _TOSHIBA_INET6
9085yes
9086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009087_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090 ipv6type=$i;
9091 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009092 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009094rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095
9096 ;;
9097 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009099/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009100
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009101#include </usr/local/v6/include/sys/v6config.h>
9102#ifdef __V6D__
9103yes
9104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009105_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108 ipv6type=$i;
9109 ipv6lib=v6;
9110 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009111 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009112fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009113rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114
9115 ;;
9116 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009118/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009119
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009120#include <sys/param.h>
9121#ifdef _ZETA_MINAMI_INET6
9122yes
9123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009124_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009127 ipv6type=$i;
9128 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009129 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009131rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009132
9133 ;;
9134 esac
9135 if test "$ipv6type" != "unknown"; then
9136 break
9137 fi
9138 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9140$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141fi
9142
9143if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9144 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9145 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9146 echo "using lib$ipv6lib"
9147 else
9148 if test $ipv6trylibc = "yes"; then
9149 echo "using libc"
9150 else
9151 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9152 echo "You need to fetch lib$ipv6lib.a from appropriate"
9153 echo 'ipv6 kit and compile beforehand.'
9154 exit 1
9155 fi
9156 fi
9157fi
9158
Matthias Kloseb9621712010-04-24 17:59:49 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9160$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009162/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009163
9164 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009165int
9166main ()
9167{
9168FSIORefNum fRef = 0
9169 ;
9170 return 0;
9171}
Matthias Kloseb159a552010-04-25 21:00:44 +00009172
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009174if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009175
Matthias Kloseb159a552010-04-25 21:00:44 +00009176
Matthias Kloseb9621712010-04-24 17:59:49 +00009177$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009178
Matthias Kloseb9621712010-04-24 17:59:49 +00009179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9180$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009181
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009182else
Matthias Kloseb159a552010-04-25 21:00:44 +00009183
Matthias Kloseb9621712010-04-24 17:59:49 +00009184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9185$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009186
9187fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9189
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009190# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9192$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009195if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196 withval=$with_doc_strings;
9197fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009198
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009199
9200if test -z "$with_doc_strings"
9201then with_doc_strings="yes"
9202fi
9203if test "$with_doc_strings" != "no"
9204then
9205
Matthias Kloseb9621712010-04-24 17:59:49 +00009206$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009207
9208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9210$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009211
Antoine Pitrou042b1282010-08-13 21:15:58 +00009212# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9214$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009216# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009217if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009219if test "$withval" != no
9220then
9221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009223
Matthias Kloseb9621712010-04-24 17:59:49 +00009224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9225$as_echo "yes" >&6; }
9226else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009228fi
9229else
Matthias Kloseb9621712010-04-24 17:59:49 +00009230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9231$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009232fi
9233
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009234
9235# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9237$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009239# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009240if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241 withval=$with_pymalloc;
9242fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009243
Neil Schemenauera35c6882001-02-27 04:45:05 +00009244
Neil Schemenauer16c22972002-03-22 15:34:49 +00009245if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009246then
9247 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009248 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009249fi
9250if test "$with_pymalloc" != "no"
9251then
Martin v. Löwis11437992002-04-12 09:54:03 +00009252
Matthias Kloseb9621712010-04-24 17:59:49 +00009253$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009254
9255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9257$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009258
Benjamin Peterson05159c42009-12-03 03:01:27 +00009259# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9261$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009262
9263# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009264if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009265 withval=$with_valgrind;
9266else
9267 with_valgrind=no
9268fi
9269
Matthias Kloseb9621712010-04-24 17:59:49 +00009270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9271$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009272if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009273 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009274if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009275
Matthias Kloseb9621712010-04-24 17:59:49 +00009276$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009277
9278else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009279 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009280
9281fi
9282
9283
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009284 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009285fi
9286
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009287# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009288
Guido van Rossum98935bf2001-09-05 19:13:16 +00009289DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009290
Guido van Rossume97ee181999-12-20 21:27:22 +00009291# the dlopen() function means we might want to use dynload_shlib.o. some
9292# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009293for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009294do :
9295 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009296if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009298#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009299_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009300
Guido van Rossume97ee181999-12-20 21:27:22 +00009301fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009302done
Guido van Rossume97ee181999-12-20 21:27:22 +00009303
Michael W. Hudson54241132001-12-07 15:38:26 +00009304
Guido van Rossume97ee181999-12-20 21:27:22 +00009305# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9306# loading of modules.
9307
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9309$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009310if test -z "$DYNLOADFILE"
9311then
9312 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009313 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9314 if test "$ac_cv_func_dlopen" = yes
9315 then DYNLOADFILE="dynload_shlib.o"
9316 else DYNLOADFILE="dynload_aix.o"
9317 fi
9318 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009319 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009320 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9321 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009322 *)
9323 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9324 # out any dynamic loading
9325 if test "$ac_cv_func_dlopen" = yes
9326 then DYNLOADFILE="dynload_shlib.o"
9327 else DYNLOADFILE="dynload_stub.o"
9328 fi
9329 ;;
9330 esac
9331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9333$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009334if test "$DYNLOADFILE" != "dynload_stub.o"
9335then
Martin v. Löwis11437992002-04-12 09:54:03 +00009336
Matthias Kloseb9621712010-04-24 17:59:49 +00009337$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009338
9339fi
9340
Neil Schemenauer4e425612001-06-19 15:44:15 +00009341# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9342
Michael W. Hudson54241132001-12-07 15:38:26 +00009343
Matthias Kloseb9621712010-04-24 17:59:49 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9345$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009346if test -z "$MACHDEP_OBJS"
9347then
Jack Jansene578a632001-08-15 01:27:14 +00009348 MACHDEP_OBJS=$extra_machdep_objs
9349else
9350 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9353$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009354
Guido van Rossum627b2d71993-12-24 10:39:16 +00009355# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009356for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009357 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009358 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009359 futimens futimes gai_strerror \
9360 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009361 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009362 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009363 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009364 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009365 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009366 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009367 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009368 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009369 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009370 sigaction sigaltstack siginterrupt sigpending sigrelse \
9371 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009372 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009373 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9374 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009375do :
9376 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9377ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009378if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009379 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009380#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009381_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009382
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009383fi
9384done
9385
Michael W. Hudson54241132001-12-07 15:38:26 +00009386
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387# For some functions, having a definition is not sufficient, since
9388# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9390$as_echo_n "checking for chroot... " >&6; }
9391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009392/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009393#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009394int
9395main ()
9396{
9397void *x=chroot
9398 ;
9399 return 0;
9400}
9401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403
Matthias Kloseb9621712010-04-24 17:59:49 +00009404$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009405
Matthias Kloseb159a552010-04-25 21:00:44 +00009406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009407$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009408else
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009411
9412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9415$as_echo_n "checking for link... " >&6; }
9416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009417/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009418#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009419int
9420main ()
9421{
9422void *x=link
9423 ;
9424 return 0;
9425}
9426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428
Matthias Kloseb9621712010-04-24 17:59:49 +00009429$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009430
Matthias Kloseb159a552010-04-25 21:00:44 +00009431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009432$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009433else
Matthias Kloseb9621712010-04-24 17:59:49 +00009434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009436
9437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9440$as_echo_n "checking for symlink... " >&6; }
9441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009442/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009443#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009444int
9445main ()
9446{
9447void *x=symlink
9448 ;
9449 return 0;
9450}
9451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009453
Matthias Kloseb9621712010-04-24 17:59:49 +00009454$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009455
Matthias Kloseb159a552010-04-25 21:00:44 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009457$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009458else
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009461
9462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9465$as_echo_n "checking for fchdir... " >&6; }
9466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009467/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009468#include <unistd.h>
9469int
9470main ()
9471{
9472void *x=fchdir
9473 ;
9474 return 0;
9475}
9476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009478
Matthias Kloseb9621712010-04-24 17:59:49 +00009479$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009480
Matthias Kloseb159a552010-04-25 21:00:44 +00009481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009482$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009483else
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009486
9487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9490$as_echo_n "checking for fsync... " >&6; }
9491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009492/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009493#include <unistd.h>
9494int
9495main ()
9496{
9497void *x=fsync
9498 ;
9499 return 0;
9500}
9501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009503
Matthias Kloseb9621712010-04-24 17:59:49 +00009504$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009505
Matthias Kloseb159a552010-04-25 21:00:44 +00009506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009507$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009508else
Matthias Kloseb9621712010-04-24 17:59:49 +00009509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9510$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009511
9512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9515$as_echo_n "checking for fdatasync... " >&6; }
9516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009517/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009518#include <unistd.h>
9519int
9520main ()
9521{
9522void *x=fdatasync
9523 ;
9524 return 0;
9525}
9526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009527if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009528
Matthias Kloseb9621712010-04-24 17:59:49 +00009529$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009530
Matthias Kloseb159a552010-04-25 21:00:44 +00009531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009532$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009533else
Matthias Kloseb9621712010-04-24 17:59:49 +00009534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9535$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009536
9537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9540$as_echo_n "checking for epoll... " >&6; }
9541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009542/* end confdefs.h. */
9543#include <sys/epoll.h>
9544int
9545main ()
9546{
9547void *x=epoll_create
9548 ;
9549 return 0;
9550}
9551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009553
Matthias Kloseb9621712010-04-24 17:59:49 +00009554$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009555
Matthias Kloseb159a552010-04-25 21:00:44 +00009556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009557$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009558else
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009561
9562fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9565$as_echo_n "checking for kqueue... " >&6; }
9566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009567/* end confdefs.h. */
9568
9569#include <sys/types.h>
9570#include <sys/event.h>
9571
9572int
9573main ()
9574{
9575int x=kqueue()
9576 ;
9577 return 0;
9578}
9579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009580if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009581
Matthias Kloseb9621712010-04-24 17:59:49 +00009582$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009583
Matthias Kloseb159a552010-04-25 21:00:44 +00009584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009585$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009586else
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9588$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009589
9590fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009592# On some systems (eg. FreeBSD 5), we would find a definition of the
9593# functions ctermid_r, setgroups in the library, but no prototype
9594# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9595# address to avoid compiler warnings and potential miscompilations
9596# because of the missing prototypes.
9597
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9599$as_echo_n "checking for ctermid_r... " >&6; }
9600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009602
Martin v. Löwisd5843682002-11-21 20:41:28 +00009603#include <stdio.h>
9604
Martin v. Löwisd5843682002-11-21 20:41:28 +00009605int
9606main ()
9607{
9608void* p = ctermid_r
9609 ;
9610 return 0;
9611}
9612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009614
Matthias Kloseb9621712010-04-24 17:59:49 +00009615$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009616
Matthias Kloseb159a552010-04-25 21:00:44 +00009617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009618$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009619else
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9621$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009622
9623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9625
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9627$as_echo_n "checking for flock declaration... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009628if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009629 $as_echo_n "(cached) " >&6
9630else
9631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009632/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009633#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009634int
9635main ()
9636{
9637void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009638
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009639 ;
9640 return 0;
9641}
9642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009643if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009644 ac_cv_flock_decl=yes
9645else
9646 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009647
9648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009650
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009651fi
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9653$as_echo "$ac_cv_flock_decl" >&6; }
9654if test "x${ac_cv_flock_decl}" = xyes; then
9655 for ac_func in flock
9656do :
9657 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009658if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009659 cat >>confdefs.h <<_ACEOF
9660#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009661_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009662
Antoine Pitroua3000072010-09-07 14:52:42 +00009663else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009665$as_echo_n "checking for flock in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009666if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009667 $as_echo_n "(cached) " >&6
9668else
9669 ac_check_lib_save_LIBS=$LIBS
9670LIBS="-lbsd $LIBS"
9671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9672/* end confdefs.h. */
9673
9674/* Override any GCC internal prototype to avoid an error.
9675 Use char because int might match the return type of a GCC
9676 builtin and then its argument prototype would still apply. */
9677#ifdef __cplusplus
9678extern "C"
9679#endif
9680char flock ();
9681int
9682main ()
9683{
9684return flock ();
9685 ;
9686 return 0;
9687}
9688_ACEOF
9689if ac_fn_c_try_link "$LINENO"; then :
9690 ac_cv_lib_bsd_flock=yes
9691else
9692 ac_cv_lib_bsd_flock=no
9693fi
9694rm -f core conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext conftest.$ac_ext
9696LIBS=$ac_check_lib_save_LIBS
9697fi
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9699$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009700if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009701 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009702
9703
9704$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9705
9706
9707fi
9708
9709
9710fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009711done
9712
Antoine Pitroua3000072010-09-07 14:52:42 +00009713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714
Matthias Kloseb9621712010-04-24 17:59:49 +00009715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9716$as_echo_n "checking for getpagesize... " >&6; }
9717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009718/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009719
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009720#include <unistd.h>
9721
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009722int
9723main ()
9724{
9725void* p = getpagesize
9726 ;
9727 return 0;
9728}
9729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009730if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009731
Matthias Kloseb9621712010-04-24 17:59:49 +00009732$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009733
Matthias Kloseb159a552010-04-25 21:00:44 +00009734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009735$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009736else
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9738$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009739
9740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009742
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9744$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9746/* end confdefs.h. */
9747
9748#include <malloc.h>
9749
9750int
9751main ()
9752{
9753mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9754 ;
9755 return 0;
9756}
9757_ACEOF
9758if ac_fn_c_try_compile "$LINENO"; then :
9759
9760$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9761
9762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9763$as_echo "yes" >&6; }
9764else
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9766$as_echo "no" >&6; }
9767
9768fi
9769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9770
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009771for ac_prog in true
9772do
9773 # Extract the first word of "$ac_prog", so it can be a program name with args.
9774set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9776$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009777if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009778 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009779else
9780 if test -n "$TRUE"; then
9781 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9782else
9783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9784for as_dir in $PATH
9785do
9786 IFS=$as_save_IFS
9787 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789 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 +00009790 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 $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 +00009792 break 2
9793 fi
9794done
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009797
9798fi
9799fi
9800TRUE=$ac_cv_prog_TRUE
9801if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9803$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009804else
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009807fi
9808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009810 test -n "$TRUE" && break
9811done
9812test -n "$TRUE" || TRUE="/bin/true"
9813
9814
Matthias Kloseb9621712010-04-24 17:59:49 +00009815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9816$as_echo_n "checking for inet_aton in -lc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009817if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009819else
9820 ac_check_lib_save_LIBS=$LIBS
9821LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009823/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825/* Override any GCC internal prototype to avoid an error.
9826 Use char because int might match the return type of a GCC
9827 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009828#ifdef __cplusplus
9829extern "C"
9830#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009831char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009832int
9833main ()
9834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009836 ;
9837 return 0;
9838}
9839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009841 ac_cv_lib_c_inet_aton=yes
9842else
Matthias Kloseb9621712010-04-24 17:59:49 +00009843 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009845rm -f core conftest.err conftest.$ac_objext \
9846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847LIBS=$ac_check_lib_save_LIBS
9848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9850$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009851if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009852 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009853else
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9855$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009856if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009858else
9859 ac_check_lib_save_LIBS=$LIBS
9860LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009862/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864/* Override any GCC internal prototype to avoid an error.
9865 Use char because int might match the return type of a GCC
9866 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009867#ifdef __cplusplus
9868extern "C"
9869#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009870char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009871int
9872main ()
9873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009875 ;
9876 return 0;
9877}
9878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009879if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009880 ac_cv_lib_resolv_inet_aton=yes
9881else
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009884rm -f core conftest.err conftest.$ac_objext \
9885 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009886LIBS=$ac_check_lib_save_LIBS
9887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9889$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009890if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009891 cat >>confdefs.h <<_ACEOF
9892#define HAVE_LIBRESOLV 1
9893_ACEOF
9894
9895 LIBS="-lresolv $LIBS"
9896
9897fi
9898
9899
9900fi
9901
9902
Christian Heimesd0764e22007-12-04 15:00:33 +00009903# On Tru64, chflags seems to be present, but calling it will
9904# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9906$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009907if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009908 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009909else
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009911 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009912else
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009914/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009915[
Christian Heimesd0764e22007-12-04 15:00:33 +00009916#include <sys/stat.h>
9917#include <unistd.h>
9918int main(int argc, char*argv[])
9919{
9920 if(chflags(argv[0], 0) != 0)
9921 return 1;
9922 return 0;
9923}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009924]
Christian Heimesd0764e22007-12-04 15:00:33 +00009925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009926if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009927 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009928else
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009933fi
9934
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009935
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9938$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009939if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009941if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009942 ac_cv_have_chflags="yes"
9943else
9944 ac_cv_have_chflags="no"
9945fi
9946
9947fi
9948if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009949
Matthias Kloseb9621712010-04-24 17:59:49 +00009950$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009951
9952fi
9953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9955$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009956if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009958else
Matthias Kloseb9621712010-04-24 17:59:49 +00009959 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009960 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009961else
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009963/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009964[
Christian Heimesd0764e22007-12-04 15:00:33 +00009965#include <sys/stat.h>
9966#include <unistd.h>
9967int main(int argc, char*argv[])
9968{
9969 if(lchflags(argv[0], 0) != 0)
9970 return 1;
9971 return 0;
9972}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009973]
Christian Heimesd0764e22007-12-04 15:00:33 +00009974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009975if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009976 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009977else
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9981 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009982fi
9983
9984
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9987$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009988if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009990if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009991 ac_cv_have_lchflags="yes"
9992else
9993 ac_cv_have_lchflags="no"
9994fi
9995
9996fi
9997if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009998
Matthias Kloseb9621712010-04-24 17:59:49 +00009999$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010000
10001fi
10002
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010003case $ac_sys_system/$ac_sys_release in
10004Darwin/*)
10005 _CUR_CFLAGS="${CFLAGS}"
10006 _CUR_LDFLAGS="${LDFLAGS}"
10007 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10008 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10009 ;;
10010esac
10011
Matthias Kloseb9621712010-04-24 17:59:49 +000010012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10013$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010014if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010016else
10017 ac_check_lib_save_LIBS=$LIBS
10018LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010020/* end confdefs.h. */
10021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022/* Override any GCC internal prototype to avoid an error.
10023 Use char because int might match the return type of a GCC
10024 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010025#ifdef __cplusplus
10026extern "C"
10027#endif
10028char inflateCopy ();
10029int
10030main ()
10031{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010033 ;
10034 return 0;
10035}
10036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010037if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010038 ac_cv_lib_z_inflateCopy=yes
10039else
Matthias Kloseb9621712010-04-24 17:59:49 +000010040 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010042rm -f core conftest.err conftest.$ac_objext \
10043 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010044LIBS=$ac_check_lib_save_LIBS
10045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10047$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010048if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010049
Matthias Kloseb9621712010-04-24 17:59:49 +000010050$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010051
10052fi
10053
10054
10055case $ac_sys_system/$ac_sys_release in
10056Darwin/*)
10057 CFLAGS="${_CUR_CFLAGS}"
10058 LDFLAGS="${_CUR_LDFLAGS}"
10059 ;;
10060esac
10061
Matthias Kloseb9621712010-04-24 17:59:49 +000010062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10063$as_echo_n "checking for hstrerror... " >&6; }
10064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010065/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010066
Martin v. Löwise9416172003-05-03 10:12:45 +000010067#include <netdb.h>
10068
Martin v. Löwise9416172003-05-03 10:12:45 +000010069int
10070main ()
10071{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010072void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010073 ;
10074 return 0;
10075}
10076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010078
Matthias Kloseb9621712010-04-24 17:59:49 +000010079$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010080
Matthias Kloseb159a552010-04-25 21:00:44 +000010081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010082$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010083else
Matthias Kloseb9621712010-04-24 17:59:49 +000010084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010086
10087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010088rm -f core conftest.err conftest.$ac_objext \
10089 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090
Matthias Kloseb9621712010-04-24 17:59:49 +000010091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10092$as_echo_n "checking for inet_aton... " >&6; }
10093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010094/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010095
Martin v. Löwis86d66262006-02-17 08:40:11 +000010096#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010097#include <sys/socket.h>
10098#include <netinet/in.h>
10099#include <arpa/inet.h>
10100
Martin v. Löwise9416172003-05-03 10:12:45 +000010101int
10102main ()
10103{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010104void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010105 ;
10106 return 0;
10107}
10108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010110
Matthias Kloseb9621712010-04-24 17:59:49 +000010111$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010112
Matthias Kloseb159a552010-04-25 21:00:44 +000010113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010114$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010115else
Matthias Kloseb9621712010-04-24 17:59:49 +000010116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010118
10119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010120rm -f core conftest.err conftest.$ac_objext \
10121 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10124$as_echo_n "checking for inet_pton... " >&6; }
10125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010126/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010127
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010128#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010129#include <sys/socket.h>
10130#include <netinet/in.h>
10131#include <arpa/inet.h>
10132
Martin v. Löwise9416172003-05-03 10:12:45 +000010133int
10134main ()
10135{
10136void* p = inet_pton
10137 ;
10138 return 0;
10139}
10140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010141if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010142
Matthias Kloseb9621712010-04-24 17:59:49 +000010143$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010144
Matthias Kloseb159a552010-04-25 21:00:44 +000010145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010146$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010147else
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010150
10151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010153
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010154# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10156$as_echo_n "checking for setgroups... " >&6; }
10157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010158/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010159
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010160#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010161#ifdef HAVE_GRP_H
10162#include <grp.h>
10163#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010164
Martin v. Löwisd5843682002-11-21 20:41:28 +000010165int
10166main ()
10167{
10168void* p = setgroups
10169 ;
10170 return 0;
10171}
10172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010173if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010176
Matthias Kloseb159a552010-04-25 21:00:44 +000010177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010178$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010179else
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010182
10183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010185
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010186# check for openpty and forkpty
10187
10188for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010189do :
10190 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010191if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010193#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010194_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010195
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010196else
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10198$as_echo_n "checking for openpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010199if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010201else
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010203LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207/* Override any GCC internal prototype to avoid an error.
10208 Use char because int might match the return type of a GCC
10209 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010210#ifdef __cplusplus
10211extern "C"
10212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010213char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010214int
10215main ()
10216{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ;
10219 return 0;
10220}
10221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010222if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010224else
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010227rm -f core conftest.err conftest.$ac_objext \
10228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010229LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10232$as_echo "$ac_cv_lib_util_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010233if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010235 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010236else
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10238$as_echo_n "checking for openpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010239if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010241else
10242 ac_check_lib_save_LIBS=$LIBS
10243LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010245/* end confdefs.h. */
10246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247/* Override any GCC internal prototype to avoid an error.
10248 Use char because int might match the return type of a GCC
10249 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010250#ifdef __cplusplus
10251extern "C"
10252#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010253char openpty ();
10254int
10255main ()
10256{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010258 ;
10259 return 0;
10260}
10261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010262if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010263 ac_cv_lib_bsd_openpty=yes
10264else
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010267rm -f core conftest.err conftest.$ac_objext \
10268 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010269LIBS=$ac_check_lib_save_LIBS
10270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10272$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010273if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010275 LIBS="$LIBS -lbsd"
10276fi
10277
10278
10279fi
10280
Fred Drake8cef4cf2000-06-28 16:40:38 +000010281
10282fi
10283done
10284
10285for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010286do :
10287 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010288if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010290#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010291_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010292
Fred Drake8cef4cf2000-06-28 16:40:38 +000010293else
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10295$as_echo_n "checking for forkpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010296if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010298else
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010300LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304/* Override any GCC internal prototype to avoid an error.
10305 Use char because int might match the return type of a GCC
10306 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010307#ifdef __cplusplus
10308extern "C"
10309#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010310char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010311int
10312main ()
10313{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010314return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010315 ;
10316 return 0;
10317}
10318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010321else
Matthias Kloseb9621712010-04-24 17:59:49 +000010322 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010324rm -f core conftest.err conftest.$ac_objext \
10325 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010326LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10329$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010330if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010332 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010333else
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10335$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010336if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010338else
10339 ac_check_lib_save_LIBS=$LIBS
10340LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010342/* end confdefs.h. */
10343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344/* Override any GCC internal prototype to avoid an error.
10345 Use char because int might match the return type of a GCC
10346 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010347#ifdef __cplusplus
10348extern "C"
10349#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010350char forkpty ();
10351int
10352main ()
10353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010355 ;
10356 return 0;
10357}
10358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010359if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010360 ac_cv_lib_bsd_forkpty=yes
10361else
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010364rm -f core conftest.err conftest.$ac_objext \
10365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010366LIBS=$ac_check_lib_save_LIBS
10367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10369$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010370if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010372 LIBS="$LIBS -lbsd"
10373fi
10374
10375
10376fi
10377
Fred Drake8cef4cf2000-06-28 16:40:38 +000010378
10379fi
10380done
10381
Jack Jansendd19cf82001-12-06 22:36:17 +000010382
Christian Heimesb186d002008-03-18 15:15:01 +000010383# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010384for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010385do :
10386 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010387if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010388 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010389#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010390_ACEOF
10391
10392fi
10393done
10394
10395
Michael W. Hudson54241132001-12-07 15:38:26 +000010396# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010397for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010398do :
10399 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10400ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010401if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010402 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010403#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010404_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010406fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010407done
10408
Michael W. Hudson54241132001-12-07 15:38:26 +000010409
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010410ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10411if test "x$ac_cv_func_dup2" = x""yes; then :
10412 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010413
Martin v. Löwis1142de32002-03-29 16:28:31 +000010414else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010416 *" dup2.$ac_objext "* ) ;;
10417 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010419esac
10420
Martin v. Löwis1142de32002-03-29 16:28:31 +000010421fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010422
10423ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10424if test "x$ac_cv_func_getcwd" = x""yes; then :
10425 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10426
10427else
10428 case " $LIBOBJS " in
10429 *" getcwd.$ac_objext "* ) ;;
10430 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10431 ;;
10432esac
10433
10434fi
10435
10436ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10437if test "x$ac_cv_func_strdup" = x""yes; then :
10438 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10439
10440else
10441 case " $LIBOBJS " in
10442 *" strdup.$ac_objext "* ) ;;
10443 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10444 ;;
10445esac
10446
10447fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010448
10449
10450for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010451do :
10452 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010453if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010455#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010459#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010460int
10461main ()
10462{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010463getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 ;
10465 return 0;
10466}
10467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010468if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010469
Matthias Kloseb9621712010-04-24 17:59:49 +000010470$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010471
Guido van Rossum627b2d71993-12-24 10:39:16 +000010472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010474
Guido van Rossum627b2d71993-12-24 10:39:16 +000010475fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010476done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010477
Jack Jansen150753c2003-03-29 22:07:47 +000010478for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010479do :
10480 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010481if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010482 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010483#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010486/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010487#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010488int
10489main ()
10490{
10491setpgrp(0,0);
10492 ;
10493 return 0;
10494}
10495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010497
Matthias Kloseb9621712010-04-24 17:59:49 +000010498$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010499
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010502
10503fi
10504done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010505
Thomas Wouters3a584202000-08-05 23:28:51 +000010506for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010507do :
10508 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010509if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010510 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010511#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010514/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010515#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010516int
10517main ()
10518{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010519gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010520 ;
10521 return 0;
10522}
10523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010524if ac_fn_c_try_compile "$LINENO"; then :
10525
Guido van Rossum627b2d71993-12-24 10:39:16 +000010526else
Skip Montanaro6dead952003-09-25 14:50:04 +000010527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010529
Martin v. Löwis11437992002-04-12 09:54:03 +000010530
Guido van Rossum627b2d71993-12-24 10:39:16 +000010531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010533
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010534fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010535done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010536
Michael W. Hudson54241132001-12-07 15:38:26 +000010537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10539$as_echo_n "checking for major... " >&6; }
10540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010541/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010542
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010543#if defined(MAJOR_IN_MKDEV)
10544#include <sys/mkdev.h>
10545#elif defined(MAJOR_IN_SYSMACROS)
10546#include <sys/sysmacros.h>
10547#else
10548#include <sys/types.h>
10549#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010550
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010551int
10552main ()
10553{
10554
10555 makedev(major(0),minor(0));
10556
10557 ;
10558 return 0;
10559}
10560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010561if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010562
10563
Matthias Kloseb9621712010-04-24 17:59:49 +000010564$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010565
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10567$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010568
10569else
Skip Montanaro6dead952003-09-25 14:50:04 +000010570
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010573
10574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010575rm -f core conftest.err conftest.$ac_objext \
10576 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010577
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010578# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010579# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10581$as_echo_n "checking for getaddrinfo... " >&6; }
10582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010583/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010584
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010585#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010586#include <sys/socket.h>
10587#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010588#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010589
Martin v. Löwis11437992002-04-12 09:54:03 +000010590int
10591main ()
10592{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010593getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 ;
10595 return 0;
10596}
10597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010598if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010599 have_getaddrinfo=yes
10600else
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010603rm -f core conftest.err conftest.$ac_objext \
10604 conftest$ac_exeext conftest.$ac_ext
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10606$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010607if test $have_getaddrinfo = yes
10608then
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10610$as_echo_n "checking getaddrinfo bug... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010611 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010613else
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010615 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010618/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010619
10620#include <sys/types.h>
10621#include <netdb.h>
10622#include <string.h>
10623#include <sys/socket.h>
10624#include <netinet/in.h>
10625
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010626int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010627{
10628 int passive, gaierr, inet4 = 0, inet6 = 0;
10629 struct addrinfo hints, *ai, *aitop;
10630 char straddr[INET6_ADDRSTRLEN], strport[16];
10631
10632 for (passive = 0; passive <= 1; passive++) {
10633 memset(&hints, 0, sizeof(hints));
10634 hints.ai_family = AF_UNSPEC;
10635 hints.ai_flags = passive ? AI_PASSIVE : 0;
10636 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010637 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010638 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10639 (void)gai_strerror(gaierr);
10640 goto bad;
10641 }
10642 for (ai = aitop; ai; ai = ai->ai_next) {
10643 if (ai->ai_addr == NULL ||
10644 ai->ai_addrlen == 0 ||
10645 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10646 straddr, sizeof(straddr), strport, sizeof(strport),
10647 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10648 goto bad;
10649 }
10650 switch (ai->ai_family) {
10651 case AF_INET:
10652 if (strcmp(strport, "54321") != 0) {
10653 goto bad;
10654 }
10655 if (passive) {
10656 if (strcmp(straddr, "0.0.0.0") != 0) {
10657 goto bad;
10658 }
10659 } else {
10660 if (strcmp(straddr, "127.0.0.1") != 0) {
10661 goto bad;
10662 }
10663 }
10664 inet4++;
10665 break;
10666 case AF_INET6:
10667 if (strcmp(strport, "54321") != 0) {
10668 goto bad;
10669 }
10670 if (passive) {
10671 if (strcmp(straddr, "::") != 0) {
10672 goto bad;
10673 }
10674 } else {
10675 if (strcmp(straddr, "::1") != 0) {
10676 goto bad;
10677 }
10678 }
10679 inet6++;
10680 break;
10681 case AF_UNSPEC:
10682 goto bad;
10683 break;
10684 default:
10685 /* another family support? */
10686 break;
10687 }
10688 }
10689 }
10690
10691 if (!(inet4 == 0 || inet4 == 2))
10692 goto bad;
10693 if (!(inet6 == 0 || inet6 == 2))
10694 goto bad;
10695
10696 if (aitop)
10697 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010698 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010699
10700 bad:
10701 if (aitop)
10702 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010703 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010704}
10705
Martin v. Löwis11437992002-04-12 09:54:03 +000010706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010707if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010708 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010709else
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10713 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010716fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010717
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10721$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10722
Mark Dickinson2df5d282009-12-31 21:22:50 +000010723if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010724then
10725 if test $ipv6 = yes
10726 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010727 echo 'Fatal: You must get working getaddrinfo() function.'
10728 echo ' or you can specify "--disable-ipv6"'.
10729 exit 1
10730 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010731else
Martin v. Löwis11437992002-04-12 09:54:03 +000010732
Matthias Kloseb9621712010-04-24 17:59:49 +000010733$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010734
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010735fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010736
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010737for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010738do :
10739 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010740if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010742#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010743_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010744
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010745fi
10746done
10747
Michael W. Hudson54241132001-12-07 15:38:26 +000010748
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10751$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010752if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010754else
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010756/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010757#include <sys/types.h>
10758#include <sys/time.h>
10759#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010760
Martin v. Löwis11437992002-04-12 09:54:03 +000010761int
10762main ()
10763{
10764if ((struct tm *) 0)
10765return 0;
10766 ;
10767 return 0;
10768}
10769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010770if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010771 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010772else
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10778$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010779if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782
10783fi
10784
Matthias Kloseb9621712010-04-24 17:59:49 +000010785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10786$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010787if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010789else
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010791/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010792#include <sys/types.h>
10793#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010794
Martin v. Löwis11437992002-04-12 09:54:03 +000010795int
10796main ()
10797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798struct tm tm;
10799 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 ;
10802 return 0;
10803}
10804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010806 ac_cv_struct_tm=time.h
10807else
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10813$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010814if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010817
10818fi
10819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820ac_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 +000010821#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010824if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010825
10826cat >>confdefs.h <<_ACEOF
10827#define HAVE_STRUCT_TM_TM_ZONE 1
10828_ACEOF
10829
10830
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010831fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010832
Martin v. Löwis11437992002-04-12 09:54:03 +000010833if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010836
10837else
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10839"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010840if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842else
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010844fi
10845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010847#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010848_ACEOF
10849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10851$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010852if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010854else
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010856/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010857#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010858#if !HAVE_DECL_TZNAME
10859extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010861
Martin v. Löwis11437992002-04-12 09:54:03 +000010862int
10863main ()
10864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010865return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010866 ;
10867 return 0;
10868}
10869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010870if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010871 ac_cv_var_tzname=yes
10872else
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010875rm -f core conftest.err conftest.$ac_objext \
10876 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10879$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010880 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010883
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010884 fi
10885fi
10886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010888if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010889
10890cat >>confdefs.h <<_ACEOF
10891#define HAVE_STRUCT_STAT_ST_RDEV 1
10892_ACEOF
10893
10894
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010895fi
10896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010898if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010899
Martin v. Löwis11437992002-04-12 09:54:03 +000010900cat >>confdefs.h <<_ACEOF
10901#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10902_ACEOF
10903
10904
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010905fi
10906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010908if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010909
10910cat >>confdefs.h <<_ACEOF
10911#define HAVE_STRUCT_STAT_ST_FLAGS 1
10912_ACEOF
10913
10914
10915fi
10916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010918if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010919
10920cat >>confdefs.h <<_ACEOF
10921#define HAVE_STRUCT_STAT_ST_GEN 1
10922_ACEOF
10923
10924
10925fi
10926
Matthias Kloseb9621712010-04-24 17:59:49 +000010927ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010928if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010929
10930cat >>confdefs.h <<_ACEOF
10931#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10932_ACEOF
10933
10934
10935fi
10936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010938if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010939
Martin v. Löwis11437992002-04-12 09:54:03 +000010940cat >>confdefs.h <<_ACEOF
10941#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10942_ACEOF
10943
10944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010946
10947else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010949 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10951 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010952esac
10953
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010954fi
10955
Michael W. Hudson54241132001-12-07 15:38:26 +000010956
Martin v. Löwis11437992002-04-12 09:54:03 +000010957
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10959$as_echo_n "checking for time.h that defines altzone... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010960if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010961 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962else
Matthias Kloseb159a552010-04-25 21:00:44 +000010963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010965/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010966#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010967int
10968main ()
10969{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010971 ;
10972 return 0;
10973}
10974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010975if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976 ac_cv_header_time_altzone=yes
10977else
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982fi
10983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10985$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010986if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010989
10990fi
10991
Guido van Rossumda88dad1995-01-26 00:46:29 +000010992was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10994$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010996/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010997
10998#include <sys/types.h>
10999#include <sys/select.h>
11000#include <sys/time.h>
11001
Martin v. Löwis11437992002-04-12 09:54:03 +000011002int
11003main ()
11004{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011005;
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 ;
11007 return 0;
11008}
11009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011010if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
11012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011015 was_it_defined=yes
11016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11020$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11023$as_echo_n "checking for addrinfo... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011024if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011026else
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011028/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011029#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011030int
11031main ()
11032{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011033struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 ;
11035 return 0;
11036}
11037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011038if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011039 ac_cv_struct_addrinfo=yes
11040else
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11044fi
11045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11047$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011048if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011049
Matthias Kloseb9621712010-04-24 17:59:49 +000011050$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011051
11052fi
11053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11055$as_echo_n "checking for sockaddr_storage... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011056if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011058else
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011060/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011061
11062# include <sys/types.h>
11063# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011064int
11065main ()
11066{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011067struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 ;
11069 return 0;
11070}
11071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011073 ac_cv_struct_sockaddr_storage=yes
11074else
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11078fi
11079
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11081$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011082if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011083
Matthias Kloseb9621712010-04-24 17:59:49 +000011084$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011085
11086fi
11087
Guido van Rossum627b2d71993-12-24 10:39:16 +000011088# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11091$as_echo_n "checking whether char is unsigned... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011092if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011094else
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011097$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011098int
11099main ()
11100{
11101static int test_array [1 - 2 * !(((char) -1) < 0)];
11102test_array [0] = 0
11103
11104 ;
11105 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011106}
Martin v. Löwis11437992002-04-12 09:54:03 +000011107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011108if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011109 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011110else
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11116$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011117if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011119
11120fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011121
Matthias Kloseb9621712010-04-24 17:59:49 +000011122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11123$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011124if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011126else
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011128/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130int
11131main ()
11132{
11133/* FIXME: Include the comments suggested by Paul. */
11134#ifndef __cplusplus
11135 /* Ultrix mips cc rejects this. */
11136 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011137 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139 char const *const *pcpcc;
11140 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 /* NEC SVR4.0.2 mips cc rejects this. */
11142 struct point {int x, y;};
11143 static struct point const zero = {0,0};
11144 /* AIX XL C 1.02.0.0 rejects this.
11145 It does not let you subtract one const X* pointer from another in
11146 an arm of an if-expression whose if-part is not a constant
11147 expression */
11148 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011149 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011151 ++pcpcc;
11152 ppc = (char**) pcpcc;
11153 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 { /* SCO 3.2v4 cc rejects this. */
11155 char *t;
11156 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011157
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 }
11161 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11162 int x[] = {25, 17};
11163 const int *foo = &x[0];
11164 ++foo;
11165 }
11166 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11167 typedef const int *iptr;
11168 iptr p = 0;
11169 ++p;
11170 }
11171 { /* AIX XL C 1.02.0.0 rejects this saying
11172 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11173 struct s { int j; const int *ap[3]; };
11174 struct s *b; b->j = 5;
11175 }
11176 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11177 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011181#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011182
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 ;
11184 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011185}
Martin v. Löwis11437992002-04-12 09:54:03 +000011186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011187if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188 ac_cv_c_const=yes
11189else
Matthias Kloseb9621712010-04-24 17:59:49 +000011190 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11195$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011196if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011197
Matthias Kloseb9621712010-04-24 17:59:49 +000011198$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011199
11200fi
11201
Michael W. Hudson54241132001-12-07 15:38:26 +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 volatile" >&5
11205$as_echo_n "checking for working volatile... " >&6; }
11206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011207/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011208
Martin v. Löwis11437992002-04-12 09:54:03 +000011209int
11210main ()
11211{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011212volatile int x; x = 0;
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 Rossum627b2d71993-12-24 10:39:16 +000011219else
Skip Montanaro6dead952003-09-25 14:50:04 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011222
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011223
Guido van Rossum627b2d71993-12-24 10:39:16 +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 +000011229works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11231$as_echo_n "checking for working signed char... " >&6; }
11232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011233/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011234
Martin v. Löwis11437992002-04-12 09:54:03 +000011235int
11236main ()
11237{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011238signed char c;
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 :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011244 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011245else
Skip Montanaro6dead952003-09-25 14:50:04 +000011246
Matthias Kloseb9621712010-04-24 17:59:49 +000011247$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011248
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011249
Guido van Rossum7f43da71994-08-01 12:15:30 +000011250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11253$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011254
Guido van Rossumda88dad1995-01-26 00:46:29 +000011255have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11257$as_echo_n "checking for prototypes... " >&6; }
11258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011259/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011260int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011261int
11262main ()
11263{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011264return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
Matthias Kloseb159a552010-04-25 21:00:44 +000011273 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11277$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011278
Guido van Rossumda88dad1995-01-26 00:46:29 +000011279works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11281$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011284
11285#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011286int foo(int x, ...) {
11287 va_list va;
11288 va_start(va, x);
11289 va_arg(va, int);
11290 va_arg(va, char *);
11291 va_arg(va, double);
11292 return 0;
11293}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011294
Martin v. Löwis11437992002-04-12 09:54:03 +000011295int
11296main ()
11297{
Guido van Rossum90eea071996-08-30 20:58:57 +000011298return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011304
11305
Matthias Kloseb9621712010-04-24 17:59:49 +000011306$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011307
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011308 works=yes
11309
Guido van Rossum627b2d71993-12-24 10:39:16 +000011310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11313$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314
Martin v. Löwisd6320502004-08-12 13:45:08 +000011315# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11317$as_echo_n "checking for socketpair... " >&6; }
11318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011319/* end confdefs.h. */
11320
11321#include <sys/types.h>
11322#include <sys/socket.h>
11323
11324int
11325main ()
11326{
11327void *x=socketpair
11328 ;
11329 return 0;
11330}
11331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011333
Matthias Kloseb9621712010-04-24 17:59:49 +000011334$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011335
Matthias Kloseb159a552010-04-25 21:00:44 +000011336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011337$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011338else
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11340$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011341
11342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011344
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011345# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11347$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011349/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011350#include <sys/types.h>
11351#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011352int
11353main ()
11354{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011355struct sockaddr x;
11356x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 ;
11358 return 0;
11359}
11360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011361if ac_fn_c_try_compile "$LINENO"; then :
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11363$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011364
Matthias Kloseb9621712010-04-24 17:59:49 +000011365$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011366
11367else
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011370
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011373
Guido van Rossumda88dad1995-01-26 00:46:29 +000011374va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11376$as_echo_n "checking whether va_list is an array... " >&6; }
11377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011379
11380#ifdef HAVE_STDARG_PROTOTYPES
11381#include <stdarg.h>
11382#else
11383#include <varargs.h>
11384#endif
11385
Martin v. Löwis11437992002-04-12 09:54:03 +000011386int
11387main ()
11388{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011389va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 ;
11391 return 0;
11392}
11393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011394if ac_fn_c_try_compile "$LINENO"; then :
11395
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011396else
Skip Montanaro6dead952003-09-25 14:50:04 +000011397
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011400
Guido van Rossumda88dad1995-01-26 00:46:29 +000011401 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011402
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11406$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011407
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011408# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011409
11410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011412if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011415
Matthias Kloseb9621712010-04-24 17:59:49 +000011416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11417$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011418 OLD_CFLAGS=$CFLAGS
11419 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011422
11423# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011424
Martin v. Löwis11437992002-04-12 09:54:03 +000011425int
11426main ()
11427{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011428
11429 char *name;
11430 struct hostent *he, *res;
11431 char buffer[2048];
11432 int buflen = 2048;
11433 int h_errnop;
11434
11435 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011436
11437 ;
11438 return 0;
11439}
11440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011441if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Matthias Kloseb9621712010-04-24 17:59:49 +000011443 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011444
Martin v. Löwis11437992002-04-12 09:54:03 +000011445
Matthias Kloseb9621712010-04-24 17:59:49 +000011446$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11449$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011450
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011451else
Skip Montanaro6dead952003-09-25 14:50:04 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11454$as_echo "no" >&6; }
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11456$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011458/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011459
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011460# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Martin v. Löwis11437992002-04-12 09:54:03 +000011462int
11463main ()
11464{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011465
11466 char *name;
11467 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011468 char buffer[2048];
11469 int buflen = 2048;
11470 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011471
Matthias Kloseb159a552010-04-25 21:00:44 +000011472 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011473
11474 ;
11475 return 0;
11476}
11477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
Matthias Kloseb9621712010-04-24 17:59:49 +000011480 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011481
Martin v. Löwis11437992002-04-12 09:54:03 +000011482
Matthias Kloseb159a552010-04-25 21:00:44 +000011483$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011484
Matthias Kloseb9621712010-04-24 17:59:49 +000011485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11486$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011487
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011488else
Skip Montanaro6dead952003-09-25 14:50:04 +000011489
Matthias Kloseb9621712010-04-24 17:59:49 +000011490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11491$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11493$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11495/* end confdefs.h. */
11496
11497# include <netdb.h>
11498
11499int
11500main ()
11501{
11502
11503 char *name;
11504 struct hostent *he;
11505 struct hostent_data data;
11506
11507 (void) gethostbyname_r(name, he, &data);
11508
11509 ;
11510 return 0;
11511}
11512_ACEOF
11513if ac_fn_c_try_compile "$LINENO"; then :
11514
11515 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11516
11517
11518$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11519
11520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11521$as_echo "yes" >&6; }
11522
11523else
11524
11525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011533
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011536 CFLAGS=$OLD_CFLAGS
11537
11538else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 for ac_func in gethostbyname
11541do :
11542 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011543if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011545#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011546_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011548fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011549done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011550
Michael W. Hudson54241132001-12-07 15:38:26 +000011551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011552fi
11553
Michael W. Hudson54241132001-12-07 15:38:26 +000011554
11555
11556
11557
11558
11559
Guido van Rossum627b2d71993-12-24 10:39:16 +000011560# checks for system services
11561# (none yet)
11562
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011563# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011564ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011565if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011566
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011567else
Matthias Kloseb9621712010-04-24 17:59:49 +000011568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11569$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011570if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011572else
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011574LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578/* Override any GCC internal prototype to avoid an error.
11579 Use char because int might match the return type of a GCC
11580 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011581#ifdef __cplusplus
11582extern "C"
11583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011584char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011585int
11586main ()
11587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ;
11590 return 0;
11591}
11592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011593if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011594 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011595else
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011598rm -f core conftest.err conftest.$ac_objext \
11599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011600LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11603$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011604if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011605 cat >>confdefs.h <<_ACEOF
11606#define HAVE_LIBIEEE 1
11607_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011608
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011609 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011610
Guido van Rossum627b2d71993-12-24 10:39:16 +000011611fi
11612
Michael W. Hudson54241132001-12-07 15:38:26 +000011613
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011614fi
11615
Michael W. Hudson54241132001-12-07 15:38:26 +000011616
Guido van Rossum7f253911997-05-09 02:42:48 +000011617# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11619$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011624if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011625then
11626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11630$as_echo "yes" >&6; }
11631else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11632$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011633fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011634else
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11636$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011637fi
11638
Guido van Rossum7f253911997-05-09 02:42:48 +000011639
Guido van Rossum7f43da71994-08-01 12:15:30 +000011640# check for --with-libm=...
11641
Guido van Rossum563e7081996-09-10 18:20:48 +000011642case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011643Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011644*) LIBM=-lm
11645esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11647$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011649# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011650if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011651 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011652if test "$withval" = no
11653then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11655$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011656elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011657then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11659$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011660else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011661fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011662else
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11664$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665fi
11666
Guido van Rossum7f43da71994-08-01 12:15:30 +000011667
11668# check for --with-libc=...
11669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11671$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011673# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011674if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011675 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011676if test "$withval" = no
11677then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11679$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011680elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011681then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11683$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011684else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011685fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011686else
Matthias Kloseb9621712010-04-24 17:59:49 +000011687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11688$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689fi
11690
Guido van Rossum7f43da71994-08-01 12:15:30 +000011691
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692# **************************************************
11693# * Check for various properties of floating point *
11694# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11697$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011698if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700else
11701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703 ac_cv_little_endian_double=no
11704else
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011706/* end confdefs.h. */
11707
11708#include <string.h>
11709int main() {
11710 double x = 9006104071832581.0;
11711 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11712 return 0;
11713 else
11714 return 1;
11715}
11716
11717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011718if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719 ac_cv_little_endian_double=yes
11720else
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11724 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725fi
11726
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727fi
11728
Matthias Kloseb9621712010-04-24 17:59:49 +000011729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11730$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731if test "$ac_cv_little_endian_double" = yes
11732then
11733
Matthias Kloseb9621712010-04-24 17:59:49 +000011734$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011735
11736fi
11737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11739$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011740if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742else
11743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011745 ac_cv_big_endian_double=no
11746else
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011748/* end confdefs.h. */
11749
11750#include <string.h>
11751int main() {
11752 double x = 9006104071832581.0;
11753 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11754 return 0;
11755 else
11756 return 1;
11757}
11758
11759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761 ac_cv_big_endian_double=yes
11762else
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767fi
11768
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769fi
11770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11772$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011773if test "$ac_cv_big_endian_double" = yes
11774then
11775
Matthias Kloseb9621712010-04-24 17:59:49 +000011776$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011777
11778fi
11779
11780# Some ARM platforms use a mixed-endian representation for doubles.
11781# While Python doesn't currently have full support for these platforms
11782# (see e.g., issue 1762561), we can at least make sure that float <-> string
11783# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11785$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011786if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788else
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791 ac_cv_mixed_endian_double=no
11792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011794/* end confdefs.h. */
11795
11796#include <string.h>
11797int main() {
11798 double x = 9006104071832581.0;
11799 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11800 return 0;
11801 else
11802 return 1;
11803}
11804
11805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011806if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807 ac_cv_mixed_endian_double=yes
11808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011813fi
11814
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011815fi
11816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11818$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011819if test "$ac_cv_mixed_endian_double" = yes
11820then
11821
Matthias Kloseb9621712010-04-24 17:59:49 +000011822$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011823
11824fi
11825
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011826# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011827# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011828# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011829# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011830# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011831# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011832
11833# This inline assembler syntax may also work for suncc and icc,
11834# so we try it on all platforms.
11835
Matthias Kloseb9621712010-04-24 17:59:49 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11837$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011839/* end confdefs.h. */
11840
11841int
11842main ()
11843{
11844
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011845 unsigned short cw;
11846 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11847 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011848
11849 ;
11850 return 0;
11851}
11852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011853if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011854 have_gcc_asm_for_x87=yes
11855else
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011857fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11860$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011861if test "$have_gcc_asm_for_x87" = yes
11862then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011865
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011867
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011868# Detect whether system arithmetic is subject to x87-style double
11869# rounding issues. The result of this test has little meaning on non
11870# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11871# mode is round-to-nearest and double rounding issues are present, and
11872# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11874$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011875# $BASECFLAGS may affect the result
11876ac_save_cc="$CC"
11877CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011878if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011879 ac_cv_x87_double_rounding=no
11880else
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011882/* end confdefs.h. */
11883
11884#include <stdlib.h>
11885#include <math.h>
11886int main() {
11887 volatile double x, y, z;
11888 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11889 x = 0.99999999999999989; /* 1-2**-53 */
11890 y = 1./x;
11891 if (y != 1.)
11892 exit(0);
11893 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11894 x = 1e16;
11895 y = 2.99999;
11896 z = x + y;
11897 if (z != 1e16+4.)
11898 exit(0);
11899 /* both tests show evidence of double rounding */
11900 exit(1);
11901}
11902
11903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011905 ac_cv_x87_double_rounding=no
11906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011911fi
11912
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011913CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11915$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011916if test "$ac_cv_x87_double_rounding" = yes
11917then
11918
Matthias Kloseb9621712010-04-24 17:59:49 +000011919$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011920
11921fi
11922
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011923# ************************************
11924# * Check for mathematical functions *
11925# ************************************
11926
11927LIBS_SAVE=$LIBS
11928LIBS="$LIBS $LIBM"
11929
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011930for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11931do :
11932 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11933ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011934if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011935 cat >>confdefs.h <<_ACEOF
11936#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11937_ACEOF
11938
11939fi
11940done
11941
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011942for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011943do :
11944 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11945ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011946if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011947 cat >>confdefs.h <<_ACEOF
11948#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11949_ACEOF
11950
11951fi
11952done
11953
11954ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11955"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011956if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011957 ac_have_decl=1
11958else
11959 ac_have_decl=0
11960fi
11961
11962cat >>confdefs.h <<_ACEOF
11963#define HAVE_DECL_ISINF $ac_have_decl
11964_ACEOF
11965ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11966"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011967if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011968 ac_have_decl=1
11969else
11970 ac_have_decl=0
11971fi
11972
11973cat >>confdefs.h <<_ACEOF
11974#define HAVE_DECL_ISNAN $ac_have_decl
11975_ACEOF
11976ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11977"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011978if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011979 ac_have_decl=1
11980else
11981 ac_have_decl=0
11982fi
11983
11984cat >>confdefs.h <<_ACEOF
11985#define HAVE_DECL_ISFINITE $ac_have_decl
11986_ACEOF
11987
11988
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011989# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11990# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11992$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011993if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011995else
11996
Matthias Kloseb9621712010-04-24 17:59:49 +000011997if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011998 ac_cv_tanh_preserves_zero_sign=no
11999else
Matthias Kloseb9621712010-04-24 17:59:49 +000012000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012001/* end confdefs.h. */
12002
12003#include <math.h>
12004#include <stdlib.h>
12005int main() {
12006 /* return 0 if either negative zeros don't exist
12007 on this platform or if negative zeros exist
12008 and tanh(-0.) == -0. */
12009 if (atan2(0., -1.) == atan2(-0., -1.) ||
12010 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12011 else exit(1);
12012}
12013
12014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012015if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012016 ac_cv_tanh_preserves_zero_sign=yes
12017else
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12021 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012022fi
12023
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012024fi
12025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12027$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012028if test "$ac_cv_tanh_preserves_zero_sign" = yes
12029then
12030
Matthias Kloseb9621712010-04-24 17:59:49 +000012031$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012032
12033fi
12034
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012035if test "$ac_cv_func_log1p" = yes
12036then
12037 # On some versions of AIX, log1p(-0.) returns 0. instead of
12038 # -0. See issue #9920.
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12040$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012041 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012042 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012043else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012044
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012045 if test "$cross_compiling" = yes; then :
12046 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012047else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12049/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012050
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012051 #include <math.h>
12052 #include <stdlib.h>
12053 int main() {
12054 /* Fail if the signs of log1p(-0.) and -0. can be
12055 distinguished. */
12056 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12057 return 0;
12058 else
12059 return 1;
12060 }
12061
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012062_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012063if ac_fn_c_try_run "$LINENO"; then :
12064 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012065else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012066 ac_cv_log1p_drops_zero_sign=yes
12067fi
12068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12069 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012070fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012071
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012072fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012073
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12075$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12076fi
12077if test "$ac_cv_log1p_drops_zero_sign" = yes
12078then
12079
12080$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12081
12082fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012083
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012084LIBS=$LIBS_SAVE
12085
Mark Dickinsona614f042009-11-28 12:48:43 +000012086# For multiprocessing module, check that sem_open
12087# actually works. For FreeBSD versions <= 7.2,
12088# the kernel module that provides POSIX semaphores
12089# isn't loaded by default, so an attempt to call
12090# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12092$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012093if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012097 ac_cv_posix_semaphores_enabled=yes
12098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012100/* end confdefs.h. */
12101
12102#include <unistd.h>
12103#include <fcntl.h>
12104#include <stdio.h>
12105#include <semaphore.h>
12106#include <sys/stat.h>
12107
12108int main(void) {
12109 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12110 if (a == SEM_FAILED) {
12111 perror("sem_open");
12112 return 1;
12113 }
12114 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012115 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012116 return 0;
12117}
12118
12119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012120if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012121 ac_cv_posix_semaphores_enabled=yes
12122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12126 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012127fi
12128
12129
Mark Dickinsona614f042009-11-28 12:48:43 +000012130fi
12131
Matthias Kloseb9621712010-04-24 17:59:49 +000012132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12133$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012134if test $ac_cv_posix_semaphores_enabled = no
12135then
12136
Matthias Kloseb9621712010-04-24 17:59:49 +000012137$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012138
12139fi
12140
Mark Dickinson10683072009-04-18 21:18:19 +000012141# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12143$as_echo_n "checking for broken sem_getvalue... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012144if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012148 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012151/* end confdefs.h. */
12152
12153#include <unistd.h>
12154#include <fcntl.h>
12155#include <stdio.h>
12156#include <semaphore.h>
12157#include <sys/stat.h>
12158
12159int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012160 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012161 int count;
12162 int res;
12163 if(a==SEM_FAILED){
12164 perror("sem_open");
12165 return 1;
12166
12167 }
12168 res = sem_getvalue(a, &count);
12169 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012170 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012171 return res==-1 ? 1 : 0;
12172}
12173
Mark Dickinson10683072009-04-18 21:18:19 +000012174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012175if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012176 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12181 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012182fi
12183
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012184
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012185fi
12186
Matthias Kloseb9621712010-04-24 17:59:49 +000012187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12188$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012189if test $ac_cv_broken_sem_getvalue = yes
12190then
12191
Matthias Kloseb9621712010-04-24 17:59:49 +000012192$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012193
12194fi
12195
Mark Dickinsonbd792642009-03-18 20:06:12 +000012196# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12198$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012199# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012200if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012201 enableval=$enable_big_digits; case $enable_big_digits in
12202yes)
12203 enable_big_digits=30 ;;
12204no)
12205 enable_big_digits=15 ;;
1220615|30)
12207 ;;
12208*)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012209 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 +000012210esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12212$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012213
12214cat >>confdefs.h <<_ACEOF
12215#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12216_ACEOF
12217
12218
12219else
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12221$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012222fi
12223
12224
Guido van Rossumef2255b2000-03-10 22:30:29 +000012225# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012226ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012227if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012228
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012231
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012232 wchar_h="yes"
12233
Guido van Rossumef2255b2000-03-10 22:30:29 +000012234else
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012236
12237fi
12238
Michael W. Hudson54241132001-12-07 15:38:26 +000012239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012241# determine wchar_t size
12242if test "$wchar_h" = yes
12243then
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12247# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12249$as_echo_n "checking size of wchar_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012250if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012252else
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12254"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256else
Matthias Kloseb9621712010-04-24 17:59:49 +000012257 if test "$ac_cv_type_wchar_t" = yes; then
12258 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12259$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012260as_fn_error 77 "cannot compute sizeof (wchar_t)
12261See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262 else
12263 ac_cv_sizeof_wchar_t=0
12264 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012266
Martin v. Löwis11437992002-04-12 09:54:03 +000012267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12269$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270
12271
12272
Martin v. Löwis11437992002-04-12 09:54:03 +000012273cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012274#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012275_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012276
Michael W. Hudson54241132001-12-07 15:38:26 +000012277
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012278fi
12279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12281$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012282have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012284/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012285
12286#include <tcl.h>
12287#if TCL_UTF_MAX != 6
12288# error "NOT UCS4_TCL"
12289#endif
12290int
12291main ()
12292{
12293
12294 ;
12295 return 0;
12296}
12297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012299
12300
Matthias Kloseb9621712010-04-24 17:59:49 +000012301$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012302
12303 have_ucs4_tcl=yes
12304
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12308$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012309
Skip Montanaro6dead952003-09-25 14:50:04 +000012310# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012311if test "$wchar_h" = yes
12312then
12313 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12315$as_echo_n "checking whether wchar_t is signed... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012316 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012318else
12319
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012321 ac_cv_wchar_t_signed=yes
12322else
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012324/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012325
12326 #include <wchar.h>
12327 int main()
12328 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012329 /* Success: exit code 0 */
12330 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012331 }
12332
12333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012335 ac_cv_wchar_t_signed=yes
12336else
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012341fi
12342
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012343fi
12344
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12346$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347fi
12348
Matthias Kloseb9621712010-04-24 17:59:49 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12350$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012351
12352# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012354 withval=$with_wide_unicode;
12355if test "$withval" != no
12356then unicode_size="4"
12357else unicode_size="2"
12358fi
12359
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012360else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361
Georg Brandl52d168a2008-01-07 18:10:24 +000012362case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012363 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012364 *) unicode_size="2" ;;
12365esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012366
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012367fi
12368
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012369
12370
Georg Brandl52d168a2008-01-07 18:10:24 +000012371case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012372 4)
12373 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12374
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012375 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012376 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012378 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012379esac
12380
Michael W. Hudson54241132001-12-07 15:38:26 +000012381
Martin v. Löwis11437992002-04-12 09:54:03 +000012382
Georg Brandl52d168a2008-01-07 18:10:24 +000012383# wchar_t is only usable if it maps to an unsigned type
12384if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012385 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012386then
12387 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012388
Matthias Kloseb9621712010-04-24 17:59:49 +000012389$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012392
Georg Brandl52d168a2008-01-07 18:10:24 +000012393elif test "$ac_cv_sizeof_short" = "$unicode_size"
12394then
12395 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012397
Georg Brandl52d168a2008-01-07 18:10:24 +000012398elif test "$ac_cv_sizeof_long" = "$unicode_size"
12399then
12400 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012402
Georg Brandl52d168a2008-01-07 18:10:24 +000012403else
12404 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12407$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012408
12409# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12411$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012412if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012414else
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 ac_cv_c_bigendian=unknown
12416 # See if we're dealing with a universal compiler.
12417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12418/* end confdefs.h. */
12419#ifndef __APPLE_CC__
12420 not a universal capable compiler
12421 #endif
12422 typedef int dummy;
12423
Skip Montanaro6dead952003-09-25 14:50:04 +000012424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425if ac_fn_c_try_compile "$LINENO"; then :
12426
12427 # Check for potential -arch flags. It is not universal unless
12428 # there are at least two -arch flags with different values.
12429 ac_arch=
12430 ac_prev=
12431 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12432 if test -n "$ac_prev"; then
12433 case $ac_word in
12434 i?86 | x86_64 | ppc | ppc64)
12435 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12436 ac_arch=$ac_word
12437 else
12438 ac_cv_c_bigendian=universal
12439 break
12440 fi
12441 ;;
12442 esac
12443 ac_prev=
12444 elif test "x$ac_word" = "x-arch"; then
12445 ac_prev=arch
12446 fi
12447 done
12448fi
12449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12450 if test $ac_cv_c_bigendian = unknown; then
12451 # See if sys/param.h defines the BYTE_ORDER macro.
12452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012453/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012454#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457int
12458main ()
12459{
Matthias Kloseb9621712010-04-24 17:59:49 +000012460#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12461 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12462 && LITTLE_ENDIAN)
12463 bogus endian macros
12464 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
12466 ;
12467 return 0;
12468}
12469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012470if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012473/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012474#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012476
Martin v. Löwis11437992002-04-12 09:54:03 +000012477int
12478main ()
12479{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012480#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 not big endian
12482 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
12484 ;
12485 return 0;
12486}
12487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012488if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012489 ac_cv_c_bigendian=yes
12490else
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012494fi
12495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12496 fi
12497 if test $ac_cv_c_bigendian = unknown; then
12498 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012500/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012501#include <limits.h>
12502
Martin v. Löwis11437992002-04-12 09:54:03 +000012503int
12504main ()
12505{
Matthias Kloseb9621712010-04-24 17:59:49 +000012506#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12507 bogus endian macros
12508 #endif
12509
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 ;
12511 return 0;
12512}
12513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012514if ac_fn_c_try_compile "$LINENO"; then :
12515 # It does; now see whether it defined to _BIG_ENDIAN or not.
12516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517/* end confdefs.h. */
12518#include <limits.h>
12519
12520int
12521main ()
12522{
12523#ifndef _BIG_ENDIAN
12524 not big endian
12525 #endif
12526
12527 ;
12528 return 0;
12529}
12530_ACEOF
12531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012532 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12537fi
12538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12539 fi
12540 if test $ac_cv_c_bigendian = unknown; then
12541 # Compile a test program.
12542 if test "$cross_compiling" = yes; then :
12543 # Try to guess by grepping values from an object file.
12544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12545/* end confdefs.h. */
12546short int ascii_mm[] =
12547 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12548 short int ascii_ii[] =
12549 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12550 int use_ascii (int i) {
12551 return ascii_mm[i] + ascii_ii[i];
12552 }
12553 short int ebcdic_ii[] =
12554 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12555 short int ebcdic_mm[] =
12556 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12557 int use_ebcdic (int i) {
12558 return ebcdic_mm[i] + ebcdic_ii[i];
12559 }
12560 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012561
Matthias Kloseb9621712010-04-24 17:59:49 +000012562int
12563main ()
12564{
12565return use_ascii (foo) == use_ebcdic (foo);
12566 ;
12567 return 0;
12568}
12569_ACEOF
12570if ac_fn_c_try_compile "$LINENO"; then :
12571 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12572 ac_cv_c_bigendian=yes
12573 fi
12574 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12575 if test "$ac_cv_c_bigendian" = unknown; then
12576 ac_cv_c_bigendian=no
12577 else
12578 # finding both strings is unlikely to happen, but who knows?
12579 ac_cv_c_bigendian=unknown
12580 fi
12581 fi
12582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012584else
Matthias Kloseb9621712010-04-24 17:59:49 +000012585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012586/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012587$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012588int
12589main ()
12590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 /* Are we little or big endian? From Harbison&Steele. */
12593 union
12594 {
12595 long int l;
12596 char c[sizeof (long int)];
12597 } u;
12598 u.l = 1;
12599 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012600
12601 ;
12602 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012603}
Martin v. Löwis11437992002-04-12 09:54:03 +000012604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012605if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012606 ac_cv_c_bigendian=no
12607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12617$as_echo "$ac_cv_c_bigendian" >&6; }
12618 case $ac_cv_c_bigendian in #(
12619 yes)
12620 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12621;; #(
12622 no)
12623 ;; #(
12624 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012625
Matthias Kloseb9621712010-04-24 17:59:49 +000012626$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 ;; #(
12629 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012630 as_fn_error $? "unknown endianness
12631 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012633
Michael W. Hudson54241132001-12-07 15:38:26 +000012634
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012635# ABI version string for Python extension modules. This appears between the
12636# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12637# from the following attributes which affect the ABI of this Python build (in
12638# this order):
12639#
12640# * The Python implementation (always 'cpython-' for us)
12641# * The major and minor version numbers
12642# * --with-pydebug (adds a 'd')
12643# * --with-pymalloc (adds a 'm')
12644# * --with-wide-unicode (adds a 'u')
12645#
12646# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012647# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12648# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012649
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12651$as_echo_n "checking ABIFLAGS... " >&6; }
12652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12653$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12655$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012656SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12658$as_echo "$SOABI" >&6; }
12659
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12661$as_echo_n "checking LDVERSION... " >&6; }
12662LDVERSION='$(VERSION)$(ABIFLAGS)'
12663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12664$as_echo "$LDVERSION" >&6; }
12665
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012666# SO is the extension of shared libraries `(including the dot!)
12667# -- usually .so, .sl on HP-UX, .dll on Cygwin
12668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12669$as_echo_n "checking SO... " >&6; }
12670if test -z "$SO"
12671then
12672 case $ac_sys_system in
12673 hp*|HP*)
12674 case `uname -m` in
12675 ia64) SO=.so;;
12676 *) SO=.sl;;
12677 esac
12678 ;;
12679 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012680 Linux*|GNU*)
12681 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012682 *) SO=.so;;
12683 esac
12684else
12685 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012686 echo
12687 echo '====================================================================='
12688 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012689 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012690 echo '+ Do you really mean to change the extension for shared libraries? +'
12691 echo '+ Continuing in 10 seconds to let you to ponder. +'
12692 echo '+ +'
12693 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012694 sleep 10
12695fi
12696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12697$as_echo "$SO" >&6; }
12698
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012699# Check whether right shifting a negative integer extends the sign bit
12700# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12702$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012703if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012704 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012705else
Martin v. Löwis11437992002-04-12 09:54:03 +000012706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012708 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012709else
Matthias Kloseb9621712010-04-24 17:59:49 +000012710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012711/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012712
12713int main()
12714{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012715 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012716}
12717
Martin v. Löwis11437992002-04-12 09:54:03 +000012718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012719if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012720 ac_cv_rshift_extends_sign=yes
12721else
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012726fi
12727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728fi
12729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12731$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012732if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012733then
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012736
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012737fi
12738
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012739# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12741$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012742if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012743 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012744else
Martin v. Löwis11437992002-04-12 09:54:03 +000012745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012747/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012748#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012749int
12750main ()
12751{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012752
12753 FILE *f = fopen("/dev/null", "r");
12754 flockfile(f);
12755 getc_unlocked(f);
12756 funlockfile(f);
12757
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 ;
12759 return 0;
12760}
12761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012762if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012763 ac_cv_have_getc_unlocked=yes
12764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 ac_cv_have_getc_unlocked=no
12766fi
12767rm -f core conftest.err conftest.$ac_objext \
12768 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12772$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012773if test "$ac_cv_have_getc_unlocked" = yes
12774then
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Matthias Kloseb9621712010-04-24 17:59:49 +000012776$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012777
12778fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012779
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012780# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012781# save the value of LIBS so we don't actually link Python with readline
12782LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012783
Gregory P. Smith18820942008-09-07 06:24:49 +000012784# On some systems we need to link readline to a termcap compatible
12785# library. NOTE: Keep the precedence of listed libraries synchronised
12786# with setup.py.
12787py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12789$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012790for py_libtermcap in "" ncursesw ncurses curses termcap; do
12791 if test -z "$py_libtermcap"; then
12792 READLINE_LIBS="-lreadline"
12793 else
12794 READLINE_LIBS="-lreadline -l$py_libtermcap"
12795 fi
12796 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012798/* end confdefs.h. */
12799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012800/* Override any GCC internal prototype to avoid an error.
12801 Use char because int might match the return type of a GCC
12802 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012803#ifdef __cplusplus
12804extern "C"
12805#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012806char readline ();
12807int
12808main ()
12809{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012811 ;
12812 return 0;
12813}
12814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012815if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012816 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012818rm -f core conftest.err conftest.$ac_objext \
12819 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012820 if test $py_cv_lib_readline = yes; then
12821 break
12822 fi
12823done
12824# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12825#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012826if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12828$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012829else
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12831$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012834
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012835fi
12836
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012837# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12839$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012840if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012842else
12843 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012844LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012846/* end confdefs.h. */
12847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848/* Override any GCC internal prototype to avoid an error.
12849 Use char because int might match the return type of a GCC
12850 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012851#ifdef __cplusplus
12852extern "C"
12853#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012854char rl_callback_handler_install ();
12855int
12856main ()
12857{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012859 ;
12860 return 0;
12861}
12862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012863if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012864 ac_cv_lib_readline_rl_callback_handler_install=yes
12865else
Matthias Kloseb9621712010-04-24 17:59:49 +000012866 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012868rm -f core conftest.err conftest.$ac_objext \
12869 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012870LIBS=$ac_check_lib_save_LIBS
12871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12873$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012874if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012877
12878fi
12879
12880
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012881# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012883/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012884#include <readline/readline.h>
12885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012887 have_readline=yes
12888else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012889 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012890
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012891fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012892rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012893if test $have_readline = yes
12894then
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012897#include <readline/readline.h>
12898
12899_ACEOF
12900if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012901 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012904
12905fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012906rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012909/* end confdefs.h. */
12910#include <readline/readline.h>
12911
12912_ACEOF
12913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012915
Matthias Kloseb9621712010-04-24 17:59:49 +000012916$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012917
12918fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012919rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012920
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012921fi
12922
Martin v. Löwis0daad592001-09-30 21:09:59 +000012923# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12925$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012926if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012928else
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012930LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934/* Override any GCC internal prototype to avoid an error.
12935 Use char because int might match the return type of a GCC
12936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012937#ifdef __cplusplus
12938extern "C"
12939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012940char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012941int
12942main ()
12943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 ;
12946 return 0;
12947}
12948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012951else
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012954rm -f core conftest.err conftest.$ac_objext \
12955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012956LIBS=$ac_check_lib_save_LIBS
12957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12959$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012960if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012963
Martin v. Löwis0daad592001-09-30 21:09:59 +000012964fi
12965
Michael W. Hudson54241132001-12-07 15:38:26 +000012966
Thomas Wouters89d996e2007-09-08 17:39:28 +000012967# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12969$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012970if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012972else
12973 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012974LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012976/* end confdefs.h. */
12977
12978/* Override any GCC internal prototype to avoid an error.
12979 Use char because int might match the return type of a GCC
12980 builtin and then its argument prototype would still apply. */
12981#ifdef __cplusplus
12982extern "C"
12983#endif
12984char rl_completion_display_matches_hook ();
12985int
12986main ()
12987{
12988return rl_completion_display_matches_hook ();
12989 ;
12990 return 0;
12991}
12992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012993if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012994 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12995else
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012998rm -f core conftest.err conftest.$ac_objext \
12999 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013000LIBS=$ac_check_lib_save_LIBS
13001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13003$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013004if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013007
13008fi
13009
13010
Martin v. Löwis0daad592001-09-30 21:09:59 +000013011# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13013$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013014if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013016else
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013018LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022/* Override any GCC internal prototype to avoid an error.
13023 Use char because int might match the return type of a GCC
13024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013025#ifdef __cplusplus
13026extern "C"
13027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013028char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013029int
13030main ()
13031{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013032return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ;
13034 return 0;
13035}
13036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013037if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013039else
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013042rm -f core conftest.err conftest.$ac_objext \
13043 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013044LIBS=$ac_check_lib_save_LIBS
13045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13047$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013048if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013049
Matthias Kloseb9621712010-04-24 17:59:49 +000013050$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013051
Guido van Rossum353ae582001-07-10 16:45:32 +000013052fi
13053
Jack Jansendd19cf82001-12-06 22:36:17 +000013054
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013055# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013057/* end confdefs.h. */
13058#include <readline/readline.h>
13059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013060if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013061 have_readline=yes
13062else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013063 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013064
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013065fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013066rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013067if test $have_readline = yes
13068then
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013070/* end confdefs.h. */
13071#include <readline/readline.h>
13072
13073_ACEOF
13074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013076
Matthias Kloseb9621712010-04-24 17:59:49 +000013077$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013078
13079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013080rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013081
13082fi
13083
Martin v. Löwis82bca632006-02-10 20:49:30 +000013084# End of readline checks: restore LIBS
13085LIBS=$LIBS_no_readline
13086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13088$as_echo_n "checking for broken nice()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013089if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013091else
Martin v. Löwis11437992002-04-12 09:54:03 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013094 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013098
13099int main()
13100{
13101 int val1 = nice(1);
13102 if (val1 != -1 && val1 == nice(2))
13103 exit(0);
13104 exit(1);
13105}
13106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013108if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013109 ac_cv_broken_nice=yes
13110else
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13114 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013115fi
13116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117fi
13118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13120$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013121if test "$ac_cv_broken_nice" = yes
13122then
Martin v. Löwis11437992002-04-12 09:54:03 +000013123
Matthias Kloseb9621712010-04-24 17:59:49 +000013124$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013125
13126fi
13127
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13129$as_echo_n "checking for broken poll()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013130if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013132else
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013134 ac_cv_broken_poll=no
13135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013137/* end confdefs.h. */
13138
13139#include <poll.h>
13140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013141int main()
13142{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013143 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013144 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013145
13146 close (42);
13147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013148 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013149 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013151 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013152 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013153 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013154 return 1;
13155}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013156
13157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013158if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013159 ac_cv_broken_poll=yes
13160else
Matthias Kloseb9621712010-04-24 17:59:49 +000013161 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13164 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013167fi
13168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13170$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013171if test "$ac_cv_broken_poll" = yes
13172then
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013175
13176fi
13177
Brett Cannon43802422005-02-10 20:48:03 +000013178# 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 +000013179# (which is not required by ISO C or UNIX spec) and/or if we support
13180# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013181ac_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 +000013182#include <$ac_cv_struct_tm>
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013185if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013186
13187cat >>confdefs.h <<_ACEOF
13188#define HAVE_STRUCT_TM_TM_ZONE 1
13189_ACEOF
13190
13191
13192fi
13193
13194if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13195
Matthias Kloseb9621712010-04-24 17:59:49 +000013196$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013197
13198else
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13200"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013201if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013205fi
13206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013208#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209_ACEOF
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13212$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013213if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013215else
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013217/* end confdefs.h. */
13218#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013219#if !HAVE_DECL_TZNAME
13220extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013221#endif
13222
13223int
13224main ()
13225{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013226return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013227 ;
13228 return 0;
13229}
13230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013231if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013232 ac_cv_var_tzname=yes
13233else
Matthias Kloseb9621712010-04-24 17:59:49 +000013234 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013236rm -f core conftest.err conftest.$ac_objext \
13237 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13240$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013241 if test $ac_cv_var_tzname = yes; then
13242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013244
13245 fi
13246fi
13247
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013248
Martin v. Löwis1d459062005-03-14 21:23:33 +000013249# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13251$as_echo_n "checking for working tzset()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013252if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013254else
13255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013257 ac_cv_working_tzset=no
13258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013260/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013261
13262#include <stdlib.h>
13263#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013264#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013265
13266#if HAVE_TZNAME
13267extern char *tzname[];
13268#endif
13269
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013270int main()
13271{
Brett Cannon18367812003-09-19 00:59:16 +000013272 /* Note that we need to ensure that not only does tzset(3)
13273 do 'something' with localtime, but it works as documented
13274 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013275 This includes making sure that tzname is set properly if
13276 tm->tm_zone does not exist since it is the alternative way
13277 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013278
13279 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013280 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013281 */
13282
Martin v. Löwis1d459062005-03-14 21:23:33 +000013283 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013284 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13285
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013286 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013287 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013288 if (localtime(&groundhogday)->tm_hour != 0)
13289 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013290#if HAVE_TZNAME
13291 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13292 if (strcmp(tzname[0], "UTC") ||
13293 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13294 exit(1);
13295#endif
Brett Cannon18367812003-09-19 00:59:16 +000013296
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013297 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013298 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013299 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013300 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013301#if HAVE_TZNAME
13302 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13303 exit(1);
13304#endif
Brett Cannon18367812003-09-19 00:59:16 +000013305
13306 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13307 tzset();
13308 if (localtime(&groundhogday)->tm_hour != 11)
13309 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013310#if HAVE_TZNAME
13311 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13312 exit(1);
13313#endif
13314
13315#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013316 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13317 exit(1);
13318 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13319 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013320#endif
Brett Cannon18367812003-09-19 00:59:16 +000013321
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013322 exit(0);
13323}
13324
13325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013326if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013327 ac_cv_working_tzset=yes
13328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13332 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013333fi
13334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013335fi
13336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13338$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013339if test "$ac_cv_working_tzset" = yes
13340then
13341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013343
13344fi
13345
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013346# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13348$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013349if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013350 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013351else
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013353/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013354#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013355int
13356main ()
13357{
13358
13359struct stat st;
13360st.st_mtim.tv_nsec = 1;
13361
13362 ;
13363 return 0;
13364}
13365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013367 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013368else
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13372fi
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13375$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013376if test "$ac_cv_stat_tv_nsec" = yes
13377then
13378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013380
13381fi
13382
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013383# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13385$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013386if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013390/* end confdefs.h. */
13391#include <sys/stat.h>
13392int
13393main ()
13394{
13395
13396struct stat st;
13397st.st_mtimespec.tv_nsec = 1;
13398
13399 ;
13400 return 0;
13401}
13402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013404 ac_cv_stat_tv_nsec2=yes
13405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13409fi
13410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13412$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013413if test "$ac_cv_stat_tv_nsec2" = yes
13414then
13415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013417
13418fi
13419
Jack Jansen666b1e72001-10-31 12:11:48 +000013420# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13422$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013423if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013425else
Matthias Kloseb9621712010-04-24 17:59:49 +000013426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013427/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013428#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013429int
13430main ()
13431{
Jack Jansen666b1e72001-10-31 12:11:48 +000013432
13433 int rtn;
13434 rtn = mvwdelch(0,0,0);
13435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 ;
13437 return 0;
13438}
13439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013440if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013441 ac_cv_mvwdelch_is_expression=yes
13442else
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13446fi
13447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13449$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013450
13451if test "$ac_cv_mvwdelch_is_expression" = yes
13452then
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013455
13456fi
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13459$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013460if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013462else
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013464/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013465#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013466int
13467main ()
13468{
Jack Jansen666b1e72001-10-31 12:11:48 +000013469
13470 WINDOW *w;
13471 w->_flags = 0;
13472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 ;
13474 return 0;
13475}
13476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013477if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013478 ac_cv_window_has_flags=yes
13479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13483fi
13484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13486$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013487
Jack Jansen666b1e72001-10-31 12:11:48 +000013488
13489if test "$ac_cv_window_has_flags" = yes
13490then
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013493
13494fi
13495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13497$as_echo_n "checking for is_term_resized... " >&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=is_term_resized
13505 ;
13506 return 0;
13507}
13508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 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 resize_term" >&5
13523$as_echo_n "checking for resize_term... " >&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=resize_term
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_RESIZE_TERM 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 resizeterm" >&5
13549$as_echo_n "checking for resizeterm... " >&6; }
13550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013551/* end confdefs.h. */
13552#include <curses.h>
13553int
13554main ()
13555{
13556void *x=resizeterm
13557 ;
13558 return 0;
13559}
13560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013561if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013562
Matthias Kloseb9621712010-04-24 17:59:49 +000013563$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013564
Matthias Kloseb159a552010-04-25 21:00:44 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013566$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013567else
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013570
13571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13575$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013576
13577if test -r /dev/ptmx
13578then
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13580$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013583
Thomas Wouters89f507f2006-12-13 04:49:30 +000013584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13586$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013587fi
13588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13590$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013591
13592if test -r /dev/ptc
13593then
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13595$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013598
Thomas Wouters89f507f2006-12-13 04:49:30 +000013599else
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013602fi
13603
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013604if test "$have_long_long" = yes
13605then
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13607$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013608 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013612 ac_cv_have_long_long_format=no
13613else
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013615/* end confdefs.h. */
13616
13617 #include <stdio.h>
13618 #include <stddef.h>
13619 #include <string.h>
13620
13621 #ifdef HAVE_SYS_TYPES_H
13622 #include <sys/types.h>
13623 #endif
13624
13625 int main()
13626 {
13627 char buffer[256];
13628
13629 if (sprintf(buffer, "%lld", (long long)123) < 0)
13630 return 1;
13631 if (strcmp(buffer, "123"))
13632 return 1;
13633
13634 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13635 return 1;
13636 if (strcmp(buffer, "-123"))
13637 return 1;
13638
13639 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13640 return 1;
13641 if (strcmp(buffer, "123"))
13642 return 1;
13643
13644 return 0;
13645 }
13646
13647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013648if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013649 ac_cv_have_long_long_format=yes
13650else
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13654 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013655fi
13656
13657
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013658fi
13659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13661$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013662fi
13663
Mark Dickinson89d7d412009-12-31 20:50:59 +000013664if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013665then
13666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013668
13669fi
13670
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013671if test $ac_sys_system = Darwin
13672then
13673 LIBS="$LIBS -framework CoreFoundation"
13674fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13677$as_echo_n "checking for %zd printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013678if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013680else
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013682 ac_cv_have_size_t_format="cross -- assuming yes"
13683
Thomas Wouters477c8d52006-05-27 19:21:47 +000013684else
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013686/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013687
Thomas Wouters477c8d52006-05-27 19:21:47 +000013688#include <stdio.h>
13689#include <stddef.h>
13690#include <string.h>
13691
Christian Heimes2c181612007-12-17 20:04:13 +000013692#ifdef HAVE_SYS_TYPES_H
13693#include <sys/types.h>
13694#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013695
13696#ifdef HAVE_SSIZE_T
13697typedef ssize_t Py_ssize_t;
13698#elif SIZEOF_VOID_P == SIZEOF_LONG
13699typedef long Py_ssize_t;
13700#else
13701typedef int Py_ssize_t;
13702#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013703
Christian Heimes2c181612007-12-17 20:04:13 +000013704int main()
13705{
13706 char buffer[256];
13707
Thomas Wouters477c8d52006-05-27 19:21:47 +000013708 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13709 return 1;
13710
Thomas Wouters89f507f2006-12-13 04:49:30 +000013711 if (strcmp(buffer, "123"))
13712 return 1;
13713
13714 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13715 return 1;
13716
13717 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013718 return 1;
13719
13720 return 0;
13721}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013722
Thomas Wouters477c8d52006-05-27 19:21:47 +000013723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013724if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013725 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013726else
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13730 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013731fi
13732
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13735$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013736if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013737
Matthias Kloseb9621712010-04-24 17:59:49 +000013738$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013739
13740fi
13741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013743#ifdef HAVE_SYS_TYPES_H
13744#include <sys/types.h>
13745#endif
13746#ifdef HAVE_SYS_SOCKET_H
13747#include <sys/socket.h>
13748#endif
13749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013751if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013752
Martin v. Löwis11437992002-04-12 09:54:03 +000013753else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013756
13757fi
13758
Michael W. Hudson54241132001-12-07 15:38:26 +000013759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13761$as_echo_n "checking for broken mbstowcs... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013762if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013764else
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013766 ac_cv_broken_mbstowcs=no
13767else
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013769/* end confdefs.h. */
13770
13771#include<stdlib.h>
13772int main() {
13773 size_t len = -1;
13774 const char *str = "text";
13775 len = mbstowcs(NULL, str, 0);
13776 return (len != 4);
13777}
13778
13779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013780if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013781 ac_cv_broken_mbstowcs=no
13782else
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013787fi
13788
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013789fi
13790
Matthias Kloseb9621712010-04-24 17:59:49 +000013791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13792$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013793if test "$ac_cv_broken_mbstowcs" = yes
13794then
13795
Matthias Kloseb9621712010-04-24 17:59:49 +000013796$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013797
13798fi
13799
Antoine Pitrou042b1282010-08-13 21:15:58 +000013800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13801$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013802if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013803 $as_echo_n "(cached) " >&6
13804else
13805 if test "$cross_compiling" = yes; then :
13806 ac_cv_computed_gotos=no
13807else
13808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13809/* end confdefs.h. */
13810
13811int main(int argc, char **argv)
13812{
13813 static void *targets[1] = { &&LABEL1 };
13814 goto LABEL2;
13815LABEL1:
13816 return 0;
13817LABEL2:
13818 goto *targets[0];
13819 return 1;
13820}
13821
13822_ACEOF
13823if ac_fn_c_try_run "$LINENO"; then :
13824 ac_cv_computed_gotos=yes
13825else
13826 ac_cv_computed_gotos=no
13827fi
13828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13829 conftest.$ac_objext conftest.beam conftest.$ac_ext
13830fi
13831
13832fi
13833
13834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13835$as_echo "$ac_cv_computed_gotos" >&6; }
13836if test "$ac_cv_computed_gotos" = yes
13837then
13838
13839$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13840
13841fi
13842
Antoine Pitroub52ec782009-01-25 16:34:23 +000013843# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13845$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013846
13847# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013848if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013849 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013850if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013851then
13852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013854
Matthias Kloseb9621712010-04-24 17:59:49 +000013855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13856$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013857fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013858if test "$withval" = no
13859then
13860
13861$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13864$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013865fi
13866
Antoine Pitrou042b1282010-08-13 21:15:58 +000013867else
13868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13869$as_echo "no value specified" >&6; }
13870fi
13871
Antoine Pitroub52ec782009-01-25 16:34:23 +000013872
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013873case $ac_sys_system in
13874AIX*)
13875
13876$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13877 ;;
13878esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013879
Michael W. Hudson54241132001-12-07 15:38:26 +000013880
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013881
13882
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013883for h in `(cd $srcdir;echo Python/thread_*.h)`
13884do
13885 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13886done
13887
Michael W. Hudson54241132001-12-07 15:38:26 +000013888
Neal Norwitzd24499d2005-12-18 21:36:39 +000013889SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13891$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013892for dir in $SRCDIRS; do
13893 if test ! -d $dir; then
13894 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013895 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013896done
Matthias Kloseb9621712010-04-24 17:59:49 +000013897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13898$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013899
Guido van Rossum627b2d71993-12-24 10:39:16 +000013900# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013901ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013902
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013903ac_config_files="$ac_config_files Modules/ld_so_aix"
13904
Martin v. Löwis11437992002-04-12 09:54:03 +000013905cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906# This file is a shell script that caches the results of configure
13907# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013908# scripts and configure runs, see configure's option --config-cache.
13909# It is not useful on other systems. If it contains results you don't
13910# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013911#
Martin v. Löwis11437992002-04-12 09:54:03 +000013912# config.status only pays attention to the cache file if you give it
13913# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013914#
Skip Montanaro6dead952003-09-25 14:50:04 +000013915# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013916# loading this file, other *unset* `ac_cv_foo' will be assigned the
13917# following values.
13918
13919_ACEOF
13920
Guido van Rossumf78abae1997-01-21 22:02:36 +000013921# The following way of writing the cache mishandles newlines in values,
13922# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013924# Ultrix sh set writes to stderr and can't be redirected directly,
13925# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926(
13927 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13928 eval ac_val=\$$ac_var
13929 case $ac_val in #(
13930 *${as_nl}*)
13931 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13933$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934 esac
13935 case $ac_var in #(
13936 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13938 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 esac ;;
13940 esac
13941 done
13942
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013944 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13945 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 # `set' does not quote correctly, so add quotes: double-quote
13947 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013948 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013949 "s/'/'\\\\''/g;
13950 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013952 *)
13953 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013955 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956 esac |
13957 sort
13958) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013963 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13964 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13966 :end' >>confcache
13967if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13968 if test -w "$cache_file"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013969 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13971$as_echo "$as_me: updating cache $cache_file" >&6;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013972 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013973 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13975$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013976 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013977fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013978rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013979
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013980test "x$prefix" = xNONE && prefix=$ac_default_prefix
13981# Let make expand exec_prefix.
13982test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013983
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013984DEFS=-DHAVE_CONFIG_H
13985
Skip Montanaro6dead952003-09-25 14:50:04 +000013986ac_libobjs=
13987ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013988U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013989for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13990 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13994 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13996 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013997done
13998LIBOBJS=$ac_libobjs
13999
14000LTLIBOBJS=$ac_ltlibobjs
14001
14002
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
Matthias Kloseb9621712010-04-24 17:59:49 +000014004
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014005: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000014006ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014007ac_clean_files_save=$ac_clean_files
14008ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014009{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14010$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14011as_write_fail=0
14012cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014013#! $SHELL
14014# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014015# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014016# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014017# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014018
Martin v. Löwis11437992002-04-12 09:54:03 +000014019debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014020ac_cs_recheck=false
14021ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023SHELL=\${CONFIG_SHELL-$SHELL}
14024export SHELL
14025_ASEOF
14026cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14027## -------------------- ##
14028## M4sh Initialization. ##
14029## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031# Be more Bourne compatible
14032DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014033if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 emulate sh
14035 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014037 # is contrary to our usage. Disable this feature.
14038 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014040else
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 case `(set -o) 2>/dev/null` in #(
14042 *posix*) :
14043 set -o posix ;; #(
14044 *) :
14045 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014046esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014047fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014048
14049
Matthias Kloseb9621712010-04-24 17:59:49 +000014050as_nl='
14051'
14052export as_nl
14053# Printing a long string crashes Solaris 7 /usr/bin/printf.
14054as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14055as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14056as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14057# Prefer a ksh shell builtin over an external printf program on Solaris,
14058# but without wasting forks for bash or zsh.
14059if test -z "$BASH_VERSION$ZSH_VERSION" \
14060 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14061 as_echo='print -r --'
14062 as_echo_n='print -rn --'
14063elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14064 as_echo='printf %s\n'
14065 as_echo_n='printf %s'
14066else
14067 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14068 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14069 as_echo_n='/usr/ucb/echo -n'
14070 else
14071 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14072 as_echo_n_body='eval
14073 arg=$1;
14074 case $arg in #(
14075 *"$as_nl"*)
14076 expr "X$arg" : "X\\(.*\\)$as_nl";
14077 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14078 esac;
14079 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14080 '
14081 export as_echo_n_body
14082 as_echo_n='sh -c $as_echo_n_body as_echo'
14083 fi
14084 export as_echo_body
14085 as_echo='sh -c $as_echo_body as_echo'
14086fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014087
14088# The user is always right.
14089if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 PATH_SEPARATOR=:
14091 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14092 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14093 PATH_SEPARATOR=';'
14094 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097
14098# IFS
14099# We need space, tab and new line, in precisely that order. Quoting is
14100# there to prevent editors from complaining about space-tab.
14101# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14102# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103IFS=" "" $as_nl"
14104
14105# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014106case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107 *[\\/]* ) as_myself=$0 ;;
14108 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014109for as_dir in $PATH
14110do
14111 IFS=$as_save_IFS
14112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14114 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014115IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117 ;;
14118esac
14119# We did not find ourselves, most probably we were run as `sh COMMAND'
14120# in which case we are not to be found in the path.
14121if test "x$as_myself" = x; then
14122 as_myself=$0
14123fi
14124if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14126 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127fi
14128
Matthias Kloseb9621712010-04-24 17:59:49 +000014129# Unset variables that we do not need and which cause bugs (e.g. in
14130# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14131# suppresses any "Segmentation fault" message there. '((' could
14132# trigger a bug in pdksh 5.2.14.
14133for as_var in BASH_ENV ENV MAIL MAILPATH
14134do eval test x\${$as_var+set} = xset \
14135 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136done
14137PS1='$ '
14138PS2='> '
14139PS4='+ '
14140
14141# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014142LC_ALL=C
14143export LC_ALL
14144LANGUAGE=C
14145export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146
Matthias Kloseb9621712010-04-24 17:59:49 +000014147# CDPATH.
14148(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14149
14150
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014151# as_fn_error STATUS ERROR [LINENO LOG_FD]
14152# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014153# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14154# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014155# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014156as_fn_error ()
14157{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014158 as_status=$1; test $as_status -eq 0 && as_status=1
14159 if test "$4"; then
14160 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14161 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014163 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 as_fn_exit $as_status
14165} # as_fn_error
14166
14167
14168# as_fn_set_status STATUS
14169# -----------------------
14170# Set $? to STATUS, without forking.
14171as_fn_set_status ()
14172{
14173 return $1
14174} # as_fn_set_status
14175
14176# as_fn_exit STATUS
14177# -----------------
14178# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14179as_fn_exit ()
14180{
14181 set +e
14182 as_fn_set_status $1
14183 exit $1
14184} # as_fn_exit
14185
14186# as_fn_unset VAR
14187# ---------------
14188# Portably unset VAR.
14189as_fn_unset ()
14190{
14191 { eval $1=; unset $1;}
14192}
14193as_unset=as_fn_unset
14194# as_fn_append VAR VALUE
14195# ----------------------
14196# Append the text in VALUE to the end of the definition contained in VAR. Take
14197# advantage of any shell optimizations that allow amortized linear growth over
14198# repeated appends, instead of the typical quadratic growth present in naive
14199# implementations.
14200if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14201 eval 'as_fn_append ()
14202 {
14203 eval $1+=\$2
14204 }'
14205else
14206 as_fn_append ()
14207 {
14208 eval $1=\$$1\$2
14209 }
14210fi # as_fn_append
14211
14212# as_fn_arith ARG...
14213# ------------------
14214# Perform arithmetic evaluation on the ARGs, and store the result in the
14215# global $as_val. Take advantage of shells that can avoid forks. The arguments
14216# must be portable across $(()) and expr.
14217if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14218 eval 'as_fn_arith ()
14219 {
14220 as_val=$(( $* ))
14221 }'
14222else
14223 as_fn_arith ()
14224 {
14225 as_val=`expr "$@" || test $? -eq 1`
14226 }
14227fi # as_fn_arith
14228
14229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230if expr a : '\(a\)' >/dev/null 2>&1 &&
14231 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14232 as_expr=expr
14233else
14234 as_expr=false
14235fi
14236
14237if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14238 as_basename=basename
14239else
14240 as_basename=false
14241fi
14242
Matthias Kloseb9621712010-04-24 17:59:49 +000014243if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14244 as_dirname=dirname
14245else
14246 as_dirname=false
14247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249as_me=`$as_basename -- "$0" ||
14250$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14251 X"$0" : 'X\(//\)$' \| \
14252 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014253$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014254 sed '/^.*\/\([^/][^/]*\)\/*$/{
14255 s//\1/
14256 q
14257 }
14258 /^X\/\(\/\/\)$/{
14259 s//\1/
14260 q
14261 }
14262 /^X\/\(\/\).*/{
14263 s//\1/
14264 q
14265 }
14266 s/.*/./; q'`
14267
Matthias Kloseb9621712010-04-24 17:59:49 +000014268# Avoid depending upon Character Ranges.
14269as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14270as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14271as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14272as_cr_digits='0123456789'
14273as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274
14275ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014276case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014280 xy) ECHO_C='\c';;
14281 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14282 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283 esac;;
14284*)
14285 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014286esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014287
Martin v. Löwis11437992002-04-12 09:54:03 +000014288rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289if test -d conf$$.dir; then
14290 rm -f conf$$.dir/conf$$.file
14291else
14292 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014295if (echo >conf$$.file) 2>/dev/null; then
14296 if ln -s conf$$.file conf$$ 2>/dev/null; then
14297 as_ln_s='ln -s'
14298 # ... but there are two gotchas:
14299 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14300 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14301 # In both cases, we have to default to `cp -p'.
14302 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14303 as_ln_s='cp -p'
14304 elif ln conf$$.file conf$$ 2>/dev/null; then
14305 as_ln_s=ln
14306 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014309else
14310 as_ln_s='cp -p'
14311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14313rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315
14316# as_fn_mkdir_p
14317# -------------
14318# Create "$as_dir" as a directory, including parents if necessary.
14319as_fn_mkdir_p ()
14320{
14321
14322 case $as_dir in #(
14323 -*) as_dir=./$as_dir;;
14324 esac
14325 test -d "$as_dir" || eval $as_mkdir_p || {
14326 as_dirs=
14327 while :; do
14328 case $as_dir in #(
14329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14330 *) as_qdir=$as_dir;;
14331 esac
14332 as_dirs="'$as_qdir' $as_dirs"
14333 as_dir=`$as_dirname -- "$as_dir" ||
14334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14335 X"$as_dir" : 'X\(//\)[^/]' \| \
14336 X"$as_dir" : 'X\(//\)$' \| \
14337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14338$as_echo X"$as_dir" |
14339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14340 s//\1/
14341 q
14342 }
14343 /^X\(\/\/\)[^/].*/{
14344 s//\1/
14345 q
14346 }
14347 /^X\(\/\/\)$/{
14348 s//\1/
14349 q
14350 }
14351 /^X\(\/\).*/{
14352 s//\1/
14353 q
14354 }
14355 s/.*/./; q'`
14356 test -d "$as_dir" && break
14357 done
14358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014360
14361
14362} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014363if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014365else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014366 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014367 as_mkdir_p=false
14368fi
14369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370if test -x / >/dev/null 2>&1; then
14371 as_test_x='test -x'
14372else
14373 if ls -dL / >/dev/null 2>&1; then
14374 as_ls_L_option=L
14375 else
14376 as_ls_L_option=
14377 fi
14378 as_test_x='
14379 eval sh -c '\''
14380 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 case $1 in #(
14384 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014385 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014387 ???[sx]*):;;*)false;;esac;fi
14388 '\'' sh
14389 '
14390fi
14391as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
14393# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014394as_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 +000014395
14396# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014397as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014398
14399
Martin v. Löwis11437992002-04-12 09:54:03 +000014400exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014401## ----------------------------------- ##
14402## Main body of $CONFIG_STATUS script. ##
14403## ----------------------------------- ##
14404_ASEOF
14405test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
Matthias Kloseb9621712010-04-24 17:59:49 +000014407cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14408# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014409# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014410# values after options handling.
14411ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014412This file was extended by python $as_me 3.3, which was
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014413generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014414
14415 CONFIG_FILES = $CONFIG_FILES
14416 CONFIG_HEADERS = $CONFIG_HEADERS
14417 CONFIG_LINKS = $CONFIG_LINKS
14418 CONFIG_COMMANDS = $CONFIG_COMMANDS
14419 $ $0 $@
14420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421on `(hostname || uname -n) 2>/dev/null | sed 1q`
14422"
14423
Martin v. Löwis11437992002-04-12 09:54:03 +000014424_ACEOF
14425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426case $ac_config_files in *"
14427"*) set x $ac_config_files; shift; ac_config_files=$*;;
14428esac
14429
14430case $ac_config_headers in *"
14431"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14432esac
14433
14434
14435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014436# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014437config_files="$ac_config_files"
14438config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014443ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014444\`$as_me' instantiates files and other configuration actions
14445from templates according to the current configuration. Unless the files
14446and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
14450 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 --config print configuration, then exit
14453 -q, --quiet, --silent
14454 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 -d, --debug don't remove temporary files
14456 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 --file=FILE[:TEMPLATE]
14458 instantiate the configuration file FILE
14459 --header=FILE[:TEMPLATE]
14460 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
14462Configuration files:
14463$config_files
14464
14465Configuration headers:
14466$config_headers
14467
Matthias Kloseb9621712010-04-24 17:59:49 +000014468Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014471cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14472ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014473ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014474python config.status 3.3
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014475configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014478Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014479This config.status script is free software; the Free Software Foundation
14480gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481
14482ac_pwd='$ac_pwd'
14483srcdir='$srcdir'
14484INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014485test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014486_ACEOF
14487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14489# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014490ac_need_defaults=:
14491while test $# != 0
14492do
14493 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014494 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14496 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014497 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014499 --*=)
14500 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14501 ac_optarg=
14502 ac_shift=:
14503 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014505 ac_option=$1
14506 ac_optarg=$2
14507 ac_shift=shift
14508 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 esac
14510
Skip Montanaro6dead952003-09-25 14:50:04 +000014511 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014513 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14514 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 $as_echo "$ac_cs_version"; exit ;;
14517 --config | --confi | --conf | --con | --co | --c )
14518 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 debug=: ;;
14521 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014522 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 case $ac_optarg in
14524 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014525 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 esac
14527 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 ac_need_defaults=false;;
14529 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014530 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 case $ac_optarg in
14532 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14533 esac
14534 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014535 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536 --he | --h)
14537 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014538 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014539Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014541 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014542 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14543 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14544 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
14546 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014547 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014548Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014551 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014552
14553 esac
14554 shift
14555done
14556
Skip Montanaro6dead952003-09-25 14:50:04 +000014557ac_configure_extra_args=
14558
14559if $ac_cs_silent; then
14560 exec 6>/dev/null
14561 ac_configure_extra_args="$ac_configure_extra_args --silent"
14562fi
14563
14564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014565cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014566if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14568 shift
14569 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14570 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014573fi
14574
Martin v. Löwis11437992002-04-12 09:54:03 +000014575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014576cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577exec 5>>config.log
14578{
14579 echo
14580 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14581## Running $as_me. ##
14582_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014587cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014589
Matthias Kloseb9621712010-04-24 17:59:49 +000014590cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591
14592# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014593for ac_config_target in $ac_config_targets
14594do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595 case $ac_config_target in
14596 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14597 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14598 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014599 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14600 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014601 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14602 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014603 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014604 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014606 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 esac
14608done
14609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610
Martin v. Löwis11437992002-04-12 09:54:03 +000014611# If the user did not use the arguments to specify the items to instantiate,
14612# then the envvar interface is used. Set only those that are not.
14613# We use the long form for the default assignment because of an extremely
14614# bizarre bug on SunOS 4.1.3.
14615if $ac_need_defaults; then
14616 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14617 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14618fi
14619
Skip Montanaro6dead952003-09-25 14:50:04 +000014620# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014622# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623# Hook for its removal unless debugging.
14624# Note that there is a small window in which the directory will not be cleaned:
14625# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014626$debug ||
14627{
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014628 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 trap 'exit_status=$?
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014630 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014633}
Martin v. Löwis11437992002-04-12 09:54:03 +000014634# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014635
Martin v. Löwis11437992002-04-12 09:54:03 +000014636{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014638 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014639} ||
14640{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641 tmp=./conf$$-$RANDOM
14642 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014643} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014644
Matthias Kloseb9621712010-04-24 17:59:49 +000014645# Set up the scripts for CONFIG_FILES section.
14646# No need to generate them if there are no CONFIG_FILES.
14647# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
Matthias Kloseb9621712010-04-24 17:59:49 +000014650
14651ac_cr=`echo X | tr X '\015'`
14652# On cygwin, bash can eat \r inside `` if the user requested igncr.
14653# But we know of no other shell where ac_cr would be empty at this
14654# point, so we can use a bashism as a fallback.
14655if test "x$ac_cr" = x; then
14656 eval ac_cr=\$\'\\r\'
14657fi
14658ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14659if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014660 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014661else
14662 ac_cs_awk_cr=$ac_cr
14663fi
14664
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014665echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014666_ACEOF
14667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669{
14670 echo "cat >conf$$subs.awk <<_ACEOF" &&
14671 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14672 echo "_ACEOF"
14673} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014674 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14675ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676ac_delim='%!_!# '
14677for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014678 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014679 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14682 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683 break
14684 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014685 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686 else
14687 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014688 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689done
Matthias Kloseb9621712010-04-24 17:59:49 +000014690rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691
Matthias Kloseb9621712010-04-24 17:59:49 +000014692cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014693cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014695sed -n '
14696h
14697s/^/S["/; s/!.*/"]=/
14698p
14699g
14700s/^[^!]*!//
14701:repl
14702t repl
14703s/'"$ac_delim"'$//
14704t delim
14705:nl
14706h
14707s/\(.\{148\}\)..*/\1/
14708t more1
14709s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14710p
14711n
14712b repl
14713:more1
14714s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14715p
14716g
14717s/.\{148\}//
14718t nl
14719:delim
14720h
14721s/\(.\{148\}\)..*/\1/
14722t more2
14723s/["\\]/\\&/g; s/^/"/; s/$/"/
14724p
14725b
14726:more2
14727s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14728p
14729g
14730s/.\{148\}//
14731t delim
14732' <conf$$subs.awk | sed '
14733/^[^""]/{
14734 N
14735 s/\n//
14736}
14737' >>$CONFIG_STATUS || ac_write_fail=1
14738rm -f conf$$subs.awk
14739cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14740_ACAWK
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014741cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 for (key in S) S_is_set[key] = 1
14743 FS = ""
14744
14745}
14746{
14747 line = $ 0
14748 nfields = split(line, field, "@")
14749 substed = 0
14750 len = length(field[1])
14751 for (i = 2; i < nfields; i++) {
14752 key = field[i]
14753 keylen = length(key)
14754 if (S_is_set[key]) {
14755 value = S[key]
14756 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14757 len += length(value) + length(field[++i])
14758 substed = 1
14759 } else
14760 len += 1 + keylen
14761 }
14762
14763 print line
14764}
14765
14766_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014768cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14769if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14770 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14771else
14772 cat
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014773fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014774 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014775_ACEOF
14776
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014777# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14778# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779# trailing colons and then remove the whole line if VPATH becomes empty
14780# (actually we leave an empty line to preserve line numbers).
14781if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014782 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14783h
14784s///
14785s/^/:/
14786s/[ ]*$/:/
14787s/:\$(srcdir):/:/g
14788s/:\${srcdir}:/:/g
14789s/:@srcdir@:/:/g
14790s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014792x
14793s/\(=[ ]*\).*/\1/
14794G
14795s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796s/^[^=]*=[ ]*$//
14797}'
14798fi
14799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014801fi # test -n "$CONFIG_FILES"
14802
Matthias Kloseb9621712010-04-24 17:59:49 +000014803# Set up the scripts for CONFIG_HEADERS section.
14804# No need to generate them if there are no CONFIG_HEADERS.
14805# This happens for instance with `./config.status Makefile'.
14806if test -n "$CONFIG_HEADERS"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014807cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014808BEGIN {
14809_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811# Transform confdefs.h into an awk script `defines.awk', embedded as
14812# here-document in config.status, that substitutes the proper values into
14813# config.h.in to produce config.h.
14814
14815# Create a delimiter string that does not exist in confdefs.h, to ease
14816# handling of long lines.
14817ac_delim='%!_!# '
14818for ac_last_try in false false :; do
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014819 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14820 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 break
14822 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014823 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 else
14825 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14826 fi
14827done
14828
14829# For the awk script, D is an array of macro values keyed by name,
14830# likewise P contains macro parameters if any. Preserve backslash
14831# newline sequences.
14832
14833ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14834sed -n '
14835s/.\{148\}/&'"$ac_delim"'/g
14836t rset
14837:rset
14838s/^[ ]*#[ ]*define[ ][ ]*/ /
14839t def
14840d
14841:def
14842s/\\$//
14843t bsnl
14844s/["\\]/\\&/g
14845s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14846D["\1"]=" \3"/p
14847s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14848d
14849:bsnl
14850s/["\\]/\\&/g
14851s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14852D["\1"]=" \3\\\\\\n"\\/p
14853t cont
14854s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14855t cont
14856d
14857:cont
14858n
14859s/.\{148\}/&'"$ac_delim"'/g
14860t clear
14861:clear
14862s/\\$//
14863t bsnlc
14864s/["\\]/\\&/g; s/^/"/; s/$/"/p
14865d
14866:bsnlc
14867s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14868b cont
14869' <confdefs.h | sed '
14870s/'"$ac_delim"'/"\\\
14871"/g' >>$CONFIG_STATUS || ac_write_fail=1
14872
14873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14874 for (key in D) D_is_set[key] = 1
14875 FS = ""
14876}
14877/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14878 line = \$ 0
14879 split(line, arg, " ")
14880 if (arg[1] == "#") {
14881 defundef = arg[2]
14882 mac1 = arg[3]
14883 } else {
14884 defundef = substr(arg[1], 2)
14885 mac1 = arg[2]
14886 }
14887 split(mac1, mac2, "(") #)
14888 macro = mac2[1]
14889 prefix = substr(line, 1, index(line, defundef) - 1)
14890 if (D_is_set[macro]) {
14891 # Preserve the white space surrounding the "#".
14892 print prefix "define", macro P[macro] D[macro]
14893 next
14894 } else {
14895 # Replace #undef with comments. This is necessary, for example,
14896 # in the case of _POSIX_SOURCE, which is predefined and required
14897 # on some systems where configure will not decide to define it.
14898 if (defundef == "undef") {
14899 print "/*", prefix defundef, macro, "*/"
14900 next
14901 }
14902 }
14903}
14904{ print }
14905_ACAWK
14906_ACEOF
14907cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014908 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014909fi # test -n "$CONFIG_HEADERS"
14910
14911
14912eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14913shift
14914for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915do
14916 case $ac_tag in
14917 :[FHLC]) ac_mode=$ac_tag; continue;;
14918 esac
14919 case $ac_mode$ac_tag in
14920 :[FHL]*:*);;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014921 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922 :[FH]-) ac_tag=-:-;;
14923 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14924 esac
14925 ac_save_IFS=$IFS
14926 IFS=:
14927 set x $ac_tag
14928 IFS=$ac_save_IFS
14929 shift
14930 ac_file=$1
14931 shift
14932
14933 case $ac_mode in
14934 :L) ac_source=$1;;
14935 :[FH])
14936 ac_file_inputs=
14937 for ac_f
14938 do
14939 case $ac_f in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014940 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 *) # Look for the file first in the build tree, then in the source tree
14942 # (if the path is not absolute). The absolute path cannot be DOS-style,
14943 # because $ac_f cannot contain `:'.
14944 test -f "$ac_f" ||
14945 case $ac_f in
14946 [\\/$]*) false;;
14947 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14948 esac ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014949 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14952 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953 done
14954
14955 # Let's still pretend it is `configure' which instantiates (i.e., don't
14956 # use $as_me), people would be surprised to read:
14957 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 configure_input='Generated from '`
14959 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14960 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961 if test x"$ac_file" != x-; then
14962 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14964$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 # Neutralize special characters interpreted by sed in replacement strings.
14967 case $configure_input in #(
14968 *\&* | *\|* | *\\* )
14969 ac_sed_conf_input=`$as_echo "$configure_input" |
14970 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14971 *) ac_sed_conf_input=$configure_input;;
14972 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973
14974 case $ac_tag in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014975 *:-:* | *:-) cat >"$tmp/stdin" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014976 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977 esac
14978 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 esac
14980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014982$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014983 X"$ac_file" : 'X\(//\)[^/]' \| \
14984 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014986$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14988 s//\1/
14989 q
14990 }
14991 /^X\(\/\/\)[^/].*/{
14992 s//\1/
14993 q
14994 }
14995 /^X\(\/\/\)$/{
14996 s//\1/
14997 q
14998 }
14999 /^X\(\/\).*/{
15000 s//\1/
15001 q
15002 }
15003 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 ac_builddir=.
15006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007case "$ac_dir" in
15008.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15009*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013 case $ac_top_builddir_sub in
15014 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15015 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15016 esac ;;
15017esac
15018ac_abs_top_builddir=$ac_pwd
15019ac_abs_builddir=$ac_pwd$ac_dir_suffix
15020# for backward compatibility:
15021ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015022
15023case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026 ac_top_srcdir=$ac_top_builddir_sub
15027 ac_abs_top_srcdir=$ac_pwd ;;
15028 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 ac_top_srcdir=$srcdir
15031 ac_abs_top_srcdir=$srcdir ;;
15032 *) # Relative name.
15033 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15034 ac_top_srcdir=$ac_top_build_prefix$srcdir
15035 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015036esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015038
Martin v. Löwis11437992002-04-12 09:54:03 +000015039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040 case $ac_mode in
15041 :F)
15042 #
15043 # CONFIG_FILE
15044 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015045
15046 case $INSTALL in
15047 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015050_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053# If the template does not know about datarootdir, expand it.
15054# FIXME: This hack should be removed a few years after 2.60.
15055ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015056ac_sed_dataroot='
15057/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058 p
15059 q
15060}
15061/@datadir@/p
15062/@docdir@/p
15063/@infodir@/p
15064/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015065/@mandir@/p'
15066case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067*datarootdir*) ac_datarootdir_seen=yes;;
15068*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15070$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015072cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073 ac_datarootdir_hack='
15074 s&@datadir@&$datadir&g
15075 s&@docdir@&$docdir&g
15076 s&@infodir@&$infodir&g
15077 s&@localedir@&$localedir&g
15078 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080esac
15081_ACEOF
15082
15083# Neutralize VPATH when `$srcdir' = `.'.
15084# Shell code in configure.ac might set extrasub.
15085# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015086cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15087ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015088$extrasub
15089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015090cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015091:t
15092/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015093s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015095s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096s&@srcdir@&$ac_srcdir&;t t
15097s&@abs_srcdir@&$ac_abs_srcdir&;t t
15098s&@top_srcdir@&$ac_top_srcdir&;t t
15099s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15100s&@builddir@&$ac_builddir&;t t
15101s&@abs_builddir@&$ac_abs_builddir&;t t
15102s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15103s&@INSTALL@&$ac_INSTALL&;t t
15104$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015105"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015106eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015107 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015110 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15111 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015113which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015114$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015115which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015116
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015117 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 case $ac_file in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015119 -) cat "$tmp/out" && rm -f "$tmp/out";;
15120 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015122 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123 ;;
15124 :H)
15125 #
15126 # CONFIG_HEADER
15127 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 {
15130 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015131 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15132 } >"$tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015133 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015134 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015135 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15136$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015138 rm -f "$ac_file"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015139 mv "$tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015140 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 fi
15142 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015144 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015145 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149
15150 esac
15151
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015152
15153 case $ac_file$ac_mode in
15154 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15155
15156 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157done # for ac_tag
15158
Guido van Rossum627b2d71993-12-24 10:39:16 +000015159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015161_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015162ac_clean_files=$ac_clean_files_save
15163
Matthias Kloseb9621712010-04-24 17:59:49 +000015164test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015165 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015166
Martin v. Löwis11437992002-04-12 09:54:03 +000015167
15168# configure is writing to config.log, and then calls config.status.
15169# config.status does its own redirection, appending to config.log.
15170# Unfortunately, on DOS this fails, as config.log is still kept open
15171# by configure, so config.status won't be able to write to it; its
15172# output is simply discarded. So we exec the FD to /dev/null,
15173# effectively closing config.log, so it can be properly (re)opened and
15174# appended to by config.status. When coming back to configure, we
15175# need to make the FD available again.
15176if test "$no_create" != yes; then
15177 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015178 ac_config_status_args=
15179 test "$silent" = yes &&
15180 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015182 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 exec 5>>config.log
15184 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15185 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015186 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015187fi
15188if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15190$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015191fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015192
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015193
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015194echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015195if test ! -f Modules/Setup
15196then
15197 cp $srcdir/Modules/Setup.dist Modules/Setup
15198fi
15199
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015200echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015201if test ! -f Modules/Setup.local
15202then
15203 echo "# Edit this file for local setup changes" >Modules/Setup.local
15204fi
15205
15206echo "creating Makefile"
15207$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15208 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015209 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015210mv config.c Modules