blob: ab12eb56c8db77f103f4caf1a304a7234f4eda00 [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.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003# Generated by GNU Autoconf 2.65 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,
Benjamin Peterson87cdb812011-05-31 18:26:08 -05009# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
10# 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"
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500322 } || 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
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500362# as_fn_error 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
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500366# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000367as_fn_error ()
368{
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500369 as_status=$?; test $as_status -eq 0 && as_status=1
370 if test "$3"; then
371 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +0000373 fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500374 $as_echo "$as_me: error: $1" >&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.
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500536# hostname on some systems (SVR3.2, 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
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500836 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
837 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840 # Accept the important Cygnus configure options, so we can diagnose typos.
841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 case $ac_dashdash$ac_option in
843 --)
844 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846 -bindir | --bindir | --bindi | --bind | --bin | --bi)
847 ac_prev=bindir ;;
848 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850
851 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856 -cache-file | --cache-file | --cache-fil | --cache-fi \
857 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
858 ac_prev=cache_file ;;
859 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
860 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 cache_file=$ac_optarg ;;
862
863 --config-cache | -C)
864 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
872 | --dataroo | --dataro | --datar)
873 ac_prev=datarootdir ;;
874 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
875 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
876 datarootdir=$ac_optarg ;;
877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000879 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000881 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500882 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000883 ac_useropt_orig=$ac_useropt
884 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
885 case $ac_user_opts in
886 *"
887"enable_$ac_useropt"
888"*) ;;
889 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
890 ac_unrecognized_sep=', ';;
891 esac
892 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893
894 -docdir | --docdir | --docdi | --doc | --do)
895 ac_prev=docdir ;;
896 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
897 docdir=$ac_optarg ;;
898
899 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
900 ac_prev=dvidir ;;
901 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
902 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
904 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000907 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500908 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000909 ac_useropt_orig=$ac_useropt
910 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
911 case $ac_user_opts in
912 *"
913"enable_$ac_useropt"
914"*) ;;
915 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
916 ac_unrecognized_sep=', ';;
917 esac
918 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
921 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
922 | --exec | --exe | --ex)
923 ac_prev=exec_prefix ;;
924 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
925 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
926 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
929 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Obsolete; use --with-gas.
931 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 -help | --help | --hel | --he | -h)
934 ac_init_help=long ;;
935 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
936 ac_init_help=recursive ;;
937 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
938 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
940 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
946 ac_prev=htmldir ;;
947 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
948 | --ht=*)
949 htmldir=$ac_optarg ;;
950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 -includedir | --includedir | --includedi | --included | --include \
952 | --includ | --inclu | --incl | --inc)
953 ac_prev=includedir ;;
954 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
955 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -infodir | --infodir | --infodi | --infod | --info | --inf)
959 ac_prev=infodir ;;
960 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libdir | --libdir | --libdi | --libd)
964 ac_prev=libdir ;;
965 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
969 | --libexe | --libex | --libe)
970 ac_prev=libexecdir ;;
971 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
972 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 -localedir | --localedir | --localedi | --localed | --locale)
976 ac_prev=localedir ;;
977 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
978 localedir=$ac_optarg ;;
979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982 ac_prev=localstatedir ;;
983 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
988 ac_prev=mandir ;;
989 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Obsolete; use --without-fp.
994 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 no_create=yes ;;
999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1002 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1005 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1006 | --oldin | --oldi | --old | --ol | --o)
1007 ac_prev=oldincludedir ;;
1008 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1009 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1010 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1014 ac_prev=prefix ;;
1015 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1019 | --program-pre | --program-pr | --program-p)
1020 ac_prev=program_prefix ;;
1021 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1022 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1026 | --program-suf | --program-su | --program-s)
1027 ac_prev=program_suffix ;;
1028 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1029 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -program-transform-name | --program-transform-name \
1033 | --program-transform-nam | --program-transform-na \
1034 | --program-transform-n | --program-transform- \
1035 | --program-transform | --program-transfor \
1036 | --program-transfo | --program-transf \
1037 | --program-trans | --program-tran \
1038 | --progr-tra | --program-tr | --program-t)
1039 ac_prev=program_transform_name ;;
1040 -program-transform-name=* | --program-transform-name=* \
1041 | --program-transform-nam=* | --program-transform-na=* \
1042 | --program-transform-n=* | --program-transform-=* \
1043 | --program-transform=* | --program-transfor=* \
1044 | --program-transfo=* | --program-transf=* \
1045 | --program-trans=* | --program-tran=* \
1046 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1050 ac_prev=pdfdir ;;
1051 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1052 pdfdir=$ac_optarg ;;
1053
1054 -psdir | --psdir | --psdi | --psd | --ps)
1055 ac_prev=psdir ;;
1056 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1057 psdir=$ac_optarg ;;
1058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1060 | -silent | --silent | --silen | --sile | --sil)
1061 silent=yes ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1064 ac_prev=sbindir ;;
1065 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1066 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1070 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1071 | --sharedst | --shareds | --shared | --share | --shar \
1072 | --sha | --sh)
1073 ac_prev=sharedstatedir ;;
1074 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1075 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1076 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1077 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 -site | --site | --sit)
1081 ac_prev=site ;;
1082 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1086 ac_prev=srcdir ;;
1087 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1091 | --syscon | --sysco | --sysc | --sys | --sy)
1092 ac_prev=sysconfdir ;;
1093 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1094 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1103 verbose=yes ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 -version | --version | --versio | --versi | --vers | -V)
1106 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001109 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001111 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001112 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001113 ac_useropt_orig=$ac_useropt
1114 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115 case $ac_user_opts in
1116 *"
1117"with_$ac_useropt"
1118"*) ;;
1119 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1120 ac_unrecognized_sep=', ';;
1121 esac
1122 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
1124 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001126 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001127 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001128 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001129 ac_useropt_orig=$ac_useropt
1130 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131 case $ac_user_opts in
1132 *"
1133"with_$ac_useropt"
1134"*) ;;
1135 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1136 ac_unrecognized_sep=', ';;
1137 esac
1138 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 --x)
1141 # Obsolete; use --with-x.
1142 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1145 | --x-incl | --x-inc | --x-in | --x-i)
1146 ac_prev=x_includes ;;
1147 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1148 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1152 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1153 ac_prev=x_libraries ;;
1154 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1155 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001158 -*) as_fn_error "unrecognized option: \`$ac_option'
1159Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 ;;
1161
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 *=*)
1163 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1164 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 case $ac_envvar in #(
1166 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001167 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001169 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 export $ac_envvar ;;
1171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001177 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 ;;
1179
1180 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181done
1182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001185 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186fi
1187
Matthias Kloseb9621712010-04-24 17:59:49 +00001188if test -n "$ac_unrecognized_opts"; then
1189 case $enable_option_checking in
1190 no) ;;
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001191 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1193 esac
1194fi
1195
1196# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001197for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1198 datadir sysconfdir sharedstatedir localstatedir includedir \
1199 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1200 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 # Remove trailing slashes.
1204 case $ac_val in
1205 */ )
1206 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1207 eval $ac_var=\$ac_val;;
1208 esac
1209 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 [\\/$]* | ?:[\\/]* ) continue;;
1212 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213 esac
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001214 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001215done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217# There might be people who depend on the old broken behavior: `$host'
1218# used to hold the argument of --host etc.
1219# FIXME: To remove some day.
1220build=$build_alias
1221host=$host_alias
1222target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224# FIXME: To remove some day.
1225if test "x$host_alias" != x; then
1226 if test "x$build_alias" = x; then
1227 cross_compiling=maybe
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001228 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1229 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 elif test "x$build_alias" != "x$host_alias"; then
1231 cross_compiling=yes
1232 fi
1233fi
1234
1235ac_tool_prefix=
1236test -n "$host_alias" && ac_tool_prefix=$host_alias-
1237
1238test "$silent" = yes && exec 6>/dev/null
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241ac_pwd=`pwd` && test -n "$ac_pwd" &&
1242ac_ls_di=`ls -di .` &&
1243ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001244 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001246 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249# Find the source files, if location was not specified.
1250if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 ac_confdir=`$as_dirname -- "$as_myself" ||
1254$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1255 X"$as_myself" : 'X\(//\)[^/]' \| \
1256 X"$as_myself" : 'X\(//\)$' \| \
1257 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1258$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)[^/].*/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\).*/{
1272 s//\1/
1273 q
1274 }
1275 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278 srcdir=..
1279 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280else
1281 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283if test ! -r "$srcdir/$ac_unique_file"; then
1284 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001285 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1288ac_abs_confdir=`(
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001289 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 pwd)`
1291# When building in place, set srcdir=.
1292if test "$ac_abs_confdir" = "$ac_pwd"; then
1293 srcdir=.
1294fi
1295# Remove unnecessary trailing slashes from srcdir.
1296# Double slashes in file names in object file debugging info
1297# mess up M-x gdb in Emacs.
1298case $srcdir in
1299*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1300esac
1301for ac_var in $ac_precious_vars; do
1302 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1303 eval ac_env_${ac_var}_value=\$${ac_var}
1304 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1305 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1306done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308#
1309# Report the --help message.
1310#
1311if test "$ac_init_help" = "long"; then
1312 # Omit some internal or obsolete options to make the list less imposing.
1313 # This message is too long to be a string in the A/UX 3.1 sh.
1314 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001315\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001316
1317Usage: $0 [OPTION]... [VAR=VALUE]...
1318
1319To assign environment variables (e.g., CC, CFLAGS...), specify them as
1320VAR=VALUE. See below for descriptions of some of the useful variables.
1321
1322Defaults for the options are specified in brackets.
1323
1324Configuration:
1325 -h, --help display this help and exit
1326 --help=short display options specific to this package
1327 --help=recursive display the short help of all the included packages
1328 -V, --version display version information and exit
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001329 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --cache-file=FILE cache test results in FILE [disabled]
1331 -C, --config-cache alias for \`--cache-file=config.cache'
1332 -n, --no-create do not create output files
1333 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1334
Martin v. Löwis11437992002-04-12 09:54:03 +00001335Installation directories:
1336 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341By default, \`make install' will install all the files in
1342\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1343an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1344for instance \`--prefix=\$HOME'.
1345
1346For better control, use the options below.
1347
1348Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 --bindir=DIR user executables [EPREFIX/bin]
1350 --sbindir=DIR system admin executables [EPREFIX/sbin]
1351 --libexecdir=DIR program executables [EPREFIX/libexec]
1352 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1353 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1354 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1355 --libdir=DIR object code libraries [EPREFIX/lib]
1356 --includedir=DIR C header files [PREFIX/include]
1357 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1358 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1359 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1360 --infodir=DIR info documentation [DATAROOTDIR/info]
1361 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1362 --mandir=DIR man documentation [DATAROOTDIR/man]
1363 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1364 --htmldir=DIR html documentation [DOCDIR]
1365 --dvidir=DIR dvi documentation [DOCDIR]
1366 --pdfdir=DIR pdf documentation [DOCDIR]
1367 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001368_ACEOF
1369
1370 cat <<\_ACEOF
1371_ACEOF
1372fi
1373
1374if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001375 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001376 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001377 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 cat <<\_ACEOF
1379
1380Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001381 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1383 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001384 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001385 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001386 --enable-framework[=INSTALLDIR]
1387 Build (MacOSX|Darwin) framework
1388 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001389 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001390 --enable-loadable-sqlite-extensions
1391 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001392 --enable-ipv6 Enable ipv6 (with ipv4) support
1393 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001394 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397Optional Packages:
1398 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1399 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001400 --with-universal-archs=ARCH
1401 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001402 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001403 --with-framework-name=FRAMEWORK
1404 specify an alternate name of the framework built
1405 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001407 --with-cxx-main=<compiler>
1408 compile main() and link python executable with C++
1409 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --with-suffix=.exe set executable suffix
1411 --with-pydebug build with Py_DEBUG defined
1412 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001413 --with-system-expat build pyexpat module using an installed expat
1414 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001415 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001416 --with-dbmliborder=db1:db2:...
1417 order to check db backends for dbm. Valid value is a
1418 colon separated string with the backend names
1419 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with(out)-threads[=DIRECTORY]
1422 disable/enable thread support
1423 --with(out)-thread[=DIRECTORY]
1424 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001426 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001427 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001428 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-fpectl enable SIGFPE catching
1430 --with-libm=STRING math library
1431 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001432 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001433 --with(out)-computed-gotos
1434 Use computed gotos in evaluation loop (enabled by
1435 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437Some influential environment variables:
1438 CC C compiler command
1439 CFLAGS C compiler flags
1440 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1441 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001442 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 CPP C preprocessor
1446
1447Use these variables to override the choices made by `configure' or to help
1448it to find libraries and programs with nonstandard names/locations.
1449
Georg Brandle2e15612009-05-20 18:25:10 +00001450Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
1454
1455if test "$ac_init_help" = "recursive"; then
1456 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 test -d "$ac_dir" ||
1459 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1460 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 ac_builddir=.
1462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463case "$ac_dir" in
1464.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1465*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469 case $ac_top_builddir_sub in
1470 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1471 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1472 esac ;;
1473esac
1474ac_abs_top_builddir=$ac_pwd
1475ac_abs_builddir=$ac_pwd$ac_dir_suffix
1476# for backward compatibility:
1477ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001478
1479case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482 ac_top_srcdir=$ac_top_builddir_sub
1483 ac_abs_top_srcdir=$ac_pwd ;;
1484 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486 ac_top_srcdir=$srcdir
1487 ac_abs_top_srcdir=$srcdir ;;
1488 *) # Relative name.
1489 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1490 ac_top_srcdir=$ac_top_build_prefix$srcdir
1491 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001492esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 cd "$ac_dir" || { ac_status=$?; continue; }
1496 # Check for guested configure.
1497 if test -f "$ac_srcdir/configure.gnu"; then
1498 echo &&
1499 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1500 elif test -f "$ac_srcdir/configure"; then
1501 echo &&
1502 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001503 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001504 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505 fi || ac_status=$?
1506 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 done
1508fi
1509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001511if $ac_init_version; then
1512 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001513python configure 3.3
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001514generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001516Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517This configure script is free software; the Free Software Foundation
1518gives unlimited permission to copy, distribute and modify it.
1519_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001522
1523## ------------------------ ##
1524## Autoconf initialization. ##
1525## ------------------------ ##
1526
1527# ac_fn_c_try_compile LINENO
1528# --------------------------
1529# Try to compile conftest.$ac_ext, and return whether this succeeded.
1530ac_fn_c_try_compile ()
1531{
1532 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1533 rm -f conftest.$ac_objext
1534 if { { ac_try="$ac_compile"
1535case "(($ac_try" in
1536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1537 *) ac_try_echo=$ac_try;;
1538esac
1539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1540$as_echo "$ac_try_echo"; } >&5
1541 (eval "$ac_compile") 2>conftest.err
1542 ac_status=$?
1543 if test -s conftest.err; then
1544 grep -v '^ *+' conftest.err >conftest.er1
1545 cat conftest.er1 >&5
1546 mv -f conftest.er1 conftest.err
1547 fi
1548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1549 test $ac_status = 0; } && {
1550 test -z "$ac_c_werror_flag" ||
1551 test ! -s conftest.err
1552 } && test -s conftest.$ac_objext; then :
1553 ac_retval=0
1554else
1555 $as_echo "$as_me: failed program was:" >&5
1556sed 's/^/| /' conftest.$ac_ext >&5
1557
1558 ac_retval=1
1559fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001560 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 as_fn_set_status $ac_retval
1562
1563} # ac_fn_c_try_compile
1564
Matthias Kloseb9621712010-04-24 17:59:49 +00001565# ac_fn_c_try_link LINENO
1566# -----------------------
1567# Try to link conftest.$ac_ext, and return whether this succeeded.
1568ac_fn_c_try_link ()
1569{
1570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1571 rm -f conftest.$ac_objext conftest$ac_exeext
1572 if { { ac_try="$ac_link"
1573case "(($ac_try" in
1574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1575 *) ac_try_echo=$ac_try;;
1576esac
1577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1578$as_echo "$ac_try_echo"; } >&5
1579 (eval "$ac_link") 2>conftest.err
1580 ac_status=$?
1581 if test -s conftest.err; then
1582 grep -v '^ *+' conftest.err >conftest.er1
1583 cat conftest.er1 >&5
1584 mv -f conftest.er1 conftest.err
1585 fi
1586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1587 test $ac_status = 0; } && {
1588 test -z "$ac_c_werror_flag" ||
1589 test ! -s conftest.err
1590 } && test -s conftest$ac_exeext && {
1591 test "$cross_compiling" = yes ||
1592 $as_test_x conftest$ac_exeext
1593 }; then :
1594 ac_retval=0
1595else
1596 $as_echo "$as_me: failed program was:" >&5
1597sed 's/^/| /' conftest.$ac_ext >&5
1598
1599 ac_retval=1
1600fi
1601 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1602 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1603 # interfere with the next link command; also delete a directory that is
1604 # left behind by Apple's compiler. We do this before executing the actions.
1605 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001606 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001607 as_fn_set_status $ac_retval
1608
1609} # ac_fn_c_try_link
1610
Matthias Kloseb9621712010-04-24 17:59:49 +00001611# ac_fn_c_try_cpp LINENO
1612# ----------------------
1613# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1614ac_fn_c_try_cpp ()
1615{
1616 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1617 if { { ac_try="$ac_cpp conftest.$ac_ext"
1618case "(($ac_try" in
1619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1620 *) ac_try_echo=$ac_try;;
1621esac
1622eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1623$as_echo "$ac_try_echo"; } >&5
1624 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1625 ac_status=$?
1626 if test -s conftest.err; then
1627 grep -v '^ *+' conftest.err >conftest.er1
1628 cat conftest.er1 >&5
1629 mv -f conftest.er1 conftest.err
1630 fi
1631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001632 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1634 test ! -s conftest.err
1635 }; then :
1636 ac_retval=0
1637else
1638 $as_echo "$as_me: failed program was:" >&5
1639sed 's/^/| /' conftest.$ac_ext >&5
1640
1641 ac_retval=1
1642fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001643 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001644 as_fn_set_status $ac_retval
1645
1646} # ac_fn_c_try_cpp
1647
1648# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1649# -------------------------------------------------------
1650# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1651# the include files in INCLUDES and setting the cache variable VAR
1652# accordingly.
1653ac_fn_c_check_header_mongrel ()
1654{
1655 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001656 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1658$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001659if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 $as_echo_n "(cached) " >&6
1661fi
1662eval ac_res=\$$3
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1664$as_echo "$ac_res" >&6; }
1665else
1666 # Is the header compilable?
1667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1668$as_echo_n "checking $2 usability... " >&6; }
1669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1670/* end confdefs.h. */
1671$4
1672#include <$2>
1673_ACEOF
1674if ac_fn_c_try_compile "$LINENO"; then :
1675 ac_header_compiler=yes
1676else
1677 ac_header_compiler=no
1678fi
1679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1681$as_echo "$ac_header_compiler" >&6; }
1682
1683# Is the header present?
1684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1685$as_echo_n "checking $2 presence... " >&6; }
1686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1687/* end confdefs.h. */
1688#include <$2>
1689_ACEOF
1690if ac_fn_c_try_cpp "$LINENO"; then :
1691 ac_header_preproc=yes
1692else
1693 ac_header_preproc=no
1694fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001695rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1697$as_echo "$ac_header_preproc" >&6; }
1698
1699# So? What about this header?
1700case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1701 yes:no: )
1702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1703$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1704 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1705$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1706 ;;
1707 no:yes:* )
1708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1709$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1711$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1713$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1715$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1717$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001718( cat <<\_ASBOX
1719## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001720## Report this to http://bugs.python.org/ ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001721## -------------------------------------- ##
1722_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001723 ) | sed "s/^/$as_me: WARNING: /" >&2
1724 ;;
1725esac
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1727$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001728if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 $as_echo_n "(cached) " >&6
1730else
1731 eval "$3=\$ac_header_compiler"
1732fi
1733eval ac_res=\$$3
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1735$as_echo "$ac_res" >&6; }
1736fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001737 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001738
1739} # ac_fn_c_check_header_mongrel
1740
1741# ac_fn_c_try_run LINENO
1742# ----------------------
1743# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1744# that executables *can* be run.
1745ac_fn_c_try_run ()
1746{
1747 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748 if { { ac_try="$ac_link"
1749case "(($ac_try" in
1750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1751 *) ac_try_echo=$ac_try;;
1752esac
1753eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1754$as_echo "$ac_try_echo"; } >&5
1755 (eval "$ac_link") 2>&5
1756 ac_status=$?
1757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1759 { { case "(($ac_try" in
1760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1761 *) ac_try_echo=$ac_try;;
1762esac
1763eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1764$as_echo "$ac_try_echo"; } >&5
1765 (eval "$ac_try") 2>&5
1766 ac_status=$?
1767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1768 test $ac_status = 0; }; }; then :
1769 ac_retval=0
1770else
1771 $as_echo "$as_me: program exited with status $ac_status" >&5
1772 $as_echo "$as_me: failed program was:" >&5
1773sed 's/^/| /' conftest.$ac_ext >&5
1774
1775 ac_retval=$ac_status
1776fi
1777 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001778 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 as_fn_set_status $ac_retval
1780
1781} # ac_fn_c_try_run
1782
1783# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1784# -------------------------------------------------------
1785# Tests whether HEADER exists and can be compiled using the include files in
1786# INCLUDES, setting the cache variable VAR accordingly.
1787ac_fn_c_check_header_compile ()
1788{
1789 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1791$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001792if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001793 $as_echo_n "(cached) " >&6
1794else
1795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1796/* end confdefs.h. */
1797$4
1798#include <$2>
1799_ACEOF
1800if ac_fn_c_try_compile "$LINENO"; then :
1801 eval "$3=yes"
1802else
1803 eval "$3=no"
1804fi
1805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1806fi
1807eval ac_res=\$$3
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1809$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001810 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001811
1812} # ac_fn_c_check_header_compile
1813
Matthias Kloseb9621712010-04-24 17:59:49 +00001814# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1815# -------------------------------------------
1816# Tests whether TYPE exists after having included INCLUDES, setting cache
1817# variable VAR accordingly.
1818ac_fn_c_check_type ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1822$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001823if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001824 $as_echo_n "(cached) " >&6
1825else
1826 eval "$3=no"
1827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1828/* end confdefs.h. */
1829$4
1830int
1831main ()
1832{
1833if (sizeof ($2))
1834 return 0;
1835 ;
1836 return 0;
1837}
1838_ACEOF
1839if ac_fn_c_try_compile "$LINENO"; then :
1840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1841/* end confdefs.h. */
1842$4
1843int
1844main ()
1845{
1846if (sizeof (($2)))
1847 return 0;
1848 ;
1849 return 0;
1850}
1851_ACEOF
1852if ac_fn_c_try_compile "$LINENO"; then :
1853
1854else
1855 eval "$3=yes"
1856fi
1857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1858fi
1859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1860fi
1861eval ac_res=\$$3
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1863$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001864 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001865
1866} # ac_fn_c_check_type
1867
1868# ac_fn_c_find_uintX_t LINENO BITS VAR
1869# ------------------------------------
1870# Finds an unsigned integer type with width BITS, setting cache variable VAR
1871# accordingly.
1872ac_fn_c_find_uintX_t ()
1873{
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1876$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001877if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001878 $as_echo_n "(cached) " >&6
1879else
1880 eval "$3=no"
1881 # Order is important - never check a type that is potentially smaller
1882 # than half of the expected target width.
1883 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1884 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1886/* end confdefs.h. */
1887$ac_includes_default
1888int
1889main ()
1890{
1891static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1892test_array [0] = 0
1893
1894 ;
1895 return 0;
1896}
1897_ACEOF
1898if ac_fn_c_try_compile "$LINENO"; then :
1899 case $ac_type in #(
1900 uint$2_t) :
1901 eval "$3=yes" ;; #(
1902 *) :
1903 eval "$3=\$ac_type" ;;
1904esac
1905fi
1906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001907 eval as_val=\$$3
1908 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909
1910else
1911 break
1912fi
1913 done
1914fi
1915eval ac_res=\$$3
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1917$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001918 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920} # ac_fn_c_find_uintX_t
1921
1922# ac_fn_c_find_intX_t LINENO BITS VAR
1923# -----------------------------------
1924# Finds a signed integer type with width BITS, setting cache variable VAR
1925# accordingly.
1926ac_fn_c_find_intX_t ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1930$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001931if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001932 $as_echo_n "(cached) " >&6
1933else
1934 eval "$3=no"
1935 # Order is important - never check a type that is potentially smaller
1936 # than half of the expected target width.
1937 for ac_type in int$2_t 'int' 'long int' \
1938 'long long int' 'short int' 'signed char'; do
1939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1940/* end confdefs.h. */
1941$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001942 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001943int
1944main ()
1945{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001946static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001947test_array [0] = 0
1948
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001957 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001958int
1959main ()
1960{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001961static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001962 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1963test_array [0] = 0
1964
1965 ;
1966 return 0;
1967}
1968_ACEOF
1969if ac_fn_c_try_compile "$LINENO"; then :
1970
1971else
1972 case $ac_type in #(
1973 int$2_t) :
1974 eval "$3=yes" ;; #(
1975 *) :
1976 eval "$3=\$ac_type" ;;
1977esac
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980fi
1981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001982 eval as_val=\$$3
1983 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985else
1986 break
1987fi
1988 done
1989fi
1990eval ac_res=\$$3
1991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1992$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001993 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001994
1995} # ac_fn_c_find_intX_t
1996
1997# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1998# --------------------------------------------
1999# Tries to find the compile-time value of EXPR in a program that includes
2000# INCLUDES, setting VAR accordingly. Returns whether the value could be
2001# computed
2002ac_fn_c_compute_int ()
2003{
2004 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005 if test "$cross_compiling" = yes; then
2006 # Depending upon the size, compute the lo and hi bounds.
2007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$4
2010int
2011main ()
2012{
2013static int test_array [1 - 2 * !(($2) >= 0)];
2014test_array [0] = 0
2015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 ac_lo=0 ac_mid=0
2022 while :; do
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$4
2026int
2027main ()
2028{
2029static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2030test_array [0] = 0
2031
2032 ;
2033 return 0;
2034}
2035_ACEOF
2036if ac_fn_c_try_compile "$LINENO"; then :
2037 ac_hi=$ac_mid; break
2038else
2039 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2040 if test $ac_lo -le $ac_mid; then
2041 ac_lo= ac_hi=
2042 break
2043 fi
2044 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2045fi
2046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2047 done
2048else
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$4
2052int
2053main ()
2054{
2055static int test_array [1 - 2 * !(($2) < 0)];
2056test_array [0] = 0
2057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_hi=-1 ac_mid=-1
2064 while :; do
2065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066/* end confdefs.h. */
2067$4
2068int
2069main ()
2070{
2071static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2072test_array [0] = 0
2073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079 ac_lo=$ac_mid; break
2080else
2081 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2082 if test $ac_mid -le $ac_hi; then
2083 ac_lo= ac_hi=
2084 break
2085 fi
2086 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089 done
2090else
2091 ac_lo= ac_hi=
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096# Binary search between lo and hi bounds.
2097while test "x$ac_lo" != "x$ac_hi"; do
2098 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h. */
2101$4
2102int
2103main ()
2104{
2105static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2106test_array [0] = 0
2107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=$ac_mid
2114else
2115 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2116fi
2117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118done
2119case $ac_lo in #((
2120?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2121'') ac_retval=1 ;;
2122esac
2123 else
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127static long int longval () { return $2; }
2128static unsigned long int ulongval () { return $2; }
2129#include <stdio.h>
2130#include <stdlib.h>
2131int
2132main ()
2133{
2134
2135 FILE *f = fopen ("conftest.val", "w");
2136 if (! f)
2137 return 1;
2138 if (($2) < 0)
2139 {
2140 long int i = longval ();
2141 if (i != ($2))
2142 return 1;
2143 fprintf (f, "%ld", i);
2144 }
2145 else
2146 {
2147 unsigned long int i = ulongval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%lu", i);
2151 }
2152 /* Do not output a trailing newline, as this causes \r\n confusion
2153 on some platforms. */
2154 return ferror (f) || fclose (f) != 0;
2155
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_run "$LINENO"; then :
2161 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2162else
2163 ac_retval=1
2164fi
2165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2166 conftest.$ac_objext conftest.beam conftest.$ac_ext
2167rm -f conftest.val
2168
2169 fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002170 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002171 as_fn_set_status $ac_retval
2172
2173} # ac_fn_c_compute_int
2174
2175# ac_fn_c_check_func LINENO FUNC VAR
2176# ----------------------------------
2177# Tests whether FUNC exists, setting the cache variable VAR accordingly
2178ac_fn_c_check_func ()
2179{
2180 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2182$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002183if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002184 $as_echo_n "(cached) " >&6
2185else
2186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h. */
2188/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2190#define $2 innocuous_$2
2191
2192/* System header to define __stub macros and hopefully few prototypes,
2193 which can conflict with char $2 (); below.
2194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2195 <limits.h> exists even on freestanding compilers. */
2196
2197#ifdef __STDC__
2198# include <limits.h>
2199#else
2200# include <assert.h>
2201#endif
2202
2203#undef $2
2204
2205/* Override any GCC internal prototype to avoid an error.
2206 Use char because int might match the return type of a GCC
2207 builtin and then its argument prototype would still apply. */
2208#ifdef __cplusplus
2209extern "C"
2210#endif
2211char $2 ();
2212/* The GNU C library defines this for functions which it implements
2213 to always fail with ENOSYS. Some functions are actually named
2214 something starting with __ and the normal name is an alias. */
2215#if defined __stub_$2 || defined __stub___$2
2216choke me
2217#endif
2218
2219int
2220main ()
2221{
2222return $2 ();
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_link "$LINENO"; then :
2228 eval "$3=yes"
2229else
2230 eval "$3=no"
2231fi
2232rm -f core conftest.err conftest.$ac_objext \
2233 conftest$ac_exeext conftest.$ac_ext
2234fi
2235eval ac_res=\$$3
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2237$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002238 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002239
2240} # ac_fn_c_check_func
2241
2242# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2243# ----------------------------------------------------
2244# Tries to find if the field MEMBER exists in type AGGR, after including
2245# INCLUDES, setting cache variable VAR accordingly.
2246ac_fn_c_check_member ()
2247{
2248 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2250$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002251if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002252 $as_echo_n "(cached) " >&6
2253else
2254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h. */
2256$5
2257int
2258main ()
2259{
2260static $2 ac_aggr;
2261if (ac_aggr.$3)
2262return 0;
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_compile "$LINENO"; then :
2268 eval "$4=yes"
2269else
2270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271/* end confdefs.h. */
2272$5
2273int
2274main ()
2275{
2276static $2 ac_aggr;
2277if (sizeof ac_aggr.$3)
2278return 0;
2279 ;
2280 return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_compile "$LINENO"; then :
2284 eval "$4=yes"
2285else
2286 eval "$4=no"
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291fi
2292eval ac_res=\$$4
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2294$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002295 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002296
2297} # ac_fn_c_check_member
2298
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002299# ac_fn_c_check_decl LINENO SYMBOL VAR
2300# ------------------------------------
2301# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002302ac_fn_c_check_decl ()
2303{
2304 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2306$as_echo_n "checking whether $2 is declared... " >&6; }
2307if { as_var=$3; eval "test \"\${$as_var+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{
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002316#ifndef $2
2317 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002318#endif
2319
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$3=yes"
2326else
2327 eval "$3=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331eval ac_res=\$$3
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2333$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002334 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002335
2336} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002338This file contains any messages produced by compilers while
2339running configure, to aid debugging if configure makes a mistake.
2340
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002341It was created by python $as_me 3.3, which was
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002342generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002343
2344 $ $0 $@
2345
2346_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002348{
2349cat <<_ASUNAME
2350## --------- ##
2351## Platform. ##
2352## --------- ##
2353
2354hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2355uname -m = `(uname -m) 2>/dev/null || echo unknown`
2356uname -r = `(uname -r) 2>/dev/null || echo unknown`
2357uname -s = `(uname -s) 2>/dev/null || echo unknown`
2358uname -v = `(uname -v) 2>/dev/null || echo unknown`
2359
2360/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2361/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2362
2363/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2364/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2365/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002366/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002367/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2368/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2369/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2370
2371_ASUNAME
2372
2373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2374for as_dir in $PATH
2375do
2376 IFS=$as_save_IFS
2377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002378 $as_echo "PATH: $as_dir"
2379 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002381
2382} >&5
2383
2384cat >&5 <<_ACEOF
2385
2386
2387## ----------- ##
2388## Core tests. ##
2389## ----------- ##
2390
2391_ACEOF
2392
2393
2394# Keep a trace of the command line.
2395# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002396# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002397# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002400ac_configure_args0=
2401ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_must_keep_next=false
2403for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002404do
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 for ac_arg
2406 do
2407 case $ac_arg in
2408 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2409 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2410 | -silent | --silent | --silen | --sile | --sil)
2411 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002412 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 esac
2415 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002420 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 case $ac_arg in
2423 *=* | --config-cache | -C | -disable-* | --disable-* \
2424 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2425 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2426 | -with-* | --with-* | -without-* | --without-* | --x)
2427 case "$ac_configure_args0 " in
2428 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2429 esac
2430 ;;
2431 -* ) ac_must_keep_next=true ;;
2432 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002434 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 ;;
2436 esac
2437 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002438done
Matthias Kloseb9621712010-04-24 17:59:49 +00002439{ ac_configure_args0=; unset ac_configure_args0;}
2440{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442# When interrupted or exit'd, cleanup temporary files, and complete
2443# config.log. We remove comments because anyway the quotes in there
2444# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445# WARNING: Use '\'' to represent an apostrophe within the trap.
2446# 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 +00002447trap 'exit_status=$?
2448 # Save into config.log some information that might help in debugging.
2449 {
2450 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002451
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002452 cat <<\_ASBOX
2453## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002454## Cache variables. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002455## ---------------- ##
2456_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002490 cat <<\_ASBOX
2491## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002493## ----------------- ##
2494_ASBOX
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
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002507 cat <<\_ASBOX
2508## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509## File substitutions. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002510## ------------------- ##
2511_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 echo
2513 for ac_var in $ac_subst_files
2514 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 eval ac_val=\$$ac_var
2516 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 done | sort
2521 echo
2522 fi
2523
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 if test -s confdefs.h; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002525 cat <<\_ASBOX
2526## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002527## confdefs.h. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002528## ----------- ##
2529_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 echo
2533 fi
2534 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 $as_echo "$as_me: caught signal $ac_signal"
2536 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 rm -f core *.core core.conftest.* &&
2539 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002542for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002544done
2545ac_signal=0
2546
2547# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002549
Matthias Kloseb9621712010-04-24 17:59:49 +00002550$as_echo "/* confdefs.h */" > confdefs.h
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552# Predefined preprocessor variables.
2553
2554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_NAME "$PACKAGE_NAME"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_VERSION "$PACKAGE_VERSION"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_STRING "$PACKAGE_STRING"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2572_ACEOF
2573
Matthias Kloseb9621712010-04-24 17:59:49 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_URL "$PACKAGE_URL"
2576_ACEOF
2577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578
2579# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002580# Prefer an explicitly selected file to automatically selected ones.
2581ac_site_file1=NONE
2582ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583if test -n "$CONFIG_SITE"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002584 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002599 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600 fi
2601done
2602
2603if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 # Some versions of bash will fail to source /dev/null (special files
2605 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2606 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2608$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2611 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 esac
2613 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614else
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2616$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 >$cache_file
2618fi
2619
2620# Check that the precious variables saved in the cache have kept the same
2621# value.
2622ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2625 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2627 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 case $ac_old_set,$ac_new_set in
2629 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2631$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 +00002632 ac_cache_corrupted=: ;;
2633 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2635$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 ac_cache_corrupted=: ;;
2637 ,);;
2638 *)
2639 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 # differences in whitespace do not lead to failure.
2641 ac_old_val_w=`echo x $ac_old_val`
2642 ac_new_val_w=`echo x $ac_new_val`
2643 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2645$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2646 ac_cache_corrupted=:
2647 else
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2649$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2650 eval $ac_var=\$ac_old_val
2651 fi
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2653$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2655$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 fi;;
2657 esac
2658 # Pass precious variables to config.status.
2659 if test "$ac_new_set" = set; then
2660 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 *) ac_arg=$ac_var=$ac_new_val ;;
2663 esac
2664 case " $ac_configure_args " in
2665 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 esac
2668 fi
2669done
2670if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2674$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002675 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002677## -------------------- ##
2678## Main body of script. ##
2679## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680
Guido van Rossum7f43da71994-08-01 12:15:30 +00002681ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2685ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686
Guido van Rossum627b2d71993-12-24 10:39:16 +00002687
Michael W. Hudson54241132001-12-07 15:38:26 +00002688
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002689
2690
2691
2692
2693if test -e $srcdir/.hg/00changelog.i
2694then
2695# Extract the first word of "hg", so it can be a program name with args.
2696set dummy hg; ac_word=$2
2697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2698$as_echo_n "checking for $ac_word... " >&6; }
2699if test "${ac_cv_prog_HAS_HG+set}" = set; then :
2700 $as_echo_n "(cached) " >&6
2701else
2702 if test -n "$HAS_HG"; then
2703 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2704else
2705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2706for as_dir in $PATH
2707do
2708 IFS=$as_save_IFS
2709 test -z "$as_dir" && as_dir=.
2710 for ac_exec_ext in '' $ac_executable_extensions; do
2711 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2712 ac_cv_prog_HAS_HG="found"
2713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2714 break 2
2715 fi
2716done
2717 done
2718IFS=$as_save_IFS
2719
2720 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2721fi
2722fi
2723HAS_HG=$ac_cv_prog_HAS_HG
2724if test -n "$HAS_HG"; then
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2726$as_echo "$HAS_HG" >&6; }
2727else
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2729$as_echo "no" >&6; }
2730fi
2731
2732
2733else
2734HAS_HG=no-repository
2735fi
2736if test $HAS_HG = found
2737then
2738 HGVERSION="hg id -i \$(srcdir)"
2739 HGTAG="hg id -t \$(srcdir)"
2740 HGBRANCH="hg id -b \$(srcdir)"
2741else
2742 HGVERSION=""
2743 HGTAG=""
2744 HGBRANCH=""
2745fi
2746
2747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002749
2750
Martin v. Löwis11437992002-04-12 09:54:03 +00002751
Benjamin Petersond23f8222009-04-05 19:13:16 +00002752if test "$prefix" != "/"; then
2753 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2754fi
2755
2756
Martin v. Löwis11437992002-04-12 09:54:03 +00002757
2758
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002759# We don't use PACKAGE_ variables, and they cause conflicts
2760# with other autoconf-based packages that include Python.h
2761grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2762rm confdefs.h
2763mv confdefs.h.new confdefs.h
2764
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002765
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002766VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002767
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002768# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002769
2770SOVERSION=1.0
2771
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002772# The later defininition of _XOPEN_SOURCE disables certain features
2773# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2774
Matthias Kloseb9621712010-04-24 17:59:49 +00002775$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002776
2777
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002778# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2779# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2780# them.
2781
Matthias Kloseb9621712010-04-24 17:59:49 +00002782$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002783
2784
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002785# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2786# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2787# them.
2788
Matthias Kloseb9621712010-04-24 17:59:49 +00002789$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002790
2791
Martin v. Löwisd6320502004-08-12 13:45:08 +00002792# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2793# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2794
Matthias Kloseb9621712010-04-24 17:59:49 +00002795$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002796
2797
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002798# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2799# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2800# them.
2801
Matthias Kloseb9621712010-04-24 17:59:49 +00002802$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002803
2804
2805
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002806define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002807
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002808# Arguments passed to configure.
2809
2810CONFIG_ARGS="$ac_configure_args"
2811
Matthias Kloseb9621712010-04-24 17:59:49 +00002812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2813$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002814# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002815if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002816 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002817 case $enableval in
2818 yes)
2819 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002820 if test ! -d "${enableval}"
2821 then
2822 enableval=/
2823 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002824 ;;
2825 esac
2826 case $enableval in
2827 no)
2828 UNIVERSALSDK=
2829 enable_universalsdk=
2830 ;;
2831 *)
2832 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002833 if test ! -d "${UNIVERSALSDK}"
2834 then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002835 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002836 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002837 ;;
2838 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002839
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002840
Thomas Wouters477c8d52006-05-27 19:21:47 +00002841else
2842
2843 UNIVERSALSDK=
2844 enable_universalsdk=
2845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002846fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002847
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002848if test -n "${UNIVERSALSDK}"
2849then
Matthias Kloseb9621712010-04-24 17:59:49 +00002850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2851$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002852else
Matthias Kloseb9621712010-04-24 17:59:49 +00002853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2854$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002855fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002857
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002858
2859
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002860UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002861
Matthias Kloseb9621712010-04-24 17:59:49 +00002862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2863$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002864
2865# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002866if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002867 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2869$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002870 UNIVERSAL_ARCHS="$withval"
2871
2872else
2873
Matthias Kloseb9621712010-04-24 17:59:49 +00002874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2875$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002876
2877fi
2878
2879
2880
2881
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002882
2883# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002884if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002885 withval=$with_framework_name;
2886 PYTHONFRAMEWORK=${withval}
2887 PYTHONFRAMEWORKDIR=${withval}.framework
2888 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2889
2890else
2891
2892 PYTHONFRAMEWORK=Python
2893 PYTHONFRAMEWORKDIR=Python.framework
2894 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2895
2896fi
2897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002898# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002899if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002900 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002901 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002902 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002903 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002904 esac
2905 case $enableval in
2906 no)
2907 PYTHONFRAMEWORK=
2908 PYTHONFRAMEWORKDIR=no-framework
2909 PYTHONFRAMEWORKPREFIX=
2910 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911 FRAMEWORKINSTALLFIRST=
2912 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002913 FRAMEWORKALTINSTALLFIRST=
2914 FRAMEWORKALTINSTALLLAST=
2915 if test "x${prefix}" = "xNONE"; then
2916 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2917 else
2918 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2919 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002920 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002921 ;;
2922 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002923 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002924 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002925 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002926 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002927 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2928 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002929 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002930
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002931 if test "x${prefix}" = "xNONE" ; then
2932 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002933
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002934 else
2935 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2936 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002937
2938 case "${enableval}" in
2939 /System*)
2940 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2941 if test "${prefix}" = "NONE" ; then
2942 # See below
2943 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2944 fi
2945 ;;
2946
2947 /Library*)
2948 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2949 ;;
2950
2951 */Library/Frameworks)
2952 MDIR="`dirname "${enableval}"`"
2953 MDIR="`dirname "${MDIR}"`"
2954 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2955
2956 if test "${prefix}" = "NONE"; then
2957 # User hasn't specified the
2958 # --prefix option, but wants to install
2959 # the framework in a non-default location,
2960 # ensure that the compatibility links get
2961 # installed relative to that prefix as well
2962 # instead of in /usr/local.
2963 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2964 fi
2965 ;;
2966
2967 *)
2968 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2969 ;;
2970 esac
2971
Jack Jansen127e56e2001-09-11 14:41:54 +00002972 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002973
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002974 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002975 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002976 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002978 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002979
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002980 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2981
2982 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2983
Jack Jansene578a632001-08-15 01:27:14 +00002984 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002985
Guido van Rossum563e7081996-09-10 18:20:48 +00002986else
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
Jack Jansene578a632001-08-15 01:27:14 +00002988 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002989 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002990 PYTHONFRAMEWORKPREFIX=
2991 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002992 FRAMEWORKINSTALLFIRST=
2993 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002994 FRAMEWORKALTINSTALLFIRST=
2995 FRAMEWORKALTINSTALLLAST=
2996 if test "x${prefix}" = "xNONE" ; then
2997 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2998 else
2999 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3000 fi
Jack Jansene578a632001-08-15 01:27:14 +00003001 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003002
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004fi
3005
Thomas Wouters477c8d52006-05-27 19:21:47 +00003006
3007
Michael W. Hudson54241132001-12-07 15:38:26 +00003008
3009
3010
3011
Jack Jansene578a632001-08-15 01:27:14 +00003012
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003013
3014
3015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003016
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003017
Jack Jansene578a632001-08-15 01:27:14 +00003018##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003019## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003020## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003021##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003022# Set name for machine-dependent library files
3023
Matthias Kloseb9621712010-04-24 17:59:49 +00003024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3025$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003026if test -z "$MACHDEP"
3027then
Guido van Rossum563e7081996-09-10 18:20:48 +00003028 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003029 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003030 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003031 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003032 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003033 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003034 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003035 ac_md_system=`echo $ac_sys_system |
3036 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3037 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003038 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003039 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003040
Guido van Rossum07397971997-04-29 21:49:50 +00003041 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003042 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003043 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003044 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003045 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003046 esac
3047fi
Guido van Rossum91922671997-10-09 20:24:13 +00003048
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003049# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3050# disable features if it is defined, without any means to access these
3051# features as extensions. For these systems, we skip the definition of
3052# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3053# some feature, make sure there is no alternative way to access this
3054# feature. Also, when using wildcards, make sure you have verified the
3055# need for not defining _XOPEN_SOURCE on all systems matching the
3056# wildcard, and that the wildcard does not include future systems
3057# (which may remove their limitations).
3058case $ac_sys_system/$ac_sys_release in
3059 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3060 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003061 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003062 # In addition, Stefan Krah confirms that issue #1244610 exists through
3063 # OpenBSD 4.6, but is fixed in 4.7.
3064 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003065 define_xopen_source=no
3066 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3067 # also defined. This can be overridden by defining _BSD_SOURCE
3068 # As this has a different meaning on Linux, only define it on OpenBSD
3069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003071
3072 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003073 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003074 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3075 # also defined. This can be overridden by defining _BSD_SOURCE
3076 # As this has a different meaning on Linux, only define it on OpenBSD
3077
Matthias Kloseb9621712010-04-24 17:59:49 +00003078$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003079
3080 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003081 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3082 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3083 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003084 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 +00003085 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003086 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3087 # request to enable features supported by the standard as a request
3088 # to disable features not supported by the standard. The best way
3089 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3090 # entirely and define __EXTENSIONS__ instead.
3091 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003092 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003093 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3094 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003095 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003096 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003097 define_xopen_source=no;;
3098 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003099 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003100 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003101 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003102 # On FreeBSD 4, the math functions C89 does not cover are never defined
3103 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3104 FreeBSD/4.*)
3105 define_xopen_source=no;;
3106 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3107 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3108 # identifies itself as Darwin/7.*
3109 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3110 # disables platform specific features beyond repair.
3111 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3112 # has no effect, don't bother defining them
3113 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003114 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003115 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003116 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003117 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3118 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3119 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003120 AIX/4)
3121 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003122 AIX/5)
3123 if test `uname -r` -eq 1; then
3124 define_xopen_source=no
3125 fi
3126 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003127 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3128 # defining NI_NUMERICHOST.
3129 QNX/6.3.2)
3130 define_xopen_source=no
3131 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003132
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003133esac
3134
3135if test $define_xopen_source = yes
3136then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003137
Matthias Kloseb9621712010-04-24 17:59:49 +00003138$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003139
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003140
3141 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3142 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3143 # several APIs are not declared. Since this is also needed in some
3144 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003145
Matthias Kloseb9621712010-04-24 17:59:49 +00003146$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003147
3148
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003149
Matthias Kloseb9621712010-04-24 17:59:49 +00003150$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003151
3152
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003153fi
3154
Guido van Rossum91922671997-10-09 20:24:13 +00003155#
3156# SGI compilers allow the specification of the both the ABI and the
3157# ISA on the command line. Depending on the values of these switches,
3158# different and often incompatable code will be generated.
3159#
3160# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3161# thus supply support for various ABI/ISA combinations. The MACHDEP
3162# variable is also adjusted.
3163#
3164
3165if test ! -z "$SGI_ABI"
3166then
3167 CC="cc $SGI_ABI"
3168 LDFLAGS="$SGI_ABI $LDFLAGS"
3169 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3172$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003173
Jack Jansen6b08a402004-06-03 12:41:45 +00003174# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3175# it may influence the way we can build extensions, so distutils
3176# needs to check it
3177
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178
Jack Jansen6b08a402004-06-03 12:41:45 +00003179CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003181
Matthias Kloseb9621712010-04-24 17:59:49 +00003182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3183$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003184ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3186$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003187
Guido van Rossum627b2d71993-12-24 10:39:16 +00003188# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003189
3190# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3191# for debug/optimization stuff. BASECFLAGS is for flags that are required
3192# just to get things to compile and link. Users are free to override OPT
3193# when running configure or make. The build should not break if they do.
3194# BASECFLAGS should generally not be messed with, however.
3195
3196# XXX shouldn't some/most/all of this code be merged with the stuff later
3197# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3199$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003202if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003204 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003205 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003206 without_gcc=yes;;
3207 yes) CC=gcc
3208 without_gcc=no;;
3209 *) CC=$withval
3210 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003211 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003214 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003215 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003216 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003217 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003218 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219fi
3220
Matthias Kloseb9621712010-04-24 17:59:49 +00003221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3222$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003223
Guido van Rossum8b131c51995-03-09 14:10:13 +00003224# If the user switches compilers, we can't believe the cache
3225if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3226then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003227 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003228(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003229fi
3230
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003231# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3232# when the compiler supports them, but we don't always want -O2, and
3233# we set -g later.
3234if test -z "$CFLAGS"; then
3235 CFLAGS=
3236fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003237ac_ext=c
3238ac_cpp='$CPP $CPPFLAGS'
3239ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3240ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3241ac_compiler_gnu=$ac_cv_c_compiler_gnu
3242if test -n "$ac_tool_prefix"; then
3243 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3244set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3246$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003247if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003248 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003249else
3250 if test -n "$CC"; then
3251 ac_cv_prog_CC="$CC" # Let the user override the test.
3252else
Martin v. Löwis11437992002-04-12 09:54:03 +00003253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3254for as_dir in $PATH
3255do
3256 IFS=$as_save_IFS
3257 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003258 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259 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 +00003260 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003261 $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 +00003262 break 2
3263 fi
3264done
Matthias Kloseb9621712010-04-24 17:59:49 +00003265 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003266IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003267
Jack Jansendd19cf82001-12-06 22:36:17 +00003268fi
3269fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003270CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003271if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3273$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003274else
Matthias Kloseb9621712010-04-24 17:59:49 +00003275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3276$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003277fi
3278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003279
Martin v. Löwis11437992002-04-12 09:54:03 +00003280fi
3281if test -z "$ac_cv_prog_CC"; then
3282 ac_ct_CC=$CC
3283 # Extract the first word of "gcc", so it can be a program name with args.
3284set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3286$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003287if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003289else
3290 if test -n "$ac_ct_CC"; then
3291 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3292else
3293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3294for as_dir in $PATH
3295do
3296 IFS=$as_save_IFS
3297 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003298 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003299 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 +00003300 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 $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 +00003302 break 2
3303 fi
3304done
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003307
3308fi
3309fi
3310ac_ct_CC=$ac_cv_prog_ac_ct_CC
3311if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3313$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003314else
Matthias Kloseb9621712010-04-24 17:59:49 +00003315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3316$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003317fi
3318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319 if test "x$ac_ct_CC" = x; then
3320 CC=""
3321 else
3322 case $cross_compiling:$ac_tool_warned in
3323yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003326ac_tool_warned=yes ;;
3327esac
3328 CC=$ac_ct_CC
3329 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003330else
3331 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003332fi
3333
Jack Jansendd19cf82001-12-06 22:36:17 +00003334if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003335 if test -n "$ac_tool_prefix"; then
3336 # 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 +00003337set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3339$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003340if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003341 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003342else
3343 if test -n "$CC"; then
3344 ac_cv_prog_CC="$CC" # Let the user override the test.
3345else
Martin v. Löwis11437992002-04-12 09:54:03 +00003346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3347for as_dir in $PATH
3348do
3349 IFS=$as_save_IFS
3350 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003351 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003352 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 +00003353 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 $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 +00003355 break 2
3356 fi
3357done
Matthias Kloseb9621712010-04-24 17:59:49 +00003358 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003360
3361fi
3362fi
3363CC=$ac_cv_prog_CC
3364if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3366$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003367else
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3369$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003370fi
3371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372
Martin v. Löwis11437992002-04-12 09:54:03 +00003373 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003374fi
3375if test -z "$CC"; then
3376 # Extract the first word of "cc", so it can be a program name with args.
3377set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3379$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003380if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003382else
3383 if test -n "$CC"; then
3384 ac_cv_prog_CC="$CC" # Let the user override the test.
3385else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003386 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3388for as_dir in $PATH
3389do
3390 IFS=$as_save_IFS
3391 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003392 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003393 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 +00003394 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3395 ac_prog_rejected=yes
3396 continue
3397 fi
3398 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 $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 +00003400 break 2
3401 fi
3402done
Matthias Kloseb9621712010-04-24 17:59:49 +00003403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003404IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003405
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003406if test $ac_prog_rejected = yes; then
3407 # We found a bogon in the path, so make sure we never use it.
3408 set dummy $ac_cv_prog_CC
3409 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411 # We chose a different compiler from the bogus one.
3412 # However, it has the same basename, so the bogon will be chosen
3413 # first if we set CC to just the basename; use the full file name.
3414 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003415 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003416 fi
3417fi
3418fi
3419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003420CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3423$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424else
Matthias Kloseb9621712010-04-24 17:59:49 +00003425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3426$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003427fi
3428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003429
Martin v. Löwis11437992002-04-12 09:54:03 +00003430fi
3431if test -z "$CC"; then
3432 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 do
3435 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3436set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3438$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003439if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003441else
3442 if test -n "$CC"; then
3443 ac_cv_prog_CC="$CC" # Let the user override the test.
3444else
Martin v. Löwis11437992002-04-12 09:54:03 +00003445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446for as_dir in $PATH
3447do
3448 IFS=$as_save_IFS
3449 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003450 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 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 +00003452 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 $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 +00003454 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003455 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003456done
Matthias Kloseb9621712010-04-24 17:59:49 +00003457 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003459
3460fi
3461fi
3462CC=$ac_cv_prog_CC
3463if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3465$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003466else
Matthias Kloseb9621712010-04-24 17:59:49 +00003467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3468$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003469fi
3470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 test -n "$CC" && break
3473 done
3474fi
3475if test -z "$CC"; then
3476 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003478do
3479 # Extract the first word of "$ac_prog", so it can be a program name with args.
3480set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3482$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003483if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003484 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003485else
3486 if test -n "$ac_ct_CC"; then
3487 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3488else
3489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3490for as_dir in $PATH
3491do
3492 IFS=$as_save_IFS
3493 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003494 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003495 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 +00003496 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003497 $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 +00003498 break 2
3499 fi
3500done
Matthias Kloseb9621712010-04-24 17:59:49 +00003501 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504fi
3505fi
3506ac_ct_CC=$ac_cv_prog_ac_ct_CC
3507if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3509$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510else
Matthias Kloseb9621712010-04-24 17:59:49 +00003511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3512$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003513fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 test -n "$ac_ct_CC" && break
3517done
Michael W. Hudson54241132001-12-07 15:38:26 +00003518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003519 if test "x$ac_ct_CC" = x; then
3520 CC=""
3521 else
3522 case $cross_compiling:$ac_tool_warned in
3523yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003526ac_tool_warned=yes ;;
3527esac
3528 CC=$ac_ct_CC
3529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003530fi
3531
3532fi
3533
3534
Matthias Kloseb9621712010-04-24 17:59:49 +00003535test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003537as_fn_error "no acceptable C compiler found in \$PATH
3538See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003539
3540# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003541$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3542set X $ac_compile
3543ac_compiler=$2
3544for ac_option in --version -v -V -qversion; do
3545 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546case "(($ac_try" in
3547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3548 *) ac_try_echo=$ac_try;;
3549esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003550eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3551$as_echo "$ac_try_echo"; } >&5
3552 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003554 if test -s conftest.err; then
3555 sed '10a\
3556... rest of stderr output deleted ...
3557 10q' conftest.err >conftest.er1
3558 cat conftest.er1 >&5
3559 fi
3560 rm -f conftest.er1 conftest.err
3561 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3562 test $ac_status = 0; }
3563done
Martin v. Löwis11437992002-04-12 09:54:03 +00003564
Matthias Kloseb9621712010-04-24 17:59:49 +00003565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003566/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003567
Martin v. Löwis11437992002-04-12 09:54:03 +00003568int
3569main ()
3570{
3571
3572 ;
3573 return 0;
3574}
3575_ACEOF
3576ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003577ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003578# Try to create an executable without -o first, disregard a.out.
3579# It will help us diagnose broken compilers, and finding out an intuition
3580# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3582$as_echo_n "checking whether the C compiler works... " >&6; }
3583ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3584
3585# The possible output files:
3586ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588ac_rmfiles=
3589for ac_file in $ac_files
3590do
3591 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3594 esac
3595done
3596rm -f $ac_rmfiles
3597
Matthias Kloseb9621712010-04-24 17:59:49 +00003598if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599case "(($ac_try" in
3600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3601 *) ac_try_echo=$ac_try;;
3602esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003603eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3604$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3608 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3610# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3611# in a Makefile. We should not override ac_cv_exeext if it was cached,
3612# so that the user can short-circuit this test for compilers unknown to
3613# Autoconf.
3614for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003615do
3616 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003619 ;;
3620 [ab].out )
3621 # We found the default executable, but exeext='' is most
3622 # certainly right.
3623 break;;
3624 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 then :; else
3627 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3628 fi
3629 # We set ac_cv_exeext here because the later test for it is not
3630 # safe: cross compilers may not add the suffix if given an `-o'
3631 # argument, so we may need to know it at that point already.
3632 # Even if this section looks crufty: it has the advantage of
3633 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003634 break;;
3635 * )
3636 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 esac
3638done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639test "$ac_cv_exeext" = no && ac_cv_exeext=
3640
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003641else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642 ac_file=''
3643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003644if test -z "$ac_file"; then :
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646$as_echo "no" >&6; }
3647$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003648sed 's/^/| /' conftest.$ac_ext >&5
3649
Matthias Kloseb9621712010-04-24 17:59:49 +00003650{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003652{ as_fn_set_status 77
3653as_fn_error "C compiler cannot create executables
3654See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003655else
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3657$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3660$as_echo_n "checking for C compiler default output file name... " >&6; }
3661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3662$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003663ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003664
Matthias Kloseb9621712010-04-24 17:59:49 +00003665rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003666ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3668$as_echo_n "checking for suffix of executables... " >&6; }
3669if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003670case "(($ac_try" in
3671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3672 *) ac_try_echo=$ac_try;;
3673esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3675$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3679 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003680 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3681# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3682# work properly (i.e., refer to `conftest.exe'), while it won't with
3683# `rm'.
3684for ac_file in conftest.exe conftest conftest.*; do
3685 test -f "$ac_file" || continue
3686 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003688 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3689 break;;
3690 * ) break;;
3691 esac
3692done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003693else
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003696as_fn_error "cannot compute suffix of executables: cannot compile and link
3697See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003699rm -f conftest conftest$ac_cv_exeext
3700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3701$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003702
3703rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003704EXEEXT=$ac_cv_exeext
3705ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3707/* end confdefs.h. */
3708#include <stdio.h>
3709int
3710main ()
3711{
3712FILE *f = fopen ("conftest.out", "w");
3713 return ferror (f) || fclose (f) != 0;
3714
3715 ;
3716 return 0;
3717}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003719ac_clean_files="$ac_clean_files conftest.out"
3720# Check that the compiler produces executables we can run. If not, either
3721# the compiler is broken, or we cross compile.
3722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3723$as_echo_n "checking whether we are cross compiling... " >&6; }
3724if test "$cross_compiling" != yes; then
3725 { { ac_try="$ac_link"
3726case "(($ac_try" in
3727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3728 *) ac_try_echo=$ac_try;;
3729esac
3730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3731$as_echo "$ac_try_echo"; } >&5
3732 (eval "$ac_link") 2>&5
3733 ac_status=$?
3734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3735 test $ac_status = 0; }
3736 if { ac_try='./conftest$ac_cv_exeext'
3737 { { case "(($ac_try" in
3738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3739 *) ac_try_echo=$ac_try;;
3740esac
3741eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3742$as_echo "$ac_try_echo"; } >&5
3743 (eval "$ac_try") 2>&5
3744 ac_status=$?
3745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3746 test $ac_status = 0; }; }; then
3747 cross_compiling=no
3748 else
3749 if test "$cross_compiling" = maybe; then
3750 cross_compiling=yes
3751 else
3752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003754as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003755If you meant to cross compile, use \`--host'.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003756See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 fi
3758 fi
3759fi
3760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3761$as_echo "$cross_compiling" >&6; }
3762
3763rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3764ac_clean_files=$ac_clean_files_save
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3766$as_echo_n "checking for suffix of object files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003767if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 $as_echo_n "(cached) " >&6
3769else
3770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003771/* end confdefs.h. */
3772
3773int
3774main ()
3775{
3776
3777 ;
3778 return 0;
3779}
3780_ACEOF
3781rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003782if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003783case "(($ac_try" in
3784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3785 *) ac_try_echo=$ac_try;;
3786esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003787eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3788$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3792 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793 for ac_file in conftest.o conftest.obj conftest.*; do
3794 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3798 break;;
3799 esac
3800done
3801else
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003803sed 's/^/| /' conftest.$ac_ext >&5
3804
Matthias Kloseb9621712010-04-24 17:59:49 +00003805{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3806$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003807as_fn_error "cannot compute suffix of object files: cannot compile
3808See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003809fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003810rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3813$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003814OBJEXT=$ac_cv_objext
3815ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3817$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003818if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003820else
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003823
Martin v. Löwis11437992002-04-12 09:54:03 +00003824int
3825main ()
3826{
3827#ifndef __GNUC__
3828 choke me
3829#endif
3830
3831 ;
3832 return 0;
3833}
3834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003835if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_compiler_gnu=yes
3837else
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003841ac_cv_c_compiler_gnu=$ac_compiler_gnu
3842
3843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3845$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3846if test $ac_compiler_gnu = yes; then
3847 GCC=yes
3848else
3849 GCC=
3850fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003851ac_test_CFLAGS=${CFLAGS+set}
3852ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3854$as_echo_n "checking whether $CC accepts -g... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003855if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003857else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858 ac_save_c_werror_flag=$ac_c_werror_flag
3859 ac_c_werror_flag=yes
3860 ac_cv_prog_cc_g=no
3861 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003864
Martin v. Löwis11437992002-04-12 09:54:03 +00003865int
3866main ()
3867{
3868
3869 ;
3870 return 0;
3871}
3872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003873if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003874 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003875else
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 CFLAGS=""
3877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878/* end confdefs.h. */
3879
3880int
3881main ()
3882{
3883
3884 ;
3885 return 0;
3886}
3887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003888if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890else
3891 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894/* end confdefs.h. */
3895
3896int
3897main ()
3898{
3899
3900 ;
3901 return 0;
3902}
3903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003904if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3912 ac_c_werror_flag=$ac_save_c_werror_flag
3913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3915$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003916if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003918elif test $ac_cv_prog_cc_g = yes; then
3919 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003920 CFLAGS="-g -O2"
3921 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003922 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003923 fi
3924else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003925 if test "$GCC" = yes; then
3926 CFLAGS="-O2"
3927 else
3928 CFLAGS=
3929 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3932$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003933if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003935else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003937ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003939/* end confdefs.h. */
3940#include <stdarg.h>
3941#include <stdio.h>
3942#include <sys/types.h>
3943#include <sys/stat.h>
3944/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3945struct buf { int x; };
3946FILE * (*rcsopen) (struct buf *, struct stat *, int);
3947static char *e (p, i)
3948 char **p;
3949 int i;
3950{
3951 return p[i];
3952}
3953static char *f (char * (*g) (char **, int), char **p, ...)
3954{
3955 char *s;
3956 va_list v;
3957 va_start (v,p);
3958 s = g (p, va_arg (v,int));
3959 va_end (v);
3960 return s;
3961}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003962
3963/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3964 function prototypes and stuff, but not '\xHH' hex character constants.
3965 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003967 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3968 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003970int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3973 inside strings and character constants. */
3974#define FOO(x) 'x'
3975int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3976
Skip Montanaro6dead952003-09-25 14:50:04 +00003977int test (int i, double x);
3978struct s1 {int (*f) (int a);};
3979struct s2 {int (*f) (double a);};
3980int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3981int argc;
3982char **argv;
3983int
3984main ()
3985{
3986return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3987 ;
3988 return 0;
3989}
3990_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3992 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003993do
3994 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998rm -f core conftest.err conftest.$ac_objext
3999 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004000done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004002CC=$ac_save_CC
4003
4004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005# AC_CACHE_VAL
4006case "x$ac_cv_prog_cc_c89" in
4007 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4009$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4012$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004013 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4016$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004017esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004018if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004019
Matthias Kloseb9621712010-04-24 17:59:49 +00004020fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004021
Martin v. Löwis11437992002-04-12 09:54:03 +00004022ac_ext=c
4023ac_cpp='$CPP $CPPFLAGS'
4024ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4025ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4026ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004028
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004029
4030
Matthias Kloseb9621712010-04-24 17:59:49 +00004031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4032$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004034# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004035if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004037
4038 case $withval in
4039 no) with_cxx_main=no
4040 MAINCC='$(CC)';;
4041 yes) with_cxx_main=yes
4042 MAINCC='$(CXX)';;
4043 *) with_cxx_main=yes
4044 MAINCC=$withval
4045 if test -z "$CXX"
4046 then
4047 CXX=$withval
4048 fi;;
4049 esac
4050else
4051
4052 with_cxx_main=no
4053 MAINCC='$(CC)'
4054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055fi
4056
Matthias Kloseb9621712010-04-24 17:59:49 +00004057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4058$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004059
4060preset_cxx="$CXX"
4061if test -z "$CXX"
4062then
4063 case "$CC" in
4064 gcc) # Extract the first word of "g++", so it can be a program name with args.
4065set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4067$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004068if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070else
4071 case $CXX in
4072 [\\/]* | ?:[\\/]*)
4073 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4074 ;;
4075 *)
4076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4077for as_dir in notfound
4078do
4079 IFS=$as_save_IFS
4080 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082 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 +00004083 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004085 break 2
4086 fi
4087done
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004089IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004090
4091 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4092 ;;
4093esac
4094fi
4095CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004096if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4098$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004099else
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4101$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004103
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004104 ;;
4105 cc) # Extract the first word of "c++", so it can be a program name with args.
4106set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004109if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004111else
4112 case $CXX in
4113 [\\/]* | ?:[\\/]*)
4114 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4115 ;;
4116 *)
4117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118for as_dir in notfound
4119do
4120 IFS=$as_save_IFS
4121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123 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 +00004124 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004126 break 2
4127 fi
4128done
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131
4132 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4133 ;;
4134esac
4135fi
4136CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004137if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4139$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004140else
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004145 ;;
4146 esac
4147 if test "$CXX" = "notfound"
4148 then
4149 CXX=""
4150 fi
4151fi
4152if test -z "$CXX"
4153then
4154 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4155do
4156 # Extract the first word of "$ac_prog", so it can be a program name with args.
4157set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4159$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004160if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004162else
4163 if test -n "$CXX"; then
4164 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4165else
4166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167for as_dir in $PATH
4168do
4169 IFS=$as_save_IFS
4170 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172 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 +00004173 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004175 break 2
4176 fi
4177done
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004180
4181fi
4182fi
4183CXX=$ac_cv_prog_CXX
4184if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4186$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004187else
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4189$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004190fi
4191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004193 test -n "$CXX" && break
4194done
4195test -n "$CXX" || CXX="notfound"
4196
4197 if test "$CXX" = "notfound"
4198 then
4199 CXX=""
4200 fi
4201fi
4202if test "$preset_cxx" != "$CXX"
4203then
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004205
4206 By default, distutils will build C++ extension modules with \"$CXX\".
4207 If this is not intended, then set CXX on the configure command line.
4208 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004209$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004210
4211 By default, distutils will build C++ extension modules with \"$CXX\".
4212 If this is not intended, then set CXX on the configure command line.
4213 " >&2;}
4214fi
4215
4216
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4218$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4219save_LDFLAGS="$LDFLAGS"
4220LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004221
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223/* end confdefs.h. */
4224
4225int
4226main ()
4227{
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
4233if ac_fn_c_try_link "$LINENO"; then :
4234 NO_AS_NEEDED="-Wl,--no-as-needed"
4235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4236$as_echo "yes" >&6; }
4237else
4238 NO_AS_NEEDED=""
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4240$as_echo "no" >&6; }
4241fi
4242rm -f core conftest.err conftest.$ac_objext \
4243 conftest$ac_exeext conftest.$ac_ext
4244LDFLAGS="$save_LDFLAGS"
4245
4246
4247
4248# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004249ac_ext=c
4250ac_cpp='$CPP $CPPFLAGS'
4251ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4252ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4253ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4255$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004256# On Suns, sometimes $CPP names a directory.
4257if test -n "$CPP" && test -d "$CPP"; then
4258 CPP=
4259fi
4260if test -z "$CPP"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004261 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # Double quotes because CPP needs to be expanded
4265 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4266 do
4267 ac_preproc_ok=false
4268for ac_c_preproc_warn_flag in '' yes
4269do
4270 # Use a header file that comes with gcc, so configuring glibc
4271 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004272 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4273 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004274 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004277/* end confdefs.h. */
4278#ifdef __STDC__
4279# include <limits.h>
4280#else
4281# include <assert.h>
4282#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004283 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004285if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004286
Matthias Kloseb9621712010-04-24 17:59:49 +00004287else
Martin v. Löwis11437992002-04-12 09:54:03 +00004288 # Broken: fails on valid input.
4289continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004290fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004291rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004294 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004297#include <ac_nonexistent.h>
4298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004299if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 # Broken: success on invalid input.
4301continue
4302else
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 # Passes both tests.
4304ac_preproc_ok=:
4305break
4306fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004307rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004308
4309done
4310# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004311rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004312if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004313 break
4314fi
4315
4316 done
4317 ac_cv_prog_CPP=$CPP
4318
4319fi
4320 CPP=$ac_cv_prog_CPP
4321else
4322 ac_cv_prog_CPP=$CPP
4323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4325$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004326ac_preproc_ok=false
4327for ac_c_preproc_warn_flag in '' yes
4328do
4329 # Use a header file that comes with gcc, so configuring glibc
4330 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004331 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4332 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004333 # On the NeXT, cc -E runs the code through the compiler's parser,
4334 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004336/* end confdefs.h. */
4337#ifdef __STDC__
4338# include <limits.h>
4339#else
4340# include <assert.h>
4341#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004342 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004344if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004345
Matthias Kloseb9621712010-04-24 17:59:49 +00004346else
Martin v. Löwis11437992002-04-12 09:54:03 +00004347 # Broken: fails on valid input.
4348continue
4349fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004350rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004353 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004356#include <ac_nonexistent.h>
4357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004358if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 # Broken: success on invalid input.
4360continue
4361else
Martin v. Löwis11437992002-04-12 09:54:03 +00004362 # Passes both tests.
4363ac_preproc_ok=:
4364break
4365fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004366rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004367
4368done
4369# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004370rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004371if $ac_preproc_ok; then :
4372
Martin v. Löwis11437992002-04-12 09:54:03 +00004373else
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004376as_fn_error "C preprocessor \"$CPP\" fails sanity check
4377See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004378fi
4379
4380ac_ext=c
4381ac_cpp='$CPP $CPPFLAGS'
4382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4384ac_compiler_gnu=$ac_cv_c_compiler_gnu
4385
4386
Matthias Kloseb9621712010-04-24 17:59:49 +00004387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4388$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004389if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004391else
Matthias Kloseb9621712010-04-24 17:59:49 +00004392 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 # Loop through the user's path and test for each of PROGNAME-LIST
4395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4397do
4398 IFS=$as_save_IFS
4399 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 for ac_prog in grep ggrep; do
4401 for ac_exec_ext in '' $ac_executable_extensions; do
4402 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4403 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4404# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 # Check for GNU $ac_path_GREP
4406case `"$ac_path_GREP" --version 2>&1` in
4407*GNU*)
4408 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4409*)
4410 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004411 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412 while :
4413 do
4414 cat "conftest.in" "conftest.in" >"conftest.tmp"
4415 mv "conftest.tmp" "conftest.in"
4416 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004417 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4419 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004420 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4422 # Best one so far, save it but keep looking for a better one
4423 ac_cv_path_GREP="$ac_path_GREP"
4424 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004425 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426 # 10*(2^10) chars as input seems more than enough
4427 test $ac_count -gt 10 && break
4428 done
4429 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4430esac
4431
Matthias Kloseb9621712010-04-24 17:59:49 +00004432 $ac_path_GREP_found && break 3
4433 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004435 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004437 if test -z "$ac_cv_path_GREP"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004438 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 +00004439 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440else
4441 ac_cv_path_GREP=$GREP
4442fi
4443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4446$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447 GREP="$ac_cv_path_GREP"
4448
4449
Matthias Kloseb9621712010-04-24 17:59:49 +00004450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4451$as_echo_n "checking for egrep... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004452if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004454else
4455 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4456 then ac_cv_path_EGREP="$GREP -E"
4457 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 # Loop through the user's path and test for each of PROGNAME-LIST
4461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004462for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4463do
4464 IFS=$as_save_IFS
4465 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004466 for ac_prog in egrep; do
4467 for ac_exec_ext in '' $ac_executable_extensions; do
4468 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4469 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4470# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471 # Check for GNU $ac_path_EGREP
4472case `"$ac_path_EGREP" --version 2>&1` in
4473*GNU*)
4474 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4475*)
4476 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004477 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004478 while :
4479 do
4480 cat "conftest.in" "conftest.in" >"conftest.tmp"
4481 mv "conftest.tmp" "conftest.in"
4482 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004483 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004484 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4485 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004486 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004487 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4488 # Best one so far, save it but keep looking for a better one
4489 ac_cv_path_EGREP="$ac_path_EGREP"
4490 ac_path_EGREP_max=$ac_count
4491 fi
4492 # 10*(2^10) chars as input seems more than enough
4493 test $ac_count -gt 10 && break
4494 done
4495 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4496esac
4497
Matthias Kloseb9621712010-04-24 17:59:49 +00004498 $ac_path_EGREP_found && break 3
4499 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004500 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004502IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004503 if test -z "$ac_cv_path_EGREP"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004504 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 +00004505 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004506else
4507 ac_cv_path_EGREP=$EGREP
4508fi
4509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004510 fi
4511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4513$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004514 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004515
4516
Matthias Kloseb9621712010-04-24 17:59:49 +00004517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4518$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004519if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004520 $as_echo_n "(cached) " >&6
4521else
4522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004523/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004524#include <stdlib.h>
4525#include <stdarg.h>
4526#include <string.h>
4527#include <float.h>
4528
4529int
4530main ()
4531{
4532
4533 ;
4534 return 0;
4535}
4536_ACEOF
4537if ac_fn_c_try_compile "$LINENO"; then :
4538 ac_cv_header_stdc=yes
4539else
4540 ac_cv_header_stdc=no
4541fi
4542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4543
4544if test $ac_cv_header_stdc = yes; then
4545 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4547/* end confdefs.h. */
4548#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004549
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004550_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004552 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004553
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004554else
Matthias Kloseb9621712010-04-24 17:59:49 +00004555 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004556fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004557rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004558
Matthias Kloseb9621712010-04-24 17:59:49 +00004559fi
4560
4561if test $ac_cv_header_stdc = yes; then
4562 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4564/* end confdefs.h. */
4565#include <stdlib.h>
4566
4567_ACEOF
4568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4569 $EGREP "free" >/dev/null 2>&1; then :
4570
4571else
4572 ac_cv_header_stdc=no
4573fi
4574rm -f conftest*
4575
4576fi
4577
4578if test $ac_cv_header_stdc = yes; then
4579 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4580 if test "$cross_compiling" = yes; then :
4581 :
4582else
4583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4584/* end confdefs.h. */
4585#include <ctype.h>
4586#include <stdlib.h>
4587#if ((' ' & 0x0FF) == 0x020)
4588# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4589# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4590#else
4591# define ISLOWER(c) \
4592 (('a' <= (c) && (c) <= 'i') \
4593 || ('j' <= (c) && (c) <= 'r') \
4594 || ('s' <= (c) && (c) <= 'z'))
4595# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4596#endif
4597
4598#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4599int
4600main ()
4601{
4602 int i;
4603 for (i = 0; i < 256; i++)
4604 if (XOR (islower (i), ISLOWER (i))
4605 || toupper (i) != TOUPPER (i))
4606 return 2;
4607 return 0;
4608}
4609_ACEOF
4610if ac_fn_c_try_run "$LINENO"; then :
4611
4612else
4613 ac_cv_header_stdc=no
4614fi
4615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4616 conftest.$ac_objext conftest.beam conftest.$ac_ext
4617fi
4618
4619fi
4620fi
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4622$as_echo "$ac_cv_header_stdc" >&6; }
4623if test $ac_cv_header_stdc = yes; then
4624
4625$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4626
4627fi
4628
4629# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4630for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4631 inttypes.h stdint.h unistd.h
4632do :
4633 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4634ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4635"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004636eval as_val=\$$as_ac_Header
4637 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004638 cat >>confdefs.h <<_ACEOF
4639#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4640_ACEOF
4641
4642fi
4643
4644done
4645
4646
4647
4648 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 -05004649if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004650 MINIX=yes
4651else
4652 MINIX=
4653fi
4654
4655
4656 if test "$MINIX" = yes; then
4657
4658$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4659
4660
4661$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4662
4663
4664$as_echo "#define _MINIX 1" >>confdefs.h
4665
4666 fi
4667
4668
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4670$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004671if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004672 $as_echo_n "(cached) " >&6
4673else
4674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4675/* end confdefs.h. */
4676
4677# define __EXTENSIONS__ 1
4678 $ac_includes_default
4679int
4680main ()
4681{
4682
4683 ;
4684 return 0;
4685}
4686_ACEOF
4687if ac_fn_c_try_compile "$LINENO"; then :
4688 ac_cv_safe_to_define___extensions__=yes
4689else
4690 ac_cv_safe_to_define___extensions__=no
4691fi
4692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693fi
4694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4695$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4696 test $ac_cv_safe_to_define___extensions__ = yes &&
4697 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4698
4699 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4700
4701 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4702
4703 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4704
4705 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4706
4707
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004709# Check for unsupported systems
4710case $ac_sys_system/$ac_sys_release in
4711atheos*|Linux*/1*)
4712 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4713 echo See README for details.
4714 exit 1;;
4715esac
4716
4717
Matthias Kloseb9621712010-04-24 17:59:49 +00004718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4719$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720
4721# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004722if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004723 withval=$with_suffix;
4724 case $withval in
4725 no) EXEEXT=;;
4726 yes) EXEEXT=.exe;;
4727 *) EXEEXT=$withval;;
4728 esac
4729fi
4730
Matthias Kloseb9621712010-04-24 17:59:49 +00004731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4732$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733
4734# Test whether we're running on a non-case-sensitive system, in which
4735# case we give a warning if no ext is given
4736
Matthias Kloseb9621712010-04-24 17:59:49 +00004737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4738$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739if test ! -d CaseSensitiveTestDir; then
4740mkdir CaseSensitiveTestDir
4741fi
4742
4743if test -d casesensitivetestdir
4744then
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4746$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004747 BUILDEXEEXT=.exe
4748else
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751 BUILDEXEEXT=$EXEEXT
4752fi
4753rmdir CaseSensitiveTestDir
4754
4755case $MACHDEP in
4756bsdos*)
4757 case $CC in
4758 gcc) CC="$CC -D_HAVE_BSDI";;
4759 esac;;
4760esac
4761
4762case $ac_sys_system in
4763hp*|HP*)
4764 case $CC in
4765 cc|*/cc) CC="$CC -Ae";;
4766 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767esac
4768
4769
4770
Matthias Kloseb9621712010-04-24 17:59:49 +00004771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4772$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004773if test -z "$LIBRARY"
4774then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004775 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4778$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779
4780# LDLIBRARY is the name of the library to link against (as opposed to the
4781# name of the library into which to insert object files). BLDLIBRARY is also
4782# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4783# is blank as the main program is not linked directly against LDLIBRARY.
4784# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4785# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4786# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4787# DLLLIBRARY is the shared (i.e., DLL) library.
4788#
4789# RUNSHARED is used to run shared python without installed libraries
4790#
4791# INSTSONAME is the name of the shared library that will be use to install
4792# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004793#
4794# LDVERSION is the shared library version number, normally the Python version
4795# with the ABI build flags appended.
4796
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004797
4798
4799
4800
4801
4802
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004803
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804LDLIBRARY="$LIBRARY"
4805BLDLIBRARY='$(LDLIBRARY)'
4806INSTSONAME='$(LDLIBRARY)'
4807DLLLIBRARY=''
4808LDLIBRARYDIR=''
4809RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004810LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004811
4812# LINKCC is the command that links the python executable -- default is $(CC).
4813# If CXX is set, and if it is needed to link a main function that was
4814# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4815# python might then depend on the C++ runtime
4816# This is altered for AIX in order to build the export list before
4817# linking.
4818
Matthias Kloseb9621712010-04-24 17:59:49 +00004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4820$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821if test -z "$LINKCC"
4822then
4823 LINKCC='$(PURIFY) $(MAINCC)'
4824 case $ac_sys_system in
4825 AIX*)
4826 exp_extra="\"\""
4827 if test $ac_sys_release -ge 5 -o \
4828 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4829 exp_extra="."
4830 fi
4831 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 QNX*)
4833 # qcc must be used because the other compilers do not
4834 # support -N.
4835 LINKCC=qcc;;
4836 esac
4837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4839$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840
4841# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4842# make sure we default having it set to "no": this is used by
4843# distutils.unixccompiler to know if it should add --enable-new-dtags
4844# to linker command lines, and failing to detect GNU ld simply results
4845# in the same bahaviour as before.
4846
Matthias Kloseb9621712010-04-24 17:59:49 +00004847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4848$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849ac_prog=ld
4850if test "$GCC" = yes; then
4851 ac_prog=`$CC -print-prog-name=ld`
4852fi
4853case `"$ac_prog" -V 2>&1 < /dev/null` in
4854 *GNU*)
4855 GNULD=yes;;
4856 *)
4857 GNULD=no;;
4858esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4860$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4863$as_echo_n "checking for inline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004864if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004865 $as_echo_n "(cached) " >&6
4866else
4867 ac_cv_c_inline=no
4868for ac_kw in inline __inline__ __inline; do
4869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4870/* end confdefs.h. */
4871#ifndef __cplusplus
4872typedef int foo_t;
4873static $ac_kw foo_t static_foo () {return 0; }
4874$ac_kw foo_t foo () {return 0; }
4875#endif
4876
4877_ACEOF
4878if ac_fn_c_try_compile "$LINENO"; then :
4879 ac_cv_c_inline=$ac_kw
4880fi
4881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4882 test "$ac_cv_c_inline" != no && break
4883done
4884
4885fi
4886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4887$as_echo "$ac_cv_c_inline" >&6; }
4888
4889case $ac_cv_c_inline in
4890 inline | yes) ;;
4891 *)
4892 case $ac_cv_c_inline in
4893 no) ac_val=;;
4894 *) ac_val=$ac_cv_c_inline;;
4895 esac
4896 cat >>confdefs.h <<_ACEOF
4897#ifndef __cplusplus
4898#define inline $ac_val
4899#endif
4900_ACEOF
4901 ;;
4902esac
4903
4904if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004905
4906$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004907
4908
4909fi
4910
4911
Matthias Kloseb9621712010-04-24 17:59:49 +00004912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4913$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004915if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916 enableval=$enable_shared;
4917fi
4918
4919
4920if test -z "$enable_shared"
4921then
4922 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004923 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924 enable_shared="yes";;
4925 *)
4926 enable_shared="no";;
4927 esac
4928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4930$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931
Matthias Kloseb9621712010-04-24 17:59:49 +00004932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4933$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004935if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936 enableval=$enable_profiling; ac_save_cc="$CC"
4937 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004938 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939 ac_enable_profiling="no"
4940else
Matthias Kloseb9621712010-04-24 17:59:49 +00004941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942/* end confdefs.h. */
4943int main() { return 0; }
4944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004945if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946 ac_enable_profiling="yes"
4947else
Matthias Kloseb9621712010-04-24 17:59:49 +00004948 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952fi
4953
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954 CC="$ac_save_cc"
4955fi
4956
Matthias Kloseb9621712010-04-24 17:59:49 +00004957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4958$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959
4960case "$ac_enable_profiling" in
4961 "yes")
4962 BASECFLAGS="-pg $BASECFLAGS"
4963 LDFLAGS="-pg $LDFLAGS"
4964 ;;
4965esac
4966
Matthias Kloseb9621712010-04-24 17:59:49 +00004967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4968$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969
4970# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4971# library that we build, but we do not want to link against it (we
4972# will find it with a -framework option). For this reason there is an
4973# extra variable BLDLIBRARY against which Python and the extension
4974# modules are linked, BLDLIBRARY. This is normally the same as
4975# LDLIBRARY, but empty for MacOSX framework builds.
4976if test "$enable_framework"
4977then
4978 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4979 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4980 BLDLIBRARY=''
4981else
4982 BLDLIBRARY='$(LDLIBRARY)'
4983fi
4984
4985# Other platforms follow
4986if test $enable_shared = "yes"; then
4987
Matthias Kloseb9621712010-04-24 17:59:49 +00004988$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989
4990 case $ac_sys_system in
4991 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004992 LDLIBRARY='libpython$(LDVERSION).dll.a'
4993 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994 ;;
4995 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004996 LDLIBRARY='libpython$(LDVERSION).so'
4997 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004998 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4999 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005000 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005001 then
5002 PY3LIBRARY=libpython3.so
5003 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004 ;;
5005 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005006 LDLIBRARY='libpython$(LDVERSION).so'
5007 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5009 case $ac_sys_system in
5010 FreeBSD*)
5011 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5012 ;;
5013 esac
5014 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005015 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005016 then
5017 PY3LIBRARY=libpython3.so
5018 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019 ;;
5020 hp*|HP*)
5021 case `uname -m` in
5022 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005023 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024 ;;
5025 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005026 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027 ;;
5028 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005029 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5031 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005033 LDLIBRARY='libpython$(LDVERSION).dylib'
5034 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5036 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005037 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005038 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005039 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5040 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041
5042 esac
5043else # shared is disabled
5044 case $ac_sys_system in
5045 CYGWIN*)
5046 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005047 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005048 ;;
5049 esac
5050fi
5051
Matthias Kloseb9621712010-04-24 17:59:49 +00005052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5053$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054
5055if test -n "$ac_tool_prefix"; then
5056 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5057set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5059$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005060if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062else
5063 if test -n "$RANLIB"; then
5064 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5065else
5066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5067for as_dir in $PATH
5068do
5069 IFS=$as_save_IFS
5070 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5073 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075 break 2
5076 fi
5077done
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079IFS=$as_save_IFS
5080
5081fi
5082fi
5083RANLIB=$ac_cv_prog_RANLIB
5084if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5086$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087else
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5089$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090fi
5091
5092
5093fi
5094if test -z "$ac_cv_prog_RANLIB"; then
5095 ac_ct_RANLIB=$RANLIB
5096 # Extract the first word of "ranlib", so it can be a program name with args.
5097set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5099$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005100if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102else
5103 if test -n "$ac_ct_RANLIB"; then
5104 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5105else
5106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
5109 IFS=$as_save_IFS
5110 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5113 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005115 break 2
5116 fi
5117done
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119IFS=$as_save_IFS
5120
5121fi
5122fi
5123ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5124if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5126$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005127else
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5129$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130fi
5131
5132 if test "x$ac_ct_RANLIB" = x; then
5133 RANLIB=":"
5134 else
5135 case $cross_compiling:$ac_tool_warned in
5136yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139ac_tool_warned=yes ;;
5140esac
5141 RANLIB=$ac_ct_RANLIB
5142 fi
5143else
5144 RANLIB="$ac_cv_prog_RANLIB"
5145fi
5146
5147
5148for ac_prog in ar aal
5149do
5150 # Extract the first word of "$ac_prog", so it can be a program name with args.
5151set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5153$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005154if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005155 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005156else
5157 if test -n "$AR"; then
5158 ac_cv_prog_AR="$AR" # Let the user override the test.
5159else
5160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5161for as_dir in $PATH
5162do
5163 IFS=$as_save_IFS
5164 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005165 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005166 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5167 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005168 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005169 break 2
5170 fi
5171done
Matthias Kloseb9621712010-04-24 17:59:49 +00005172 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173IFS=$as_save_IFS
5174
5175fi
5176fi
5177AR=$ac_cv_prog_AR
5178if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5180$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181else
Matthias Kloseb9621712010-04-24 17:59:49 +00005182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5183$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184fi
5185
5186
5187 test -n "$AR" && break
5188done
5189test -n "$AR" || AR="ar"
5190
5191
5192# tweak ARFLAGS only if the user didn't set it on the command line
5193
5194if test -z "$ARFLAGS"
5195then
5196 ARFLAGS="rc"
5197fi
5198
5199
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005200DISABLE_ASDLGEN=""
5201# Extract the first word of "python", so it can be a program name with args.
5202set dummy python; ac_word=$2
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5204$as_echo_n "checking for $ac_word... " >&6; }
5205if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
5206 $as_echo_n "(cached) " >&6
5207else
5208 if test -n "$HAS_PYTHON"; then
5209 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5210else
5211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214 IFS=$as_save_IFS
5215 test -z "$as_dir" && as_dir=.
5216 for ac_exec_ext in '' $ac_executable_extensions; do
5217 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5218 ac_cv_prog_HAS_PYTHON="found"
5219 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220 break 2
5221 fi
5222done
5223 done
5224IFS=$as_save_IFS
5225
5226 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5227fi
5228fi
5229HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5230if test -n "$HAS_PYTHON"; then
5231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5232$as_echo "$HAS_PYTHON" >&6; }
5233else
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239if test $HAS_HG != found -o $HAS_PYTHON != found
5240then
5241 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5242fi
5243
5244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245case $MACHDEP in
5246bsdos*|hp*|HP*)
5247 # install -d does not work on BSDI or HP-UX
5248 if test -z "$INSTALL"
5249 then
5250 INSTALL="${srcdir}/install-sh -c"
5251 fi
5252esac
5253ac_aux_dir=
5254for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005255 for ac_t in install-sh install.sh shtool; do
5256 if test -f "$ac_dir/$ac_t"; then
5257 ac_aux_dir=$ac_dir
5258 ac_install_sh="$ac_aux_dir/$ac_t -c"
5259 break 2
5260 fi
5261 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005262done
5263if test -z "$ac_aux_dir"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005264 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005265fi
5266
5267# These three variables are undocumented and unsupported,
5268# and are intended to be withdrawn in a future Autoconf release.
5269# They can cause serious problems if a builder's source tree is in a directory
5270# whose full name contains unusual characters.
5271ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5272ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5273ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5274
5275
5276# Find a good install program. We prefer a C program (faster),
5277# so one script is as good as another. But avoid the broken or
5278# incompatible versions:
5279# SysV /etc/install, /usr/sbin/install
5280# SunOS /usr/etc/install
5281# IRIX /sbin/install
5282# AIX /bin/install
5283# AmigaOS /C/install, which installs bootblocks on floppy discs
5284# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5285# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5286# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5287# OS/2's system install, which has a completely different semantic
5288# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005289# Reject install programs that cannot install multiple files.
5290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5291$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292if test -z "$INSTALL"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005293if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005294 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295else
5296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5297for as_dir in $PATH
5298do
5299 IFS=$as_save_IFS
5300 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005301 # Account for people who put trailing slashes in PATH elements.
5302case $as_dir/ in #((
5303 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005305 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306 /usr/ucb/* ) ;;
5307 *)
5308 # OSF1 and SCO ODT 3.0 have their own names for install.
5309 # Don't use installbsd from OSF since it installs stuff as root
5310 # by default.
5311 for ac_prog in ginstall scoinst install; do
5312 for ac_exec_ext in '' $ac_executable_extensions; do
5313 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5314 if test $ac_prog = install &&
5315 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5316 # AIX install. It has an incompatible calling convention.
5317 :
5318 elif test $ac_prog = install &&
5319 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5320 # program-specific install script used by HP pwplus--don't use.
5321 :
5322 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005323 rm -rf conftest.one conftest.two conftest.dir
5324 echo one > conftest.one
5325 echo two > conftest.two
5326 mkdir conftest.dir
5327 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5328 test -s conftest.one && test -s conftest.two &&
5329 test -s conftest.dir/conftest.one &&
5330 test -s conftest.dir/conftest.two
5331 then
5332 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5333 break 3
5334 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005335 fi
5336 fi
5337 done
5338 done
5339 ;;
5340esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005341
5342 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343IFS=$as_save_IFS
5344
Matthias Kloseb9621712010-04-24 17:59:49 +00005345rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005346
5347fi
5348 if test "${ac_cv_path_install+set}" = set; then
5349 INSTALL=$ac_cv_path_install
5350 else
5351 # As a last resort, use the slow shell script. Don't cache a
5352 # value for INSTALL within a source directory, because that will
5353 # break other packages using the cache if that directory is
5354 # removed, or if the value is a relative name.
5355 INSTALL=$ac_install_sh
5356 fi
5357fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5359$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360
5361# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5362# It thinks the first close brace ends the variable substitution.
5363test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5364
5365test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5366
5367test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5368
5369
5370# Not every filesystem supports hard links
5371
5372if test -z "$LN" ; then
5373 case $ac_sys_system in
5374 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375 *) LN=ln;;
5376 esac
5377fi
5378
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005379# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005380
5381ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005382
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5385$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386
5387# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005388if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389 withval=$with_pydebug;
5390if test "$withval" != no
5391then
5392
Matthias Kloseb9621712010-04-24 17:59:49 +00005393$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5396$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005398 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005399else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5400$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401fi
5402else
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405fi
5406
5407
5408# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5409# merged with this chunk of code?
5410
5411# Optimizer/debugger flags
5412# ------------------------
5413# (The following bit of code is complicated enough - please keep things
5414# indented properly. Just pretend you're editing Python code. ;-)
5415
5416# There are two parallel sets of case statements below, one that checks to
5417# see if OPT was set and one that does BASECFLAGS setting based upon
5418# compiler and platform. BASECFLAGS tweaks need to be made even if the
5419# user set OPT.
5420
5421# tweak OPT based on compiler and platform, only if the user didn't set
5422# it on the command line
5423
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005424if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425then
5426 case $GCC in
5427 yes)
5428 if test "$CC" != 'g++' ; then
5429 STRICT_PROTO="-Wstrict-prototypes"
5430 fi
5431 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5432 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5433 WRAP="-fwrapv"
5434 fi
5435 case $ac_cv_prog_cc_g in
5436 yes)
5437 if test "$Py_DEBUG" = 'true' ; then
5438 # Optimization messes up debuggers, so turn it off for
5439 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005440 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441 else
5442 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5443 fi
5444 ;;
5445 *)
5446 OPT="-O3 -Wall $STRICT_PROTO"
5447 ;;
5448 esac
5449 case $ac_sys_system in
5450 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5451 ;;
5452 esac
5453 ;;
5454
5455 *)
5456 OPT="-O"
5457 ;;
5458 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459fi
5460
5461
5462
5463# The -arch flags for universal builds on OSX
5464UNIVERSAL_ARCH_FLAGS=
5465
5466
5467# tweak BASECFLAGS based on compiler and platform
5468case $GCC in
5469yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005470 # Python doesn't violate C99 aliasing rules, but older versions of
5471 # GCC produce warnings for legal Python code. Enable
5472 # -fno-strict-aliasing on versions of GCC that support but produce
5473 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5475$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476 ac_save_cc="$CC"
5477 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005478 save_CFLAGS="$CFLAGS"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005479 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005480 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005481else
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005483/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005484
Matthias Kloseb159a552010-04-25 21:00:44 +00005485
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005486int
5487main ()
5488{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005489
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005490 ;
5491 return 0;
5492}
Matthias Kloseb159a552010-04-25 21:00:44 +00005493
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005495if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005496
5497 CC="$ac_save_cc -fstrict-aliasing"
5498 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005500/* end confdefs.h. */
5501
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005502 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005503int
5504main ()
5505{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005506double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005507 ;
5508 return 0;
5509}
Matthias Kloseb159a552010-04-25 21:00:44 +00005510
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005512if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005513
5514 ac_cv_no_strict_aliasing=no
5515
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516else
Matthias Kloseb159a552010-04-25 21:00:44 +00005517
5518 ac_cv_no_strict_aliasing=yes
5519
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005520fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005522
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005523else
Matthias Kloseb159a552010-04-25 21:00:44 +00005524
5525 ac_cv_no_strict_aliasing=no
5526
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005529fi
5530
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005531 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5534$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005535 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536 then
5537 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5538 fi
5539
5540 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5541 # support. Without this, treatment of subnormals doesn't follow
5542 # the standard.
5543 case $ac_sys_machine in
5544 alpha*)
5545 BASECFLAGS="$BASECFLAGS -mieee"
5546 ;;
5547 esac
5548
5549 case $ac_sys_system in
5550 SCO_SV*)
5551 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5552 ;;
5553 # is there any other compiler on Darwin besides gcc?
5554 Darwin*)
5555 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5556 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005557 if test "${CC}" = gcc
5558 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5560$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005561 case "${UNIVERSALSDK}" in
5562 */MacOSX10.4u.sdk)
5563 # Build using 10.4 SDK, force usage of gcc when the
5564 # compiler is gcc, otherwise the user will get very
5565 # confusing error messages when building on OSX 10.6
5566 CC=gcc-4.0
5567 CPP=cpp-4.0
5568 ;;
5569 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5571$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005572 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573
5574
5575 if test "${enable_universalsdk}"; then
5576 UNIVERSAL_ARCH_FLAGS=""
5577 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5578 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5579 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005580 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5582 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005583 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005584 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585
5586 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5587 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005588 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005589 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005591 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5592 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005593 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005594 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005595
5596 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5597 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005598 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005599 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005600
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601 else
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005602 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 +00005603
5604 fi
5605
5606
Ronald Oussoren666028b2010-04-18 19:07:43 +00005607 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5608 if test "${UNIVERSALSDK}" != "/"
5609 then
5610 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5611 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005612 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 fi
5614 fi
5615
5616 # Calculate the right deployment target for this build.
5617 #
5618 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5619 if test ${cur_target} '>' 10.2; then
5620 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005621 if test ${enable_universalsdk}; then
5622 if test "${UNIVERSAL_ARCHS}" = "all"; then
5623 # Ensure that the default platform for a
5624 # 4-way universal build is OSX 10.5,
5625 # that's the first OS release where
5626 # 4-way builds make sense.
5627 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005628
5629 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5630 cur_target='10.5'
5631
5632 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5633 cur_target='10.5'
5634
5635 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5636 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005637 fi
5638 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005639 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005640 # On Intel macs default to a deployment
5641 # target of 10.4, that's the first OSX
5642 # release with Intel support.
5643 cur_target="10.4"
5644 fi
5645 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646 fi
5647 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5648
5649 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5650 # environment with a value that is the same as what we'll use
5651 # in the Makefile to ensure that we'll get the same compiler
5652 # environment during configure and build time.
5653 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5654 export MACOSX_DEPLOYMENT_TARGET
5655 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5656
5657 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 esac
5659 ;;
5660
5661*)
5662 case $ac_sys_system in
5663 OpenUNIX*|UnixWare*)
5664 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5665 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 SCO_SV*)
5667 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5668 ;;
5669 esac
5670 ;;
5671esac
5672
5673if test "$Py_DEBUG" = 'true'; then
5674 :
5675else
5676 OPT="-DNDEBUG $OPT"
5677fi
5678
5679if test "$ac_arch_flags"
5680then
5681 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5682fi
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684# Check whether GCC supports PyArg_ParseTuple format
5685if test "$GCC" = "yes"
5686then
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5688$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 save_CFLAGS=$CFLAGS
5690 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692/* end confdefs.h. */
5693
5694 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695int
5696main ()
5697{
5698
5699 ;
5700 return 0;
5701}
Matthias Kloseb159a552010-04-25 21:00:44 +00005702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005704if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705
Matthias Kloseb159a552010-04-25 21:00:44 +00005706
Matthias Kloseb9621712010-04-24 17:59:49 +00005707$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
Matthias Kloseb159a552010-04-25 21:00:44 +00005709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005710$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712else
Matthias Kloseb159a552010-04-25 21:00:44 +00005713
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005715$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5719 CFLAGS=$save_CFLAGS
5720fi
5721
5722# On some compilers, pthreads are available without further options
5723# (e.g. MacOS X). On some of these systems, the compiler will not
5724# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5725# So we have to see first whether pthreads are available without
5726# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5728$as_echo_n "checking whether pthreads are available without options... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005729if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731else
Matthias Kloseb9621712010-04-24 17:59:49 +00005732 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 ac_cv_pthread_is_default=no
5734else
Matthias Kloseb9621712010-04-24 17:59:49 +00005735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736/* end confdefs.h. */
5737
5738#include <pthread.h>
5739
5740void* routine(void* p){return NULL;}
5741
5742int main(){
5743 pthread_t p;
5744 if(pthread_create(&p,NULL,routine,NULL)!=0)
5745 return 1;
5746 (void)pthread_detach(p);
5747 return 0;
5748}
5749
5750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005751if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753 ac_cv_pthread_is_default=yes
5754 ac_cv_kthread=no
5755 ac_cv_pthread=no
5756
5757else
Matthias Kloseb9621712010-04-24 17:59:49 +00005758 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762fi
5763
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
5766
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5768$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770
5771if test $ac_cv_pthread_is_default = yes
5772then
5773 ac_cv_kpthread=no
5774else
5775# -Kpthread, if available, provides the right #defines
5776# and linker options to make pthread_create available
5777# Some compilers won't report that they do not support -Kpthread,
5778# so we need to run a program to see whether it really made the
5779# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5781$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005782if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005783 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784else
5785 ac_save_cc="$CC"
5786CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005787if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 ac_cv_kpthread=no
5789else
Matthias Kloseb9621712010-04-24 17:59:49 +00005790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791/* end confdefs.h. */
5792
5793#include <pthread.h>
5794
5795void* routine(void* p){return NULL;}
5796
5797int main(){
5798 pthread_t p;
5799 if(pthread_create(&p,NULL,routine,NULL)!=0)
5800 return 1;
5801 (void)pthread_detach(p);
5802 return 0;
5803}
5804
5805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005806if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 ac_cv_kpthread=yes
5808else
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813fi
5814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815CC="$ac_save_cc"
5816fi
5817
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5819$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820fi
5821
5822if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5823then
5824# -Kthread, if available, provides the right #defines
5825# and linker options to make pthread_create available
5826# Some compilers won't report that they do not support -Kthread,
5827# so we need to run a program to see whether it really made the
5828# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5830$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005831if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005832 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833else
5834 ac_save_cc="$CC"
5835CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005836if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 ac_cv_kthread=no
5838else
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840/* end confdefs.h. */
5841
5842#include <pthread.h>
5843
5844void* routine(void* p){return NULL;}
5845
5846int main(){
5847 pthread_t p;
5848 if(pthread_create(&p,NULL,routine,NULL)!=0)
5849 return 1;
5850 (void)pthread_detach(p);
5851 return 0;
5852}
5853
5854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005855if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856 ac_cv_kthread=yes
5857else
Matthias Kloseb9621712010-04-24 17:59:49 +00005858 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862fi
5863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864CC="$ac_save_cc"
5865fi
5866
Matthias Kloseb9621712010-04-24 17:59:49 +00005867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5868$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869fi
5870
5871if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5872then
5873# -pthread, if available, provides the right #defines
5874# and linker options to make pthread_create available
5875# Some compilers won't report that they do not support -pthread,
5876# so we need to run a program to see whether it really made the
5877# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5879$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005880if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005881 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882else
5883 ac_save_cc="$CC"
5884CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005885if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ac_cv_pthread=no
5887else
Matthias Kloseb9621712010-04-24 17:59:49 +00005888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889/* end confdefs.h. */
5890
5891#include <pthread.h>
5892
5893void* routine(void* p){return NULL;}
5894
5895int main(){
5896 pthread_t p;
5897 if(pthread_create(&p,NULL,routine,NULL)!=0)
5898 return 1;
5899 (void)pthread_detach(p);
5900 return 0;
5901}
5902
5903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005904if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ac_cv_pthread=yes
5906else
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911fi
5912
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913CC="$ac_save_cc"
5914fi
5915
Matthias Kloseb9621712010-04-24 17:59:49 +00005916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5917$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918fi
5919
5920# If we have set a CC compiler flag for thread support then
5921# check if it works for CXX, too.
5922ac_cv_cxx_thread=no
5923if test ! -z "$CXX"
5924then
Matthias Kloseb9621712010-04-24 17:59:49 +00005925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5926$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927ac_save_cxx="$CXX"
5928
5929if test "$ac_cv_kpthread" = "yes"
5930then
5931 CXX="$CXX -Kpthread"
5932 ac_cv_cxx_thread=yes
5933elif test "$ac_cv_kthread" = "yes"
5934then
5935 CXX="$CXX -Kthread"
5936 ac_cv_cxx_thread=yes
5937elif test "$ac_cv_pthread" = "yes"
5938then
5939 CXX="$CXX -pthread"
5940 ac_cv_cxx_thread=yes
5941fi
5942
5943if test $ac_cv_cxx_thread = yes
5944then
5945 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5946 $CXX -c conftest.$ac_ext 2>&5
5947 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5948 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5949 then
5950 ac_cv_cxx_thread=yes
5951 else
5952 ac_cv_cxx_thread=no
5953 fi
5954 rm -fr conftest*
5955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5957$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958fi
5959CXX="$ac_save_cxx"
5960
5961
5962# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5964$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005965if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967else
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969/* end confdefs.h. */
5970#include <stdlib.h>
5971#include <stdarg.h>
5972#include <string.h>
5973#include <float.h>
5974
5975int
5976main ()
5977{
5978
5979 ;
5980 return 0;
5981}
5982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005983if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 ac_cv_header_stdc=yes
5985else
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5989
5990if test $ac_cv_header_stdc = yes; then
5991 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993/* end confdefs.h. */
5994#include <string.h>
5995
5996_ACEOF
5997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 $EGREP "memchr" >/dev/null 2>&1; then :
5999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000else
6001 ac_cv_header_stdc=no
6002fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006003rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004
6005fi
6006
6007if test $ac_cv_header_stdc = yes; then
6008 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010/* end confdefs.h. */
6011#include <stdlib.h>
6012
6013_ACEOF
6014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $EGREP "free" >/dev/null 2>&1; then :
6016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017else
6018 ac_cv_header_stdc=no
6019fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006020rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021
6022fi
6023
6024if test $ac_cv_header_stdc = yes; then
6025 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027 :
6028else
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030/* end confdefs.h. */
6031#include <ctype.h>
6032#include <stdlib.h>
6033#if ((' ' & 0x0FF) == 0x020)
6034# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6035# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6036#else
6037# define ISLOWER(c) \
6038 (('a' <= (c) && (c) <= 'i') \
6039 || ('j' <= (c) && (c) <= 'r') \
6040 || ('s' <= (c) && (c) <= 'z'))
6041# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6042#endif
6043
6044#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6045int
6046main ()
6047{
6048 int i;
6049 for (i = 0; i < 256; i++)
6050 if (XOR (islower (i), ISLOWER (i))
6051 || toupper (i) != TOUPPER (i))
6052 return 2;
6053 return 0;
6054}
6055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006056if ac_fn_c_try_run "$LINENO"; then :
6057
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058else
Matthias Kloseb9621712010-04-24 17:59:49 +00006059 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6062 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063fi
6064
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065fi
6066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6068$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069if test $ac_cv_header_stdc = yes; then
6070
Matthias Kloseb9621712010-04-24 17:59:49 +00006071$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072
6073fi
6074
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006075for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6076fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006077ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006078shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006079unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006080sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6081sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006082sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6083sys/stat.h sys/termio.h sys/time.h \
6084sys/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 -07006085libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006086bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006087do :
6088 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6089ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006090eval as_val=\$$as_ac_Header
6091 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006092 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006093#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006094_ACEOF
6095
6096fi
6097
Guido van Rossum627b2d71993-12-24 10:39:16 +00006098done
6099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006100ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006101for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6104$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006105if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006107else
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006109/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006110#include <sys/types.h>
6111#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006112
Martin v. Löwis11437992002-04-12 09:54:03 +00006113int
6114main ()
6115{
6116if ((DIR *) 0)
6117return 0;
6118 ;
6119 return 0;
6120}
6121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006123 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006124else
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006129eval ac_res=\$$as_ac_Header
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6131$as_echo "$ac_res" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006132eval as_val=\$$as_ac_Header
6133 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006134 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006135#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006136_ACEOF
6137
6138ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006139fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006141done
6142# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6143if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6145$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006146if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148else
Martin v. Löwis11437992002-04-12 09:54:03 +00006149 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153/* Override any GCC internal prototype to avoid an error.
6154 Use char because int might match the return type of a GCC
6155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006156#ifdef __cplusplus
6157extern "C"
6158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006159char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006160int
6161main ()
6162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006164 ;
6165 return 0;
6166}
6167_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168for ac_lib in '' dir; do
6169 if test -z "$ac_lib"; then
6170 ac_res="none required"
6171 else
6172 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006173 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006175 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006178rm -f core conftest.err conftest.$ac_objext \
6179 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006180 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006184if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186else
6187 ac_cv_search_opendir=no
6188fi
6189rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006190LIBS=$ac_func_search_save_LIBS
6191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6193$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006194ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006195if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006197
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006198fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006199
Michael W. Hudson54241132001-12-07 15:38:26 +00006200else
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6202$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006203if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006205else
6206 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006209
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210/* Override any GCC internal prototype to avoid an error.
6211 Use char because int might match the return type of a GCC
6212 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006213#ifdef __cplusplus
6214extern "C"
6215#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006216char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006217int
6218main ()
6219{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006220return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006221 ;
6222 return 0;
6223}
6224_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006225for ac_lib in '' x; do
6226 if test -z "$ac_lib"; then
6227 ac_res="none required"
6228 else
6229 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006230 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006231 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006235rm -f core conftest.err conftest.$ac_objext \
6236 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006237 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006241if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006243else
6244 ac_cv_search_opendir=no
6245fi
6246rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006247LIBS=$ac_func_search_save_LIBS
6248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6250$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006252if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006254
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006255fi
6256
6257fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006258
Matthias Kloseb9621712010-04-24 17:59:49 +00006259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6260$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006261if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006262 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263else
Matthias Kloseb9621712010-04-24 17:59:49 +00006264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006265/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267int
6268main ()
6269{
6270return makedev(0, 0);
6271 ;
6272 return 0;
6273}
6274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 ac_cv_header_sys_types_h_makedev=yes
6277else
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006280rm -f core conftest.err conftest.$ac_objext \
6281 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6285$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286
6287if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006288ac_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 -05006289if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006290
Matthias Kloseb9621712010-04-24 17:59:49 +00006291$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293fi
6294
6295
6296
6297 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006298 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 -05006299if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006300
Matthias Kloseb9621712010-04-24 17:59:49 +00006301$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302
6303fi
6304
6305
6306 fi
6307fi
6308
Michael W. Hudson54241132001-12-07 15:38:26 +00006309
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006310# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6311for ac_header in net/if.h
6312do :
6313 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6314#ifdef STDC_HEADERS
6315# include <stdlib.h>
6316# include <stddef.h>
6317#else
6318# ifdef HAVE_STDLIB_H
6319# include <stdlib.h>
6320# endif
6321#endif
6322#ifdef HAVE_SYS_SOCKET_H
6323# include <sys/socket.h>
6324#endif
6325
6326"
6327if test "x$ac_cv_header_net_if_h" = x""yes; then :
6328 cat >>confdefs.h <<_ACEOF
6329#define HAVE_NET_IF_H 1
6330_ACEOF
6331
6332fi
6333
6334done
6335
6336
6337
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006338# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006339for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006340do :
6341 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006342#ifdef HAVE_CURSES_H
6343#include <curses.h>
6344#endif
6345
Matthias Kloseb9621712010-04-24 17:59:49 +00006346"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006347if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006348 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006349#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006350_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006352fi
6353
6354done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006355
6356
Martin v. Löwis11017b12006-01-14 18:12:57 +00006357# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006358for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006359do :
6360 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 +00006361#ifdef HAVE_ASM_TYPES_H
6362#include <asm/types.h>
6363#endif
6364#ifdef HAVE_SYS_SOCKET_H
6365#include <sys/socket.h>
6366#endif
6367
Matthias Kloseb9621712010-04-24 17:59:49 +00006368"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006369if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006370 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006371#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006372_ACEOF
6373
6374fi
6375
6376done
6377
6378
Guido van Rossum627b2d71993-12-24 10:39:16 +00006379# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006380was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6382$as_echo_n "checking for clock_t in time.h... " >&6; }
6383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006384/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006385#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006386
6387_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006389 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006390 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006391else
Martin v. Löwis11437992002-04-12 09:54:03 +00006392
6393
Matthias Kloseb9621712010-04-24 17:59:49 +00006394$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006395
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006396
Guido van Rossum627b2d71993-12-24 10:39:16 +00006397fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006398rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006399
Matthias Kloseb9621712010-04-24 17:59:49 +00006400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6401$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006402
Matthias Kloseb9621712010-04-24 17:59:49 +00006403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6404$as_echo_n "checking for makedev... " >&6; }
6405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006406/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006407
Jesus Cea740f53a2010-04-28 11:35:30 +00006408#if defined(MAJOR_IN_MKDEV)
6409#include <sys/mkdev.h>
6410#elif defined(MAJOR_IN_SYSMACROS)
6411#include <sys/sysmacros.h>
6412#else
6413#include <sys/types.h>
6414#endif
6415
Neal Norwitz11690112002-07-30 01:08:28 +00006416int
6417main ()
6418{
Jesus Cea740f53a2010-04-28 11:35:30 +00006419
6420 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006421 ;
6422 return 0;
6423}
Matthias Kloseb159a552010-04-25 21:00:44 +00006424
Neal Norwitz11690112002-07-30 01:08:28 +00006425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006426if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006427 ac_cv_has_makedev=yes
6428else
Matthias Kloseb9621712010-04-24 17:59:49 +00006429 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006431rm -f core conftest.err conftest.$ac_objext \
6432 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6434$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006435if test "$ac_cv_has_makedev" = "yes"; then
6436
Matthias Kloseb9621712010-04-24 17:59:49 +00006437$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006438
6439fi
6440
Martin v. Löwis399a6892002-10-04 10:22:02 +00006441# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6442# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6443# defined, but the compiler does not support pragma redefine_extname,
6444# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6445# structures (such as rlimit64) without declaring them. As a
6446# work-around, disable LFS on such configurations
6447
6448use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6450$as_echo_n "checking Solaris LFS bug... " >&6; }
6451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006452/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006453
6454#define _LARGEFILE_SOURCE 1
6455#define _FILE_OFFSET_BITS 64
6456#include <sys/resource.h>
6457
Martin v. Löwis399a6892002-10-04 10:22:02 +00006458int
6459main ()
6460{
6461struct rlimit foo;
6462 ;
6463 return 0;
6464}
6465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006466if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006467 sol_lfs_bug=no
6468else
Matthias Kloseb9621712010-04-24 17:59:49 +00006469 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6473$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474if test "$sol_lfs_bug" = "yes"; then
6475 use_lfs=no
6476fi
6477
6478if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006479# Two defines needed to enable largefile support on various platforms
6480# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006481case $ac_sys_system/$ac_sys_release in
6482AIX*)
6483
6484$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6485
6486 ;;
6487esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006488
Matthias Kloseb9621712010-04-24 17:59:49 +00006489$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006490
6491
Matthias Kloseb9621712010-04-24 17:59:49 +00006492$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006493
Martin v. Löwis399a6892002-10-04 10:22:02 +00006494fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006495
Guido van Rossum84e7b241996-08-19 21:59:00 +00006496# Add some code to confdefs.h so that the test for off_t works on SCO
6497cat >> confdefs.h <<\EOF
6498#if defined(SCO_DS)
6499#undef _OFF_T
6500#endif
6501EOF
6502
Guido van Rossumef2255b2000-03-10 22:30:29 +00006503# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006504ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006505if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507else
Martin v. Löwis11437992002-04-12 09:54:03 +00006508
6509cat >>confdefs.h <<_ACEOF
6510#define mode_t int
6511_ACEOF
6512
6513fi
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006516if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006517
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006518else
Martin v. Löwis11437992002-04-12 09:54:03 +00006519
6520cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006521#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006522_ACEOF
6523
6524fi
6525
Matthias Kloseb9621712010-04-24 17:59:49 +00006526ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006527if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006528
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006529else
Martin v. Löwis11437992002-04-12 09:54:03 +00006530
6531cat >>confdefs.h <<_ACEOF
6532#define pid_t int
6533_ACEOF
6534
6535fi
6536
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006537
Martin v. Löwis11437992002-04-12 09:54:03 +00006538cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006539#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006540_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006541
Matthias Kloseb9621712010-04-24 17:59:49 +00006542ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006543if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006545else
Martin v. Löwis11437992002-04-12 09:54:03 +00006546
6547cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006548#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006549_ACEOF
6550
6551fi
6552
Matthias Kloseb9621712010-04-24 17:59:49 +00006553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6554$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006555if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006556 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006557else
Matthias Kloseb9621712010-04-24 17:59:49 +00006558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006559/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006560#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006561
6562_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006564 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006565 ac_cv_type_uid_t=yes
6566else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567 ac_cv_type_uid_t=no
6568fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006569rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006570
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6573$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006574if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006575
Matthias Kloseb9621712010-04-24 17:59:49 +00006576$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006577
6578
Matthias Kloseb9621712010-04-24 17:59:49 +00006579$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006580
6581fi
6582
Matthias Kloseb9621712010-04-24 17:59:49 +00006583ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6584case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006585 no|yes) ;; #(
6586 *)
6587
Matthias Kloseb9621712010-04-24 17:59:49 +00006588$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006589
6590
6591cat >>confdefs.h <<_ACEOF
6592#define uint32_t $ac_cv_c_uint32_t
6593_ACEOF
6594;;
6595 esac
6596
Matthias Kloseb9621712010-04-24 17:59:49 +00006597ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6598case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006599 no|yes) ;; #(
6600 *)
6601
Matthias Kloseb9621712010-04-24 17:59:49 +00006602$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006603
6604
6605cat >>confdefs.h <<_ACEOF
6606#define uint64_t $ac_cv_c_uint64_t
6607_ACEOF
6608;;
6609 esac
6610
Matthias Kloseb9621712010-04-24 17:59:49 +00006611ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6612case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006613 no|yes) ;; #(
6614 *)
6615
6616cat >>confdefs.h <<_ACEOF
6617#define int32_t $ac_cv_c_int32_t
6618_ACEOF
6619;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006620esac
6621
Matthias Kloseb9621712010-04-24 17:59:49 +00006622ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6623case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006624 no|yes) ;; #(
6625 *)
6626
6627cat >>confdefs.h <<_ACEOF
6628#define int64_t $ac_cv_c_int64_t
6629_ACEOF
6630;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006631esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006632
Matthias Kloseb9621712010-04-24 17:59:49 +00006633ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006634if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006635
Matthias Kloseb9621712010-04-24 17:59:49 +00006636$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006637
6638fi
6639
Jack Jansendd19cf82001-12-06 22:36:17 +00006640
Michael W. Hudson54241132001-12-07 15:38:26 +00006641# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006642# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006643# The cast to long int works around a bug in the HP C Compiler
6644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6646# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6648$as_echo_n "checking size of int... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006649if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006650 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006651else
Matthias Kloseb9621712010-04-24 17:59:49 +00006652 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 +00006653
Martin v. Löwis11437992002-04-12 09:54:03 +00006654else
Matthias Kloseb9621712010-04-24 17:59:49 +00006655 if test "$ac_cv_type_int" = yes; then
6656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006658{ as_fn_set_status 77
6659as_fn_error "cannot compute sizeof (int)
6660See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006661 else
6662 ac_cv_sizeof_int=0
6663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6668$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006669
6670
6671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006673#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006674_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006675
6676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006677# The cast to long int works around a bug in the HP C Compiler
6678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6680# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6682$as_echo_n "checking size of long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006683if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006685else
Matthias Kloseb9621712010-04-24 17:59:49 +00006686 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 +00006687
Martin v. Löwis11437992002-04-12 09:54:03 +00006688else
Matthias Kloseb9621712010-04-24 17:59:49 +00006689 if test "$ac_cv_type_long" = yes; then
6690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006692{ as_fn_set_status 77
6693as_fn_error "cannot compute sizeof (long)
6694See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006695 else
6696 ac_cv_sizeof_long=0
6697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6702$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006703
6704
6705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006707#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006708_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006709
6710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711# The cast to long int works around a bug in the HP C Compiler
6712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6716$as_echo_n "checking size of void *... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006717if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006719else
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 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 +00006721
Martin v. Löwis11437992002-04-12 09:54:03 +00006722else
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 if test "$ac_cv_type_void_p" = yes; then
6724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006726{ as_fn_set_status 77
6727as_fn_error "cannot compute sizeof (void *)
6728See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006729 else
6730 ac_cv_sizeof_void_p=0
6731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6736$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006737
6738
6739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006741#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006742_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006743
6744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745# The cast to long int works around a bug in the HP C Compiler
6746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6748# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6750$as_echo_n "checking size of short... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006751if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006752 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006753else
Matthias Kloseb9621712010-04-24 17:59:49 +00006754 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756else
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 if test "$ac_cv_type_short" = yes; then
6758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006760{ as_fn_set_status 77
6761as_fn_error "cannot compute sizeof (short)
6762See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006763 else
6764 ac_cv_sizeof_short=0
6765 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006767
Martin v. Löwis11437992002-04-12 09:54:03 +00006768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6770$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771
6772
6773
Martin v. Löwis11437992002-04-12 09:54:03 +00006774cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006775#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006776_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006777
6778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006779# The cast to long int works around a bug in the HP C Compiler
6780# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6781# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6782# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6784$as_echo_n "checking size of float... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006785if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006787else
Matthias Kloseb9621712010-04-24 17:59:49 +00006788 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 +00006789
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 if test "$ac_cv_type_float" = yes; then
6792 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006794{ as_fn_set_status 77
6795as_fn_error "cannot compute sizeof (float)
6796See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006797 else
6798 ac_cv_sizeof_float=0
6799 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6804$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006805
6806
6807
Martin v. Löwis11437992002-04-12 09:54:03 +00006808cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006809#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006810_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811
6812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006813# The cast to long int works around a bug in the HP C Compiler
6814# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6815# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6816# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6818$as_echo_n "checking size of double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006819if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006820 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006821else
Matthias Kloseb9621712010-04-24 17:59:49 +00006822 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 +00006823
Martin v. Löwis11437992002-04-12 09:54:03 +00006824else
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 if test "$ac_cv_type_double" = yes; then
6826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006828{ as_fn_set_status 77
6829as_fn_error "cannot compute sizeof (double)
6830See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006831 else
6832 ac_cv_sizeof_double=0
6833 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006835
Martin v. Löwis11437992002-04-12 09:54:03 +00006836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6838$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006839
6840
6841
Martin v. Löwis11437992002-04-12 09:54:03 +00006842cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006843#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006844_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006845
6846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847# The cast to long int works around a bug in the HP C Compiler
6848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6850# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6852$as_echo_n "checking size of fpos_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006853if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006854 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006855else
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 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 +00006857
Martin v. Löwis11437992002-04-12 09:54:03 +00006858else
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 if test "$ac_cv_type_fpos_t" = yes; then
6860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006862{ as_fn_set_status 77
6863as_fn_error "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;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006896{ as_fn_set_status 77
6897as_fn_error "cannot compute sizeof (size_t)
6898See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006899 else
6900 ac_cv_sizeof_size_t=0
6901 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006903
Martin v. Löwis18e16552006-02-15 17:27:45 +00006904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6906$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907
6908
6909
Martin v. Löwis18e16552006-02-15 17:27:45 +00006910cat >>confdefs.h <<_ACEOF
6911#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6912_ACEOF
6913
6914
Christian Heimes400adb02008-02-01 08:12:03 +00006915# The cast to long int works around a bug in the HP C Compiler
6916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6918# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6920$as_echo_n "checking size of pid_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006921if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006922 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006923else
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 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 +00006925
Christian Heimes400adb02008-02-01 08:12:03 +00006926else
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 if test "$ac_cv_type_pid_t" = yes; then
6928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006930{ as_fn_set_status 77
6931as_fn_error "cannot compute sizeof (pid_t)
6932See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006933 else
6934 ac_cv_sizeof_pid_t=0
6935 fi
6936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006937
Christian Heimes400adb02008-02-01 08:12:03 +00006938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6940$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006941
6942
6943
6944cat >>confdefs.h <<_ACEOF
6945#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6946_ACEOF
6947
6948
Michael W. Hudson54241132001-12-07 15:38:26 +00006949
Matthias Kloseb9621712010-04-24 17:59:49 +00006950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6951$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006952have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006954/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006955
Martin v. Löwis11437992002-04-12 09:54:03 +00006956int
6957main ()
6958{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006959long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 ;
6961 return 0;
6962}
6963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006964if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006965
6966
Matthias Kloseb9621712010-04-24 17:59:49 +00006967$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006968
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006969 have_long_long=yes
6970
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6974$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006975if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976# The cast to long int works around a bug in the HP C Compiler
6977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6979# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6981$as_echo_n "checking size of long long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006982if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006984else
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 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 +00006986
Martin v. Löwis11437992002-04-12 09:54:03 +00006987else
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 if test "$ac_cv_type_long_long" = yes; then
6989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006991{ as_fn_set_status 77
6992as_fn_error "cannot compute sizeof (long long)
6993See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006994 else
6995 ac_cv_sizeof_long_long=0
6996 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006998
Martin v. Löwis11437992002-04-12 09:54:03 +00006999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7001$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002
7003
7004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007006#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007007_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007008
Michael W. Hudson54241132001-12-07 15:38:26 +00007009
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007010fi
7011
Matthias Kloseb9621712010-04-24 17:59:49 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7013$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007014have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007016/* end confdefs.h. */
7017
7018int
7019main ()
7020{
7021long double x; x = (long double)0;
7022 ;
7023 return 0;
7024}
7025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007026if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007027
7028
Matthias Kloseb9621712010-04-24 17:59:49 +00007029$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007030
7031 have_long_double=yes
7032
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007033fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7036$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007037if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007038# The cast to long int works around a bug in the HP C Compiler
7039# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7040# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7041# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7043$as_echo_n "checking size of long double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007044if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 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 +00007048
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007049else
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 if test "$ac_cv_type_long_double" = yes; then
7051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007053{ as_fn_set_status 77
7054as_fn_error "cannot compute sizeof (long double)
7055See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007056 else
7057 ac_cv_sizeof_long_double=0
7058 fi
7059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007060
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7063$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007064
7065
7066
7067cat >>confdefs.h <<_ACEOF
7068#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7069_ACEOF
7070
7071
7072fi
7073
7074
Matthias Kloseb9621712010-04-24 17:59:49 +00007075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7076$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007077have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007079/* end confdefs.h. */
7080
7081int
7082main ()
7083{
7084_Bool x; x = (_Bool)0;
7085 ;
7086 return 0;
7087}
7088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007089if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007090
7091
Matthias Kloseb9621712010-04-24 17:59:49 +00007092$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007093
7094 have_c99_bool=yes
7095
Thomas Woutersb2137042007-02-01 18:02:27 +00007096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7099$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007100if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101# The cast to long int works around a bug in the HP C Compiler
7102# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7103# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7104# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7106$as_echo_n "checking size of _Bool... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007107if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007109else
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 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 +00007111
Thomas Woutersb2137042007-02-01 18:02:27 +00007112else
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 if test "$ac_cv_type__Bool" = yes; then
7114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007116{ as_fn_set_status 77
7117as_fn_error "cannot compute sizeof (_Bool)
7118See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007119 else
7120 ac_cv_sizeof__Bool=0
7121 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007123
Thomas Woutersb2137042007-02-01 18:02:27 +00007124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7126$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007127
7128
7129
Thomas Woutersb2137042007-02-01 18:02:27 +00007130cat >>confdefs.h <<_ACEOF
7131#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7132_ACEOF
7133
7134
7135fi
7136
Matthias Kloseb9621712010-04-24 17:59:49 +00007137ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007138 #include <stdint.h>
7139 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007140 #ifdef HAVE_INTTYPES_H
7141 #include <inttypes.h>
7142 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007143"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007144if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007145
7146cat >>confdefs.h <<_ACEOF
7147#define HAVE_UINTPTR_T 1
7148_ACEOF
7149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007150# The cast to long int works around a bug in the HP C Compiler
7151# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7152# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7153# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7155$as_echo_n "checking size of uintptr_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007156if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007158else
Matthias Kloseb9621712010-04-24 17:59:49 +00007159 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 +00007160
Martin v. Löwis11437992002-04-12 09:54:03 +00007161else
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 if test "$ac_cv_type_uintptr_t" = yes; then
7163 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7164$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007165{ as_fn_set_status 77
7166as_fn_error "cannot compute sizeof (uintptr_t)
7167See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007168 else
7169 ac_cv_sizeof_uintptr_t=0
7170 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007171fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007172
Martin v. Löwis11437992002-04-12 09:54:03 +00007173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7175$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007176
7177
7178
Martin v. Löwis11437992002-04-12 09:54:03 +00007179cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007180#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007181_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007182
Michael W. Hudson54241132001-12-07 15:38:26 +00007183
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007184fi
7185
Thomas Wouters89f507f2006-12-13 04:49:30 +00007186
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187# The cast to long int works around a bug in the HP C Compiler
7188# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7189# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7190# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7192$as_echo_n "checking size of off_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007193if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007194 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007195else
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197#ifdef HAVE_SYS_TYPES_H
7198#include <sys/types.h>
7199#endif
7200
Matthias Kloseb9621712010-04-24 17:59:49 +00007201"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203else
Matthias Kloseb9621712010-04-24 17:59:49 +00007204 if test "$ac_cv_type_off_t" = yes; then
7205 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007207{ as_fn_set_status 77
7208as_fn_error "cannot compute sizeof (off_t)
7209See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007210 else
7211 ac_cv_sizeof_off_t=0
7212 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007214
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7217$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219
7220
Martin v. Löwis11437992002-04-12 09:54:03 +00007221cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007222#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007223_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007224
Michael W. Hudson54241132001-12-07 15:38:26 +00007225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226
Matthias Kloseb9621712010-04-24 17:59:49 +00007227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7228$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007229if test "$have_long_long" = yes
7230then
7231if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007232 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007233
Matthias Kloseb9621712010-04-24 17:59:49 +00007234$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007235
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7237$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007238else
Matthias Kloseb9621712010-04-24 17:59:49 +00007239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007241fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007242else
Matthias Kloseb9621712010-04-24 17:59:49 +00007243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007245fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007247# The cast to long int works around a bug in the HP C Compiler
7248# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7249# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7250# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7252$as_echo_n "checking size of time_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007253if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007254 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007255else
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007257#ifdef HAVE_SYS_TYPES_H
7258#include <sys/types.h>
7259#endif
7260#ifdef HAVE_TIME_H
7261#include <time.h>
7262#endif
7263
Matthias Kloseb9621712010-04-24 17:59:49 +00007264"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266else
Matthias Kloseb9621712010-04-24 17:59:49 +00007267 if test "$ac_cv_type_time_t" = yes; then
7268 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007270{ as_fn_set_status 77
7271as_fn_error "cannot compute sizeof (time_t)
7272See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007273 else
7274 ac_cv_sizeof_time_t=0
7275 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007277
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7280$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007282
7283
Martin v. Löwis11437992002-04-12 09:54:03 +00007284cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007285#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007286_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007287
Michael W. Hudson54241132001-12-07 15:38:26 +00007288
7289
Trent Mick635f6fb2000-08-23 21:33:05 +00007290# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007291ac_save_cc="$CC"
7292if test "$ac_cv_kpthread" = "yes"
7293then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007294elif test "$ac_cv_kthread" = "yes"
7295then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007296elif test "$ac_cv_pthread" = "yes"
7297then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007298fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7301$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007302have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007304/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007305
7306 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007307int
7308main ()
7309{
Guido van Rossum12580492000-09-24 16:47:19 +00007310pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007311 ;
7312 return 0;
7313}
Matthias Kloseb159a552010-04-25 21:00:44 +00007314
Martin v. Löwis11437992002-04-12 09:54:03 +00007315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007316if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007317 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7321$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007322if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7326# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7328$as_echo_n "checking size of pthread_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007329if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007333#ifdef HAVE_PTHREAD_H
7334#include <pthread.h>
7335#endif
7336
Matthias Kloseb9621712010-04-24 17:59:49 +00007337"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007339else
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 if test "$ac_cv_type_pthread_t" = yes; then
7341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007343{ as_fn_set_status 77
7344as_fn_error "cannot compute sizeof (pthread_t)
7345See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007346 else
7347 ac_cv_sizeof_pthread_t=0
7348 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007350
Trent Mick635f6fb2000-08-23 21:33:05 +00007351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7353$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007355
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007358#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007359_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007361
Trent Mick635f6fb2000-08-23 21:33:05 +00007362fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007363CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007364
Michael W. Hudson54241132001-12-07 15:38:26 +00007365
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007366case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007367 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007368 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7369 ;;
7370 Darwin/*)
7371 OTHER_LIBTOOL_OPT=""
7372 ;;
7373esac
7374
7375
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007376ARCH_RUN_32BIT=""
7377
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007378case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007379 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007380 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7381 if test "${enable_universalsdk}"; then
7382 :
7383 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007384 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007385 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007386 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007387 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007388 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007389 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007390 if test ${gcc_version} '<' 4.0
7391 then
7392 LIBTOOL_CRUFT="-lcc_dynamic"
7393 else
7394 LIBTOOL_CRUFT=""
7395 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007397 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007398else
Matthias Kloseb9621712010-04-24 17:59:49 +00007399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007400/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007401
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007402 #include <unistd.h>
7403 int main(int argc, char*argv[])
7404 {
7405 if (sizeof(long) == 4) {
7406 return 0;
7407 } else {
7408 return 1;
7409 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007410 }
7411
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007413if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007414 ac_osx_32bit=yes
7415else
Matthias Kloseb9621712010-04-24 17:59:49 +00007416 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007420fi
7421
7422
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007423 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007424 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007425 i386)
7426 MACOSX_DEFAULT_ARCH="i386"
7427 ;;
7428 ppc)
7429 MACOSX_DEFAULT_ARCH="ppc"
7430 ;;
7431 *)
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007432 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007433 ;;
7434 esac
7435 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007436 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007437 i386)
7438 MACOSX_DEFAULT_ARCH="x86_64"
7439 ;;
7440 ppc)
7441 MACOSX_DEFAULT_ARCH="ppc64"
7442 ;;
7443 *)
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007444 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007445 ;;
7446 esac
7447
7448 #ARCH_RUN_32BIT="true"
7449 fi
7450
7451 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007453 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007454esac
7455
Matthias Kloseb9621712010-04-24 17:59:49 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7457$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007458if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007459then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007460 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007461 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007462 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7467$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007468 if test $enable_shared = "yes"
7469 then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007470 as_fn_error "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007471 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007475fi
7476
Matthias Kloseb9621712010-04-24 17:59:49 +00007477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7478$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007479case $ac_sys_system/$ac_sys_release in
7480 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007481
Matthias Kloseb9621712010-04-24 17:59:49 +00007482$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7485$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007486 ;;
7487 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007490 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007491esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007492
Guido van Rossum0a516c91994-09-12 10:58:40 +00007493# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007494
Michael W. Hudson54241132001-12-07 15:38:26 +00007495
7496
7497
7498
Benjamin Peterson99f03762010-04-11 22:15:28 +00007499
Thomas Wouters477c8d52006-05-27 19:21:47 +00007500
Georg Brandlb1441c72009-01-03 22:33:39 +00007501
Thomas Wouters477c8d52006-05-27 19:21:47 +00007502cat >>confdefs.h <<_ACEOF
7503#define SHLIB_EXT "$SO"
7504_ACEOF
7505
Guido van Rossum0a516c91994-09-12 10:58:40 +00007506# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007507# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007508# (Shared libraries in this instance are shared modules to be loaded into
7509# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7511$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007512if test -z "$LDSHARED"
7513then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007514 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007515 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007516 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007517 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007518 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007519 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007520 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007521 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007522 if test "$GCC" = "yes" ; then
7523 LDSHARED='$(CC) -shared'
7524 LDCXXSHARED='$(CXX) -shared'
7525 else
7526 LDSHARED='$(CC) -G'
7527 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007528 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007529 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 if test "$GCC" = "yes" ; then
7531 LDSHARED='$(CC) -shared'
7532 LDCXXSHARED='$(CXX) -shared'
7533 else
7534 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007535 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007536 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007537 LDSHARED='$(CC) -bundle'
7538 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007539 if test "$enable_framework" ; then
7540 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007541 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7542 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007543 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007544 else
7545 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007546 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007548 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007549 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007550 LDSHARED='$(CC) -bundle'
7551 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007552 if test "$enable_framework" ; then
7553 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007554 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7555 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007556 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007557 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007558 # No framework, use the Python app as bundle-loader
7559 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007560 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007562 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007563 Darwin/*)
7564 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7565 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007566
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007567 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007568 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007569 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007570 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007571 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007572 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7573 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007574 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007575 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007576 LDSHARED='$(CC) -bundle'
7577 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007578 if test "$enable_framework" ; then
7579 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007580 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7581 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007582 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007583 else
7584 # No framework, use the Python app as bundle-loader
7585 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7586 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007587 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007588 fi
7589 fi
7590 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 Linux*|GNU*|QNX*)
7592 LDSHARED='$(CC) -shared'
7593 LDCXXSHARED='$(CXX) -shared';;
7594 BSD/OS*/4*)
7595 LDSHARED="gcc -shared"
7596 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007597 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007598 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007599 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007600 LDSHARED='$(CC) -shared'
7601 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007602 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007603 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007604 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007605 OpenBSD*)
7606 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7607 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007608 LDSHARED='$(CC) -shared $(CCSHARED)'
7609 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007610 else
7611 case `uname -r` in
7612 [01].* | 2.[0-7] | 2.[0-7].*)
7613 LDSHARED="ld -Bshareable ${LDFLAGS}"
7614 ;;
7615 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007616 LDSHARED='$(CC) -shared $(CCSHARED)'
7617 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007618 ;;
7619 esac
7620 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007621 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007622 LDSHARED='$(CC) -shared'
7623 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007624 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007625 if test "$GCC" = "yes" ; then
7626 LDSHARED='$(CC) -shared'
7627 LDCXXSHARED='$(CXX) -shared'
7628 else
7629 LDSHARED='$(CC) -G'
7630 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007631 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007632 SCO_SV*)
7633 LDSHARED='$(CC) -Wl,-G,-Bexport'
7634 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7635 CYGWIN*)
7636 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7637 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007638 *) LDSHARED="ld";;
7639 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7642$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007643LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007644BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007645# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007646# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7648$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007649if test -z "$CCSHARED"
7650then
Guido van Rossum07397971997-04-29 21:49:50 +00007651 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007652 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007653 then CCSHARED="-fPIC";
7654 elif test `uname -p` = sparc;
7655 then CCSHARED="-xcode=pic32";
7656 else CCSHARED="-Kpic";
7657 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007658 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007659 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007660 else CCSHARED="+z";
7661 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007662 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007663 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007664 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007665 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007666 if test "$GCC" = "yes"
7667 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007668 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007669 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007670 SCO_SV*)
7671 if test "$GCC" = "yes"
7672 then CCSHARED="-fPIC"
7673 else CCSHARED="-Kpic -belf"
7674 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007675 IRIX*/6*) case $CC in
7676 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007677 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007678 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7682$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007683# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007684# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7686$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007687if test -z "$LINKFORSHARED"
7688then
Guido van Rossum07397971997-04-29 21:49:50 +00007689 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007690 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007691 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007692 LINKFORSHARED="-Wl,-E -Wl,+s";;
7693# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007694 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007695 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007696 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007698 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007699 if test "$enable_framework"
7700 then
Jack Jansenda49e192005-01-07 13:08:22 +00007701 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007702 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007703 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007704 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007705 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007706 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007707 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007708 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7709 then
7710 LINKFORSHARED="-Wl,--export-dynamic"
7711 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007712 SunOS/5*) case $CC in
7713 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007714 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007715 then
7716 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007717 fi;;
7718 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007719 CYGWIN*)
7720 if test $enable_shared = "no"
7721 then
7722 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7723 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007724 QNX*)
7725 # -Wl,-E causes the symbols to be added to the dynamic
7726 # symbol table so that they can be found when a module
7727 # is loaded. -N 2048K causes the stack size to be set
7728 # to 2048 kilobytes so that the stack doesn't overflow
7729 # when running test_compile.py.
7730 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007731 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7734$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007735
Michael W. Hudson54241132001-12-07 15:38:26 +00007736
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007737
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7739$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007740if test ! "$LIBRARY" = "$LDLIBRARY"
7741then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007742 case $ac_sys_system in
7743 CYGWIN*)
7744 # Cygwin needs CCSHARED when building extension DLLs
7745 # but not when building the interpreter DLL.
7746 CFLAGSFORSHARED='';;
7747 *)
7748 CFLAGSFORSHARED='$(CCSHARED)'
7749 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7752$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007753
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007754# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7755# library (with --enable-shared).
7756# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007757# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7758# if it is not required, since it creates a dependency of the shared library
7759# to LIBS. This, in turn, means that applications linking the shared libpython
7760# don't need to link LIBS explicitly. The default should be only changed
7761# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007762
Matthias Kloseb9621712010-04-24 17:59:49 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7764$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007765case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007766 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007767 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007768esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7770$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007771
7772
Guido van Rossum627b2d71993-12-24 10:39:16 +00007773# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7775$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007776if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007777 $as_echo_n "(cached) " >&6
7778else
7779 ac_check_lib_save_LIBS=$LIBS
7780LIBS="-lsendfile $LIBS"
7781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7782/* end confdefs.h. */
7783
7784/* Override any GCC internal prototype to avoid an error.
7785 Use char because int might match the return type of a GCC
7786 builtin and then its argument prototype would still apply. */
7787#ifdef __cplusplus
7788extern "C"
7789#endif
7790char sendfile ();
7791int
7792main ()
7793{
7794return sendfile ();
7795 ;
7796 return 0;
7797}
7798_ACEOF
7799if ac_fn_c_try_link "$LINENO"; then :
7800 ac_cv_lib_sendfile_sendfile=yes
7801else
7802 ac_cv_lib_sendfile_sendfile=no
7803fi
7804rm -f core conftest.err conftest.$ac_objext \
7805 conftest$ac_exeext conftest.$ac_ext
7806LIBS=$ac_check_lib_save_LIBS
7807fi
7808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7809$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007810if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007811 cat >>confdefs.h <<_ACEOF
7812#define HAVE_LIBSENDFILE 1
7813_ACEOF
7814
7815 LIBS="-lsendfile $LIBS"
7816
7817fi
7818
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7820$as_echo_n "checking for dlopen in -ldl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007821if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823else
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007825LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829/* Override any GCC internal prototype to avoid an error.
7830 Use char because int might match the return type of a GCC
7831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007832#ifdef __cplusplus
7833extern "C"
7834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007835char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007836int
7837main ()
7838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ;
7841 return 0;
7842}
7843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007846else
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007849rm -f core conftest.err conftest.$ac_objext \
7850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007851LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7854$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007855if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 cat >>confdefs.h <<_ACEOF
7857#define HAVE_LIBDL 1
7858_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007859
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007860 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007861
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007862fi
7863 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7865$as_echo_n "checking for shl_load in -ldld... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007866if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868else
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007870LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874/* Override any GCC internal prototype to avoid an error.
7875 Use char because int might match the return type of a GCC
7876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007877#ifdef __cplusplus
7878extern "C"
7879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007880char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007881int
7882main ()
7883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 ;
7886 return 0;
7887}
7888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894rm -f core conftest.err conftest.$ac_objext \
7895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7899$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007900if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 cat >>confdefs.h <<_ACEOF
7902#define HAVE_LIBDLD 1
7903_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007905 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007906
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007907fi
7908 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007909
Georg Brandlb1441c72009-01-03 22:33:39 +00007910# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007911if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7913$as_echo_n "checking for library containing sem_init... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007914if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007916else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007917 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921/* Override any GCC internal prototype to avoid an error.
7922 Use char because int might match the return type of a GCC
7923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007924#ifdef __cplusplus
7925extern "C"
7926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007927char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ;
7933 return 0;
7934}
7935_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936for ac_lib in '' pthread rt posix4; do
7937 if test -z "$ac_lib"; then
7938 ac_res="none required"
7939 else
7940 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007948 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007952if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954else
7955 ac_cv_search_sem_init=no
7956fi
7957rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007958LIBS=$ac_func_search_save_LIBS
7959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7961$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007963if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007965
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007966fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007967 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007968 # posix4 on Solaris 2.6
7969 # pthread (first!) on Linux
7970fi
7971
Martin v. Löwis19d17342003-06-14 21:03:05 +00007972# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7974$as_echo_n "checking for textdomain in -lintl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007975if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007977else
7978 ac_check_lib_save_LIBS=$LIBS
7979LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007981/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983/* Override any GCC internal prototype to avoid an error.
7984 Use char because int might match the return type of a GCC
7985 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007986#ifdef __cplusplus
7987extern "C"
7988#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007990int
7991main ()
7992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007994 ;
7995 return 0;
7996}
7997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007998if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007999 ac_cv_lib_intl_textdomain=yes
8000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008003rm -f core conftest.err conftest.$ac_objext \
8004 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005LIBS=$ac_check_lib_save_LIBS
8006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8008$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008009if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008012
Brett Cannonc6d936e2009-06-07 20:09:53 +00008013 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008014fi
8015
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008016
8017# checks for system dependent C++ extensions support
8018case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8020$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008022/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008023
Georg Brandl59e87bd2011-02-15 19:48:59 +00008024 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008025int
8026main ()
8027{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008028loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ;
8030 return 0;
8031}
Matthias Kloseb159a552010-04-25 21:00:44 +00008032
Martin v. Löwis11437992002-04-12 09:54:03 +00008033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008034if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008035
Matthias Kloseb159a552010-04-25 21:00:44 +00008036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008038
Matthias Kloseb159a552010-04-25 21:00:44 +00008039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008040$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008041
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008042else
Matthias Kloseb159a552010-04-25 21:00:44 +00008043
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008045$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008046
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048rm -f core conftest.err conftest.$ac_objext \
8049 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008050 *) ;;
8051esac
8052
Guido van Rossum70c7f481998-03-26 18:44:10 +00008053# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8055$as_echo_n "checking for t_open in -lnsl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008056if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008058else
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008060LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064/* Override any GCC internal prototype to avoid an error.
8065 Use char because int might match the return type of a GCC
8066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008067#ifdef __cplusplus
8068extern "C"
8069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008070char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008071int
8072main ()
8073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ;
8076 return 0;
8077}
8078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008081else
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008084rm -f core conftest.err conftest.$ac_objext \
8085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008086LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8089$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008090if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008091 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008092fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008093 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8095$as_echo_n "checking for socket in -lsocket... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008096if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008098else
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008100LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104/* Override any GCC internal prototype to avoid an error.
8105 Use char because int might match the return type of a GCC
8106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107#ifdef __cplusplus
8108extern "C"
8109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008110char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008111int
8112main ()
8113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 ;
8116 return 0;
8117}
8118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008121else
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124rm -f core conftest.err conftest.$ac_objext \
8125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008126LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8129$as_echo "$ac_cv_lib_socket_socket" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008130if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008131 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008132fi
8133 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8136$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008139if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8142$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008143LIBS="$withval $LIBS"
8144
8145else
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8147$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148fi
8149
Guido van Rossum7f43da71994-08-01 12:15:30 +00008150
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008151if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008152 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8153set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008156if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008158else
8159 case $PKG_CONFIG in
8160 [\\/]* | ?:[\\/]*)
8161 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8162 ;;
8163 *)
8164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165for as_dir in $PATH
8166do
8167 IFS=$as_save_IFS
8168 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8171 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008173 break 2
8174 fi
8175done
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008177IFS=$as_save_IFS
8178
8179 ;;
8180esac
8181fi
8182PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8183if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8185$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008186else
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008189fi
8190
8191
8192fi
8193if test -z "$ac_cv_path_PKG_CONFIG"; then
8194 ac_pt_PKG_CONFIG=$PKG_CONFIG
8195 # Extract the first word of "pkg-config", so it can be a program name with args.
8196set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8198$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008199if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008201else
8202 case $ac_pt_PKG_CONFIG in
8203 [\\/]* | ?:[\\/]*)
8204 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8205 ;;
8206 *)
8207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8208for as_dir in $PATH
8209do
8210 IFS=$as_save_IFS
8211 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8214 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008216 break 2
8217 fi
8218done
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008220IFS=$as_save_IFS
8221
8222 ;;
8223esac
8224fi
8225ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8226if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8228$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8231$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008232fi
8233
8234 if test "x$ac_pt_PKG_CONFIG" = x; then
8235 PKG_CONFIG=""
8236 else
8237 case $cross_compiling:$ac_tool_warned in
8238yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008241ac_tool_warned=yes ;;
8242esac
8243 PKG_CONFIG=$ac_pt_PKG_CONFIG
8244 fi
8245else
8246 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8247fi
8248
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008249
8250# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8252$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008253
8254# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008255if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008256 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008257else
8258 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008259fi
8260
8261
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8263$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008264
8265# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8267$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008268
8269# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008270if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008271 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008272else
8273 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008274fi
8275
8276
8277if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008278 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8279else
8280 LIBFFI_INCLUDEDIR=""
8281fi
8282
8283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8285$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008286
Benjamin Peterson076ed002010-10-31 17:11:02 +00008287# Check for support for loadable sqlite extensions
8288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8289$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8290# Check whether --enable-loadable-sqlite-extensions was given.
8291if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8292 enableval=$enable_loadable_sqlite_extensions;
8293else
8294 enable_loadable_sqlite_extensions="no"
8295fi
8296
8297
8298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8299$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8300
Matthias Klose55708cc2009-04-30 08:06:49 +00008301# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8303$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008304
8305# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008306if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008307 withval=$with_dbmliborder;
8308if test x$with_dbmliborder = xyes
8309then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05008310as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008311else
8312 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8313 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8314 then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05008315 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008316 fi
8317 done
8318fi
8319fi
8320
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8322$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008323
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008324# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008325
8326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8328$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008331if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008332 withval=$with_signal_module;
8333fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008334
8335
8336if test -z "$with_signal_module"
8337then with_signal_module="yes"
8338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8340$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008341
8342if test "${with_signal_module}" = "yes"; then
8343 USE_SIGNAL_MODULE=""
8344 SIGNAL_OBJS=""
8345else
8346 USE_SIGNAL_MODULE="#"
8347 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8348fi
8349
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008350# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008351
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008352USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
8356# Templates for things AC_DEFINEd more than once.
8357# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008358
8359
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
8361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8363$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008366if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367 withval=$with_threads;
8368fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008369
8370
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008371# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008373# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008374if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375 withval=$with_thread; with_threads=$with_thread
8376fi
8377
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008378
8379if test -z "$with_threads"
8380then with_threads="yes"
8381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8383$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008384
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008385
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008386if test "$with_threads" = "no"
8387then
8388 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008389elif test "$ac_cv_pthread_is_default" = yes
8390then
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008392
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008393 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008395
8396 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008398elif test "$ac_cv_kpthread" = "yes"
8399then
8400 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008401 if test "$ac_cv_cxx_thread" = "yes"; then
8402 CXX="$CXX -Kpthread"
8403 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008406 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008407 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008408elif test "$ac_cv_kthread" = "yes"
8409then
8410 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008411 if test "$ac_cv_cxx_thread" = "yes"; then
8412 CXX="$CXX -Kthread"
8413 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008415
8416 posix_threads=yes
8417 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008418elif test "$ac_cv_pthread" = "yes"
8419then
8420 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008421 if test "$ac_cv_cxx_thread" = "yes"; then
8422 CXX="$CXX -pthread"
8423 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008425
8426 posix_threads=yes
8427 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008428else
8429 if test ! -z "$with_threads" -a -d "$with_threads"
8430 then LDFLAGS="$LDFLAGS -L$with_threads"
8431 fi
8432 if test ! -z "$withval" -a -d "$withval"
8433 then LDFLAGS="$LDFLAGS -L$withval"
8434 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008435
8436 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008437 # define _POSIX_THREADS in unistd.h. Some apparently don't
8438 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8440$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008442/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008443
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008444#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008445#ifdef _POSIX_THREADS
8446yes
8447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
8449_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008452 unistd_defines_pthreads=yes
8453else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008454 unistd_defines_pthreads=no
8455fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008456rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8459$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008464if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008468
Martin v. Löwis11437992002-04-12 09:54:03 +00008469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008471
8472 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008473 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008474else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 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 -05008477if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008479
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482
Matthias Kloseb9621712010-04-24 17:59:49 +00008483$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008484
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008485 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008486else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008487
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008488 # Just looking for pthread_create in libpthread is not enough:
8489 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8490 # So we really have to include pthread.h, and then link.
8491 _libs=$LIBS
8492 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8494$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008496/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008497#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008498
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008499void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008500int
8501main ()
8502{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008503
8504pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ;
8506 return 0;
8507}
8508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008509if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008510
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8512$as_echo "yes" >&6; }
8513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +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 Rossum02a1c402000-02-25 19:26:31 +00008517else
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008519 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008521if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008523
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008524 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008525 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008526else
Guido van Rossumad678af1998-10-02 14:42:15 +00008527
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8529$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008530if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008532else
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008534LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538/* Override any GCC internal prototype to avoid an error.
8539 Use char because int might match the return type of a GCC
8540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008541#ifdef __cplusplus
8542extern "C"
8543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008544char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008545int
8546main ()
8547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 ;
8550 return 0;
8551}
8552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558rm -f core conftest.err conftest.$ac_objext \
8559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008560LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8563$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008564if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008567 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008568 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008569 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008570else
Greg Steinadf63d62000-07-05 10:38:09 +00008571
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8573$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008574if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008576else
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008578LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582/* Override any GCC internal prototype to avoid an error.
8583 Use char because int might match the return type of a GCC
8584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008585#ifdef __cplusplus
8586extern "C"
8587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008588char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008589int
8590main ()
8591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008593 ;
8594 return 0;
8595}
8596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008599else
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602rm -f core conftest.err conftest.$ac_objext \
8603 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008604LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8607$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008608if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008610
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008611 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008612 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008613 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008614else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008615
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8617$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008618if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008620else
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008622LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626/* Override any GCC internal prototype to avoid an error.
8627 Use char because int might match the return type of a GCC
8628 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008629#ifdef __cplusplus
8630extern "C"
8631#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008632char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008633int
8634main ()
8635{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ;
8638 return 0;
8639}
8640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008641if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008643else
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646rm -f core conftest.err conftest.$ac_objext \
8647 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008648LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8651$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008652if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008654
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008655 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008656 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008657 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008658else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008659
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8661$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008662if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008664else
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008666LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670/* Override any GCC internal prototype to avoid an error.
8671 Use char because int might match the return type of a GCC
8672 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008673#ifdef __cplusplus
8674extern "C"
8675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008676char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008677int
8678main ()
8679{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 ;
8682 return 0;
8683}
8684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008687else
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008692LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8695$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008696if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008698
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008699 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008700 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008701 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008702else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008703
Martin v. Löwis130fb172001-07-19 11:00:41 +00008704 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008705fi
8706
Guido van Rossum627b2d71993-12-24 10:39:16 +00008707
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008708fi
8709
Guido van Rossum0be3e491997-05-22 20:33:33 +00008710fi
8711
Guido van Rossum49545951997-12-02 19:28:29 +00008712fi
8713
Guido van Rossumb93a8621998-05-07 13:27:32 +00008714fi
8715
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008717rm -f core conftest.err conftest.$ac_objext \
8718 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719fi
8720
Martin v. Löwis11437992002-04-12 09:54:03 +00008721
8722fi
8723
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008724
Michael W. Hudson54241132001-12-07 15:38:26 +00008725
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8727$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008728if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008730else
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008732LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736/* Override any GCC internal prototype to avoid an error.
8737 Use char because int might match the return type of a GCC
8738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008739#ifdef __cplusplus
8740extern "C"
8741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008742char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008743int
8744main ()
8745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ;
8748 return 0;
8749}
8750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008751if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008753else
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008756rm -f core conftest.err conftest.$ac_objext \
8757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008758LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8761$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008762if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008764
Martin v. Löwis130fb172001-07-19 11:00:41 +00008765 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008766 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008767 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008768fi
8769
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008770
Neal Norwitza978ab02002-11-02 16:58:05 +00008771 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8773$as_echo_n "checking for thr_create in -lthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008774if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008776else
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008778LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782/* Override any GCC internal prototype to avoid an error.
8783 Use char because int might match the return type of a GCC
8784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008785#ifdef __cplusplus
8786extern "C"
8787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008788char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008789int
8790main ()
8791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008792return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ;
8794 return 0;
8795}
8796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008799else
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802rm -f core conftest.err conftest.$ac_objext \
8803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008804LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8807$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008808if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008810
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008811 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008812 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008813 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008814fi
8815
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008816 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008817fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008818
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819if test "$posix_threads" = "yes"; then
8820 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008821
Matthias Kloseb9621712010-04-24 17:59:49 +00008822$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823
8824 fi
8825
8826 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8827 case $ac_sys_system/$ac_sys_release in
8828 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008829$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008830
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831 ;;
8832 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008833$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834
8835 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008836 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008837$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008838
8839 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008840 AIX/6)
8841$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8842
8843 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008844 esac
8845
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8847$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008848 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850else
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008852 ac_cv_pthread_system_supported=no
8853else
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008855/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008856#include <pthread.h>
8857 void *foo(void *parm) {
8858 return NULL;
8859 }
8860 main() {
8861 pthread_attr_t attr;
8862 pthread_t id;
8863 if (pthread_attr_init(&attr)) exit(-1);
8864 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8865 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8866 exit(0);
8867 }
8868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008869if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008870 ac_cv_pthread_system_supported=yes
8871else
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8875 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008876fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878
Guido van Rossum627b2d71993-12-24 10:39:16 +00008879fi
8880
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8882$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008883 if test "$ac_cv_pthread_system_supported" = "yes"; then
8884
Matthias Kloseb9621712010-04-24 17:59:49 +00008885$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008886
8887 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 for ac_func in pthread_sigmask
8889do :
8890 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008891if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008892 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008893#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008894_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008895 case $ac_sys_system in
8896 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008899
8900 ;;
8901 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008902fi
8903done
8904
8905fi
8906
8907
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008908# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8911$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008913if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8917$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918 ipv6=no
8919 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8921$as_echo "yes" >&6; }
8922 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008923
8924 ipv6=yes
8925 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927else
Martin v. Löwis11437992002-04-12 09:54:03 +00008928
Matthias Kloseb9621712010-04-24 17:59:49 +00008929 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933 ipv6=no
8934
8935else
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008938 /* AF_INET6 available check */
8939#include <sys/types.h>
8940#include <sys/socket.h>
8941main()
8942{
8943 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8944 exit(1);
8945 else
8946 exit(0);
8947}
8948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008950if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008951
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8953$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956else
Matthias Kloseb159a552010-04-25 21:00:44 +00008957
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008960 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008961
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8964 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965fi
8966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008968if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8970$as_echo_n "checking if RFC2553 API is available... " >&6; }
8971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008972/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008973
8974 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008975#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008976int
8977main ()
8978{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008979struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008980 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ;
8982 return 0;
8983}
Matthias Kloseb159a552010-04-25 21:00:44 +00008984
Martin v. Löwis11437992002-04-12 09:54:03 +00008985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008986if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008987
8988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008989$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008990 ipv6=yes
8991
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008992else
Matthias Kloseb159a552010-04-25 21:00:44 +00008993
8994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008995$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008996 ipv6=no
8997
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009000fi
9001
9002if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009004
9005fi
9006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009007fi
9008
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009
9010ipv6type=unknown
9011ipv6lib=none
9012ipv6trylibc=no
9013
9014if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9016$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009017 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9018 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019 case $i in
9020 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009022/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009023
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024#include <netinet/in.h>
9025#ifdef IPV6_INRIA_VERSION
9026yes
9027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009028_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009031 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009033rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034
9035 ;;
9036 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009038/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009039
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040#include <netinet/in.h>
9041#ifdef __KAME__
9042yes
9043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009044_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047 ipv6type=$i;
9048 ipv6lib=inet6
9049 ipv6libdir=/usr/local/v6/lib
9050 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009051fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009052rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053
9054 ;;
9055 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009057/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009058
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059#include <features.h>
9060#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9061yes
9062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009063_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066 ipv6type=$i;
9067 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009069rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070
9071 ;;
9072 linux-inet6)
9073 if test -d /usr/inet6; then
9074 ipv6type=$i
9075 ipv6lib=inet6
9076 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009077 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078 fi
9079 ;;
9080 solaris)
9081 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009082 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009083 ipv6type=$i
9084 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085 fi
9086 fi
9087 ;;
9088 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009090/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092#include <sys/param.h>
9093#ifdef _TOSHIBA_INET6
9094yes
9095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009096_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009098 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099 ipv6type=$i;
9100 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009101 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009102fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009103rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104
9105 ;;
9106 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009108/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009109
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009110#include </usr/local/v6/include/sys/v6config.h>
9111#ifdef __V6D__
9112yes
9113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009114_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117 ipv6type=$i;
9118 ipv6lib=v6;
9119 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009120 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009121fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009122rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123
9124 ;;
9125 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009127/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009128
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009129#include <sys/param.h>
9130#ifdef _ZETA_MINAMI_INET6
9131yes
9132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009133_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136 ipv6type=$i;
9137 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009138 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009140rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141
9142 ;;
9143 esac
9144 if test "$ipv6type" != "unknown"; then
9145 break
9146 fi
9147 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9149$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009150fi
9151
9152if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9153 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9154 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9155 echo "using lib$ipv6lib"
9156 else
9157 if test $ipv6trylibc = "yes"; then
9158 echo "using libc"
9159 else
9160 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9161 echo "You need to fetch lib$ipv6lib.a from appropriate"
9162 echo 'ipv6 kit and compile beforehand.'
9163 exit 1
9164 fi
9165 fi
9166fi
9167
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9169$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009171/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009172
9173 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009174int
9175main ()
9176{
9177FSIORefNum fRef = 0
9178 ;
9179 return 0;
9180}
Matthias Kloseb159a552010-04-25 21:00:44 +00009181
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009183if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009184
Matthias Kloseb159a552010-04-25 21:00:44 +00009185
Matthias Kloseb9621712010-04-24 17:59:49 +00009186$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9189$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009190
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009191else
Matthias Kloseb159a552010-04-25 21:00:44 +00009192
Matthias Kloseb9621712010-04-24 17:59:49 +00009193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9194$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009195
9196fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9198
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009199# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9201$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009204if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205 withval=$with_doc_strings;
9206fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009207
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009208
9209if test -z "$with_doc_strings"
9210then with_doc_strings="yes"
9211fi
9212if test "$with_doc_strings" != "no"
9213then
9214
Matthias Kloseb9621712010-04-24 17:59:49 +00009215$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009216
9217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9219$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009220
Antoine Pitrou042b1282010-08-13 21:15:58 +00009221# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9223$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009225# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009226if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009228if test "$withval" != no
9229then
9230
Matthias Kloseb9621712010-04-24 17:59:49 +00009231$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9234$as_echo "yes" >&6; }
9235else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9236$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009237fi
9238else
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9240$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241fi
9242
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009243
9244# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9246$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009247
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009249if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250 withval=$with_pymalloc;
9251fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009252
Neil Schemenauera35c6882001-02-27 04:45:05 +00009253
Neil Schemenauer16c22972002-03-22 15:34:49 +00009254if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009255then
9256 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009257 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009258fi
9259if test "$with_pymalloc" != "no"
9260then
Martin v. Löwis11437992002-04-12 09:54:03 +00009261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009263
9264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9266$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009267
Benjamin Peterson05159c42009-12-03 03:01:27 +00009268# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9270$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009271
9272# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009273if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009274 withval=$with_valgrind;
9275else
9276 with_valgrind=no
9277fi
9278
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9280$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009281if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 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 -05009283if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009286
9287else
Benjamin Peterson87cdb812011-05-31 18:26:08 -05009288 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009289
9290fi
9291
9292
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009293 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009294fi
9295
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009296# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009297
Guido van Rossum98935bf2001-09-05 19:13:16 +00009298DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009299
Guido van Rossume97ee181999-12-20 21:27:22 +00009300# the dlopen() function means we might want to use dynload_shlib.o. some
9301# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009302for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009303do :
9304 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009305if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009307#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009308_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009309
Guido van Rossume97ee181999-12-20 21:27:22 +00009310fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009311done
Guido van Rossume97ee181999-12-20 21:27:22 +00009312
Michael W. Hudson54241132001-12-07 15:38:26 +00009313
Guido van Rossume97ee181999-12-20 21:27:22 +00009314# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9315# loading of modules.
9316
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9318$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009319if test -z "$DYNLOADFILE"
9320then
9321 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009322 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9323 if test "$ac_cv_func_dlopen" = yes
9324 then DYNLOADFILE="dynload_shlib.o"
9325 else DYNLOADFILE="dynload_aix.o"
9326 fi
9327 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009328 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009329 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9330 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009331 *)
9332 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9333 # out any dynamic loading
9334 if test "$ac_cv_func_dlopen" = yes
9335 then DYNLOADFILE="dynload_shlib.o"
9336 else DYNLOADFILE="dynload_stub.o"
9337 fi
9338 ;;
9339 esac
9340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9342$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009343if test "$DYNLOADFILE" != "dynload_stub.o"
9344then
Martin v. Löwis11437992002-04-12 09:54:03 +00009345
Matthias Kloseb9621712010-04-24 17:59:49 +00009346$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009347
9348fi
9349
Neil Schemenauer4e425612001-06-19 15:44:15 +00009350# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9351
Michael W. Hudson54241132001-12-07 15:38:26 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9354$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009355if test -z "$MACHDEP_OBJS"
9356then
Jack Jansene578a632001-08-15 01:27:14 +00009357 MACHDEP_OBJS=$extra_machdep_objs
9358else
9359 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9362$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009363
Guido van Rossum627b2d71993-12-24 10:39:16 +00009364# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009365for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009366 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009367 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
9368 futimens futimes \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009369 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009370 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009371 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009372 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009373 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009374 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009375 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009376 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009377 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009378 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009379 sigaction sigaltstack siginterrupt sigpending \
9380 sigrelse sigwait snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009381 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009382 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9383 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009384do :
9385 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9386ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05009387eval as_val=\$$as_ac_var
9388 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009390#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009391_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009393fi
9394done
9395
Michael W. Hudson54241132001-12-07 15:38:26 +00009396
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009397# For some functions, having a definition is not sufficient, since
9398# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9400$as_echo_n "checking for chroot... " >&6; }
9401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009402/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404int
9405main ()
9406{
9407void *x=chroot
9408 ;
9409 return 0;
9410}
9411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009413
Matthias Kloseb9621712010-04-24 17:59:49 +00009414$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009415
Matthias Kloseb159a552010-04-25 21:00:44 +00009416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009417$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009418else
Matthias Kloseb9621712010-04-24 17:59:49 +00009419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009421
9422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9425$as_echo_n "checking for link... " >&6; }
9426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009427/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009429int
9430main ()
9431{
9432void *x=link
9433 ;
9434 return 0;
9435}
9436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009438
Matthias Kloseb9621712010-04-24 17:59:49 +00009439$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009440
Matthias Kloseb159a552010-04-25 21:00:44 +00009441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009442$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009443else
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009446
9447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9450$as_echo_n "checking for symlink... " >&6; }
9451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009452/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009453#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009454int
9455main ()
9456{
9457void *x=symlink
9458 ;
9459 return 0;
9460}
9461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009463
Matthias Kloseb9621712010-04-24 17:59:49 +00009464$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009465
Matthias Kloseb159a552010-04-25 21:00:44 +00009466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009467$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009468else
Matthias Kloseb9621712010-04-24 17:59:49 +00009469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009471
9472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9475$as_echo_n "checking for fchdir... " >&6; }
9476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009477/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009478#include <unistd.h>
9479int
9480main ()
9481{
9482void *x=fchdir
9483 ;
9484 return 0;
9485}
9486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009490
Matthias Kloseb159a552010-04-25 21:00:44 +00009491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009492$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009493else
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009496
9497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9500$as_echo_n "checking for fsync... " >&6; }
9501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009502/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009503#include <unistd.h>
9504int
9505main ()
9506{
9507void *x=fsync
9508 ;
9509 return 0;
9510}
9511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009513
Matthias Kloseb9621712010-04-24 17:59:49 +00009514$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009515
Matthias Kloseb159a552010-04-25 21:00:44 +00009516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009517$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009518else
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9520$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009521
9522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9525$as_echo_n "checking for fdatasync... " >&6; }
9526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009527/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009528#include <unistd.h>
9529int
9530main ()
9531{
9532void *x=fdatasync
9533 ;
9534 return 0;
9535}
9536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009537if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009538
Matthias Kloseb9621712010-04-24 17:59:49 +00009539$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009540
Matthias Kloseb159a552010-04-25 21:00:44 +00009541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009542$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009546
9547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9550$as_echo_n "checking for epoll... " >&6; }
9551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009552/* end confdefs.h. */
9553#include <sys/epoll.h>
9554int
9555main ()
9556{
9557void *x=epoll_create
9558 ;
9559 return 0;
9560}
9561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009565
Matthias Kloseb159a552010-04-25 21:00:44 +00009566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009567$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009568else
Matthias Kloseb9621712010-04-24 17:59:49 +00009569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9570$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009571
9572fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9575$as_echo_n "checking for kqueue... " >&6; }
9576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009577/* end confdefs.h. */
9578
9579#include <sys/types.h>
9580#include <sys/event.h>
9581
9582int
9583main ()
9584{
9585int x=kqueue()
9586 ;
9587 return 0;
9588}
9589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009590if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009591
Matthias Kloseb9621712010-04-24 17:59:49 +00009592$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009593
Matthias Kloseb159a552010-04-25 21:00:44 +00009594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009595$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009596else
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009599
9600fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009602# On some systems (eg. FreeBSD 5), we would find a definition of the
9603# functions ctermid_r, setgroups in the library, but no prototype
9604# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9605# address to avoid compiler warnings and potential miscompilations
9606# because of the missing prototypes.
9607
Matthias Kloseb9621712010-04-24 17:59:49 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9609$as_echo_n "checking for ctermid_r... " >&6; }
9610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009612
Martin v. Löwisd5843682002-11-21 20:41:28 +00009613#include <stdio.h>
9614
Martin v. Löwisd5843682002-11-21 20:41:28 +00009615int
9616main ()
9617{
9618void* p = ctermid_r
9619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009626
Matthias Kloseb159a552010-04-25 21:00:44 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009632
9633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9635
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9637$as_echo_n "checking for flock declaration... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009638if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009639 $as_echo_n "(cached) " >&6
9640else
9641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009642/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009643#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009644int
9645main ()
9646{
9647void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009648
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009649 ;
9650 return 0;
9651}
9652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009654 ac_cv_flock_decl=yes
9655else
9656 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009657
9658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009660
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009661fi
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9663$as_echo "$ac_cv_flock_decl" >&6; }
9664if test "x${ac_cv_flock_decl}" = xyes; then
9665 for ac_func in flock
9666do :
9667 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009668if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009669 cat >>confdefs.h <<_ACEOF
9670#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009671_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009672
Antoine Pitroua3000072010-09-07 14:52:42 +00009673else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009675$as_echo_n "checking for flock in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009676if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009677 $as_echo_n "(cached) " >&6
9678else
9679 ac_check_lib_save_LIBS=$LIBS
9680LIBS="-lbsd $LIBS"
9681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9682/* end confdefs.h. */
9683
9684/* Override any GCC internal prototype to avoid an error.
9685 Use char because int might match the return type of a GCC
9686 builtin and then its argument prototype would still apply. */
9687#ifdef __cplusplus
9688extern "C"
9689#endif
9690char flock ();
9691int
9692main ()
9693{
9694return flock ();
9695 ;
9696 return 0;
9697}
9698_ACEOF
9699if ac_fn_c_try_link "$LINENO"; then :
9700 ac_cv_lib_bsd_flock=yes
9701else
9702 ac_cv_lib_bsd_flock=no
9703fi
9704rm -f core conftest.err conftest.$ac_objext \
9705 conftest$ac_exeext conftest.$ac_ext
9706LIBS=$ac_check_lib_save_LIBS
9707fi
9708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9709$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009710if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009711 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009712
9713
9714$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9715
9716
9717fi
9718
9719
9720fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009721done
9722
Antoine Pitroua3000072010-09-07 14:52:42 +00009723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724
Matthias Kloseb9621712010-04-24 17:59:49 +00009725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9726$as_echo_n "checking for getpagesize... " >&6; }
9727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009728/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009729
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009730#include <unistd.h>
9731
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009732int
9733main ()
9734{
9735void* p = getpagesize
9736 ;
9737 return 0;
9738}
9739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009740if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009741
Matthias Kloseb9621712010-04-24 17:59:49 +00009742$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009743
Matthias Kloseb159a552010-04-25 21:00:44 +00009744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009745$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009746else
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009749
9750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009752
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9754$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9756/* end confdefs.h. */
9757
9758#include <malloc.h>
9759
9760int
9761main ()
9762{
9763mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9764 ;
9765 return 0;
9766}
9767_ACEOF
9768if ac_fn_c_try_compile "$LINENO"; then :
9769
9770$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9771
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9773$as_echo "yes" >&6; }
9774else
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
9777
9778fi
9779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9780
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009781for ac_prog in true
9782do
9783 # Extract the first word of "$ac_prog", so it can be a program name with args.
9784set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9786$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009787if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009789else
9790 if test -n "$TRUE"; then
9791 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9792else
9793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9794for as_dir in $PATH
9795do
9796 IFS=$as_save_IFS
9797 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799 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 +00009800 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009801 $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 +00009802 break 2
9803 fi
9804done
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009807
9808fi
9809fi
9810TRUE=$ac_cv_prog_TRUE
9811if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9813$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009814else
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009817fi
9818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009820 test -n "$TRUE" && break
9821done
9822test -n "$TRUE" || TRUE="/bin/true"
9823
9824
Matthias Kloseb9621712010-04-24 17:59:49 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9826$as_echo_n "checking for inet_aton in -lc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009827if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009829else
9830 ac_check_lib_save_LIBS=$LIBS
9831LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835/* Override any GCC internal prototype to avoid an error.
9836 Use char because int might match the return type of a GCC
9837 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009838#ifdef __cplusplus
9839extern "C"
9840#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009841char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009842int
9843main ()
9844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009846 ;
9847 return 0;
9848}
9849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009850if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851 ac_cv_lib_c_inet_aton=yes
9852else
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855rm -f core conftest.err conftest.$ac_objext \
9856 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009857LIBS=$ac_check_lib_save_LIBS
9858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9860$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009861if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009862 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009863else
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9865$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009866if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009868else
9869 ac_check_lib_save_LIBS=$LIBS
9870LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009872/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874/* Override any GCC internal prototype to avoid an error.
9875 Use char because int might match the return type of a GCC
9876 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009877#ifdef __cplusplus
9878extern "C"
9879#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009880char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009881int
9882main ()
9883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009885 ;
9886 return 0;
9887}
9888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009890 ac_cv_lib_resolv_inet_aton=yes
9891else
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009894rm -f core conftest.err conftest.$ac_objext \
9895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009896LIBS=$ac_check_lib_save_LIBS
9897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9899$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009900if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009901 cat >>confdefs.h <<_ACEOF
9902#define HAVE_LIBRESOLV 1
9903_ACEOF
9904
9905 LIBS="-lresolv $LIBS"
9906
9907fi
9908
9909
9910fi
9911
9912
Christian Heimesd0764e22007-12-04 15:00:33 +00009913# On Tru64, chflags seems to be present, but calling it will
9914# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9916$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009917if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009919else
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009921 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009922else
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009924/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009925[
Christian Heimesd0764e22007-12-04 15:00:33 +00009926#include <sys/stat.h>
9927#include <unistd.h>
9928int main(int argc, char*argv[])
9929{
9930 if(chflags(argv[0], 0) != 0)
9931 return 1;
9932 return 0;
9933}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009934]
Christian Heimesd0764e22007-12-04 15:00:33 +00009935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009936if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009937 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009938else
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009943fi
9944
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009945
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9948$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009949if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009950 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009951if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009952 ac_cv_have_chflags="yes"
9953else
9954 ac_cv_have_chflags="no"
9955fi
9956
9957fi
9958if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009959
Matthias Kloseb9621712010-04-24 17:59:49 +00009960$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009961
9962fi
9963
Matthias Kloseb9621712010-04-24 17:59:49 +00009964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9965$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009966if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009967 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009968else
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009970 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009971else
Matthias Kloseb9621712010-04-24 17:59:49 +00009972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009973/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009974[
Christian Heimesd0764e22007-12-04 15:00:33 +00009975#include <sys/stat.h>
9976#include <unistd.h>
9977int main(int argc, char*argv[])
9978{
9979 if(lchflags(argv[0], 0) != 0)
9980 return 1;
9981 return 0;
9982}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009983]
Christian Heimesd0764e22007-12-04 15:00:33 +00009984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009985if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009986 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009987else
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9991 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009992fi
9993
9994
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9997$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009998if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010000if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010001 ac_cv_have_lchflags="yes"
10002else
10003 ac_cv_have_lchflags="no"
10004fi
10005
10006fi
10007if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010008
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010010
10011fi
10012
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010013case $ac_sys_system/$ac_sys_release in
10014Darwin/*)
10015 _CUR_CFLAGS="${CFLAGS}"
10016 _CUR_LDFLAGS="${LDFLAGS}"
10017 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10018 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10019 ;;
10020esac
10021
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10023$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010024if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010026else
10027 ac_check_lib_save_LIBS=$LIBS
10028LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010030/* end confdefs.h. */
10031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032/* Override any GCC internal prototype to avoid an error.
10033 Use char because int might match the return type of a GCC
10034 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010035#ifdef __cplusplus
10036extern "C"
10037#endif
10038char inflateCopy ();
10039int
10040main ()
10041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010043 ;
10044 return 0;
10045}
10046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010047if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010048 ac_cv_lib_z_inflateCopy=yes
10049else
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010052rm -f core conftest.err conftest.$ac_objext \
10053 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010054LIBS=$ac_check_lib_save_LIBS
10055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10057$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010058if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010061
10062fi
10063
10064
10065case $ac_sys_system/$ac_sys_release in
10066Darwin/*)
10067 CFLAGS="${_CUR_CFLAGS}"
10068 LDFLAGS="${_CUR_LDFLAGS}"
10069 ;;
10070esac
10071
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10073$as_echo_n "checking for hstrerror... " >&6; }
10074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010076
Martin v. Löwise9416172003-05-03 10:12:45 +000010077#include <netdb.h>
10078
Martin v. Löwise9416172003-05-03 10:12:45 +000010079int
10080main ()
10081{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010082void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010083 ;
10084 return 0;
10085}
10086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010087if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010088
Matthias Kloseb9621712010-04-24 17:59:49 +000010089$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010090
Matthias Kloseb159a552010-04-25 21:00:44 +000010091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010092$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010093else
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010096
10097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010098rm -f core conftest.err conftest.$ac_objext \
10099 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100
Matthias Kloseb9621712010-04-24 17:59:49 +000010101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10102$as_echo_n "checking for inet_aton... " >&6; }
10103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010104/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010105
Martin v. Löwis86d66262006-02-17 08:40:11 +000010106#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010107#include <sys/socket.h>
10108#include <netinet/in.h>
10109#include <arpa/inet.h>
10110
Martin v. Löwise9416172003-05-03 10:12:45 +000010111int
10112main ()
10113{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010114void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010115 ;
10116 return 0;
10117}
10118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010120
Matthias Kloseb9621712010-04-24 17:59:49 +000010121$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010122
Matthias Kloseb159a552010-04-25 21:00:44 +000010123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010124$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010125else
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10127$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010128
10129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130rm -f core conftest.err conftest.$ac_objext \
10131 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10134$as_echo_n "checking for inet_pton... " >&6; }
10135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010136/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010137
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010138#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010139#include <sys/socket.h>
10140#include <netinet/in.h>
10141#include <arpa/inet.h>
10142
Martin v. Löwise9416172003-05-03 10:12:45 +000010143int
10144main ()
10145{
10146void* p = inet_pton
10147 ;
10148 return 0;
10149}
10150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010152
Matthias Kloseb9621712010-04-24 17:59:49 +000010153$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010154
Matthias Kloseb159a552010-04-25 21:00:44 +000010155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010156$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010157else
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010160
10161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010163
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010164# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10166$as_echo_n "checking for setgroups... " >&6; }
10167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010168/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010169
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010170#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010171#ifdef HAVE_GRP_H
10172#include <grp.h>
10173#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010174
Martin v. Löwisd5843682002-11-21 20:41:28 +000010175int
10176main ()
10177{
10178void* p = setgroups
10179 ;
10180 return 0;
10181}
10182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010183if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010184
Matthias Kloseb9621712010-04-24 17:59:49 +000010185$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010186
Matthias Kloseb159a552010-04-25 21:00:44 +000010187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010188$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010189else
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010192
10193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010195
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010196# check for openpty and forkpty
10197
10198for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010199do :
10200 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010201if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010203#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010204_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010206else
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10208$as_echo_n "checking for openpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010209if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010211else
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010213LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217/* Override any GCC internal prototype to avoid an error.
10218 Use char because int might match the return type of a GCC
10219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220#ifdef __cplusplus
10221extern "C"
10222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010223char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010224int
10225main ()
10226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 ;
10229 return 0;
10230}
10231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010234else
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237rm -f core conftest.err conftest.$ac_objext \
10238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010239LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10242$as_echo "$ac_cv_lib_util_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010243if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010245 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010246else
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10248$as_echo_n "checking for openpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010249if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010251else
10252 ac_check_lib_save_LIBS=$LIBS
10253LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010255/* end confdefs.h. */
10256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257/* Override any GCC internal prototype to avoid an error.
10258 Use char because int might match the return type of a GCC
10259 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010260#ifdef __cplusplus
10261extern "C"
10262#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010263char openpty ();
10264int
10265main ()
10266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010268 ;
10269 return 0;
10270}
10271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010273 ac_cv_lib_bsd_openpty=yes
10274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277rm -f core conftest.err conftest.$ac_objext \
10278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010279LIBS=$ac_check_lib_save_LIBS
10280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10282$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010283if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010285 LIBS="$LIBS -lbsd"
10286fi
10287
10288
10289fi
10290
Fred Drake8cef4cf2000-06-28 16:40:38 +000010291
10292fi
10293done
10294
10295for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010296do :
10297 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010298if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010300#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010302
Fred Drake8cef4cf2000-06-28 16:40:38 +000010303else
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10305$as_echo_n "checking for forkpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010306if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010308else
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010310LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010314/* Override any GCC internal prototype to avoid an error.
10315 Use char because int might match the return type of a GCC
10316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010317#ifdef __cplusplus
10318extern "C"
10319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010320char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010321int
10322main ()
10323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ;
10326 return 0;
10327}
10328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010331else
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010334rm -f core conftest.err conftest.$ac_objext \
10335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010336LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10339$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010340if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010342 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010343else
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10345$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010346if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010348else
10349 ac_check_lib_save_LIBS=$LIBS
10350LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010352/* end confdefs.h. */
10353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354/* Override any GCC internal prototype to avoid an error.
10355 Use char because int might match the return type of a GCC
10356 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010357#ifdef __cplusplus
10358extern "C"
10359#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010360char forkpty ();
10361int
10362main ()
10363{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010365 ;
10366 return 0;
10367}
10368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010370 ac_cv_lib_bsd_forkpty=yes
10371else
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010374rm -f core conftest.err conftest.$ac_objext \
10375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010376LIBS=$ac_check_lib_save_LIBS
10377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10379$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010380if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010382 LIBS="$LIBS -lbsd"
10383fi
10384
10385
10386fi
10387
Fred Drake8cef4cf2000-06-28 16:40:38 +000010388
10389fi
10390done
10391
Jack Jansendd19cf82001-12-06 22:36:17 +000010392
Christian Heimesb186d002008-03-18 15:15:01 +000010393# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010394for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010395do :
10396 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010397if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010398 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010399#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010400_ACEOF
10401
10402fi
10403done
10404
10405
Michael W. Hudson54241132001-12-07 15:38:26 +000010406# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010407for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010408do :
10409 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10410ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010411eval as_val=\$$as_ac_var
10412 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010415_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010416
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010417fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010418done
10419
Michael W. Hudson54241132001-12-07 15:38:26 +000010420
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010421for ac_func in dup2 getcwd strdup
10422do :
10423 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10424ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10425eval as_val=\$$as_ac_var
10426 if test "x$as_val" = x""yes; then :
10427 cat >>confdefs.h <<_ACEOF
10428#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10429_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010430
Martin v. Löwis1142de32002-03-29 16:28:31 +000010431else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432 case " $LIBOBJS " in
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010433 *" $ac_func.$ac_objext "* ) ;;
10434 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010435 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010436esac
10437
Martin v. Löwis1142de32002-03-29 16:28:31 +000010438fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010439done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010440
10441
10442for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010443do :
10444 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010445if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010447#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010451#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010452int
10453main ()
10454{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010455getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010463
Guido van Rossum627b2d71993-12-24 10:39:16 +000010464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010466
Guido van Rossum627b2d71993-12-24 10:39:16 +000010467fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010468done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010469
Jack Jansen150753c2003-03-29 22:07:47 +000010470for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010471do :
10472 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010473if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010474 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010475#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010478/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010479#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010480int
10481main ()
10482{
10483setpgrp(0,0);
10484 ;
10485 return 0;
10486}
10487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010489
Matthias Kloseb9621712010-04-24 17:59:49 +000010490$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010491
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010494
10495fi
10496done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010497
Thomas Wouters3a584202000-08-05 23:28:51 +000010498for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010499do :
10500 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010501if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010503#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010506/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010507#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010508int
10509main ()
10510{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010511gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 ;
10513 return 0;
10514}
10515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010516if ac_fn_c_try_compile "$LINENO"; then :
10517
Guido van Rossum627b2d71993-12-24 10:39:16 +000010518else
Skip Montanaro6dead952003-09-25 14:50:04 +000010519
Matthias Kloseb9621712010-04-24 17:59:49 +000010520$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010521
Martin v. Löwis11437992002-04-12 09:54:03 +000010522
Guido van Rossum627b2d71993-12-24 10:39:16 +000010523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010525
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010526fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010527done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528
Michael W. Hudson54241132001-12-07 15:38:26 +000010529
Matthias Kloseb9621712010-04-24 17:59:49 +000010530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10531$as_echo_n "checking for major... " >&6; }
10532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010534
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010535#if defined(MAJOR_IN_MKDEV)
10536#include <sys/mkdev.h>
10537#elif defined(MAJOR_IN_SYSMACROS)
10538#include <sys/sysmacros.h>
10539#else
10540#include <sys/types.h>
10541#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010542
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010543int
10544main ()
10545{
10546
10547 makedev(major(0),minor(0));
10548
10549 ;
10550 return 0;
10551}
10552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010554
10555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10559$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010560
10561else
Skip Montanaro6dead952003-09-25 14:50:04 +000010562
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010565
10566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010567rm -f core conftest.err conftest.$ac_objext \
10568 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010569
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010570# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010571# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10573$as_echo_n "checking for getaddrinfo... " >&6; }
10574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010575/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010576
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010577#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010578#include <sys/socket.h>
10579#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010580#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010581
Martin v. Löwis11437992002-04-12 09:54:03 +000010582int
10583main ()
10584{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010585getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ;
10587 return 0;
10588}
10589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010590if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010591 have_getaddrinfo=yes
10592else
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010595rm -f core conftest.err conftest.$ac_objext \
10596 conftest$ac_exeext conftest.$ac_ext
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10598$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010599if test $have_getaddrinfo = yes
10600then
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10602$as_echo_n "checking getaddrinfo bug... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010603 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010605else
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010607 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010608else
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010610/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010611
10612#include <sys/types.h>
10613#include <netdb.h>
10614#include <string.h>
10615#include <sys/socket.h>
10616#include <netinet/in.h>
10617
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010618int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010619{
10620 int passive, gaierr, inet4 = 0, inet6 = 0;
10621 struct addrinfo hints, *ai, *aitop;
10622 char straddr[INET6_ADDRSTRLEN], strport[16];
10623
10624 for (passive = 0; passive <= 1; passive++) {
10625 memset(&hints, 0, sizeof(hints));
10626 hints.ai_family = AF_UNSPEC;
10627 hints.ai_flags = passive ? AI_PASSIVE : 0;
10628 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010629 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010630 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10631 (void)gai_strerror(gaierr);
10632 goto bad;
10633 }
10634 for (ai = aitop; ai; ai = ai->ai_next) {
10635 if (ai->ai_addr == NULL ||
10636 ai->ai_addrlen == 0 ||
10637 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10638 straddr, sizeof(straddr), strport, sizeof(strport),
10639 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10640 goto bad;
10641 }
10642 switch (ai->ai_family) {
10643 case AF_INET:
10644 if (strcmp(strport, "54321") != 0) {
10645 goto bad;
10646 }
10647 if (passive) {
10648 if (strcmp(straddr, "0.0.0.0") != 0) {
10649 goto bad;
10650 }
10651 } else {
10652 if (strcmp(straddr, "127.0.0.1") != 0) {
10653 goto bad;
10654 }
10655 }
10656 inet4++;
10657 break;
10658 case AF_INET6:
10659 if (strcmp(strport, "54321") != 0) {
10660 goto bad;
10661 }
10662 if (passive) {
10663 if (strcmp(straddr, "::") != 0) {
10664 goto bad;
10665 }
10666 } else {
10667 if (strcmp(straddr, "::1") != 0) {
10668 goto bad;
10669 }
10670 }
10671 inet6++;
10672 break;
10673 case AF_UNSPEC:
10674 goto bad;
10675 break;
10676 default:
10677 /* another family support? */
10678 break;
10679 }
10680 }
10681 }
10682
10683 if (!(inet4 == 0 || inet4 == 2))
10684 goto bad;
10685 if (!(inet6 == 0 || inet6 == 2))
10686 goto bad;
10687
10688 if (aitop)
10689 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010690 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010691
10692 bad:
10693 if (aitop)
10694 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010695 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010696}
10697
Martin v. Löwis11437992002-04-12 09:54:03 +000010698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010699if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010700 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010701else
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010708fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010709
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10713$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10714
Mark Dickinson2df5d282009-12-31 21:22:50 +000010715if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010716then
10717 if test $ipv6 = yes
10718 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010719 echo 'Fatal: You must get working getaddrinfo() function.'
10720 echo ' or you can specify "--disable-ipv6"'.
10721 exit 1
10722 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010723else
Martin v. Löwis11437992002-04-12 09:54:03 +000010724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010726
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010727fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010728
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010729for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010730do :
10731 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010732if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010734#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010735_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010736
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010737fi
10738done
10739
Michael W. Hudson54241132001-12-07 15:38:26 +000010740
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010741# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10743$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010744if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010746else
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749#include <sys/types.h>
10750#include <sys/time.h>
10751#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010752
Martin v. Löwis11437992002-04-12 09:54:03 +000010753int
10754main ()
10755{
10756if ((struct tm *) 0)
10757return 0;
10758 ;
10759 return 0;
10760}
10761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010762if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010763 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010764else
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10770$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010771if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010772
Matthias Kloseb9621712010-04-24 17:59:49 +000010773$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010774
10775fi
10776
Matthias Kloseb9621712010-04-24 17:59:49 +000010777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10778$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010779if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010781else
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010784#include <sys/types.h>
10785#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010786
Martin v. Löwis11437992002-04-12 09:54:03 +000010787int
10788main ()
10789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010790struct tm tm;
10791 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 ;
10794 return 0;
10795}
10796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010797if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010798 ac_cv_struct_tm=time.h
10799else
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10805$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010806if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010809
10810fi
10811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812ac_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 +000010813#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010816if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010817
10818cat >>confdefs.h <<_ACEOF
10819#define HAVE_STRUCT_TM_TM_ZONE 1
10820_ACEOF
10821
10822
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010823fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010824
Martin v. Löwis11437992002-04-12 09:54:03 +000010825if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10826
Matthias Kloseb9621712010-04-24 17:59:49 +000010827$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010828
10829else
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10831"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010832if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010834else
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836fi
10837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010838cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010839#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840_ACEOF
10841
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10843$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010844if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846else
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010848/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010849#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010850#if !HAVE_DECL_TZNAME
10851extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010853
Martin v. Löwis11437992002-04-12 09:54:03 +000010854int
10855main ()
10856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 ;
10859 return 0;
10860}
10861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010862if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010863 ac_cv_var_tzname=yes
10864else
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010867rm -f core conftest.err conftest.$ac_objext \
10868 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10871$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010872 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010875
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010876 fi
10877fi
10878
Matthias Kloseb9621712010-04-24 17:59:49 +000010879ac_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 -050010880if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010881
10882cat >>confdefs.h <<_ACEOF
10883#define HAVE_STRUCT_STAT_ST_RDEV 1
10884_ACEOF
10885
10886
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010887fi
10888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889ac_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 -050010890if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010891
Martin v. Löwis11437992002-04-12 09:54:03 +000010892cat >>confdefs.h <<_ACEOF
10893#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10894_ACEOF
10895
10896
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010897fi
10898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899ac_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 -050010900if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010901
10902cat >>confdefs.h <<_ACEOF
10903#define HAVE_STRUCT_STAT_ST_FLAGS 1
10904_ACEOF
10905
10906
10907fi
10908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909ac_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 -050010910if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010911
10912cat >>confdefs.h <<_ACEOF
10913#define HAVE_STRUCT_STAT_ST_GEN 1
10914_ACEOF
10915
10916
10917fi
10918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919ac_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 -050010920if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010921
10922cat >>confdefs.h <<_ACEOF
10923#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10924_ACEOF
10925
10926
10927fi
10928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929ac_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 -050010930if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010931
Martin v. Löwis11437992002-04-12 09:54:03 +000010932cat >>confdefs.h <<_ACEOF
10933#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10934_ACEOF
10935
10936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010938
10939else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010940 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010941 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10943 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010944esac
10945
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010946fi
10947
Michael W. Hudson54241132001-12-07 15:38:26 +000010948
Martin v. Löwis11437992002-04-12 09:54:03 +000010949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10951$as_echo_n "checking for time.h that defines altzone... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010952if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010954else
Matthias Kloseb159a552010-04-25 21:00:44 +000010955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010957/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010958#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010959int
10960main ()
10961{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 ;
10964 return 0;
10965}
10966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010967if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010968 ac_cv_header_time_altzone=yes
10969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974fi
10975
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10977$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010978if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981
10982fi
10983
Guido van Rossumda88dad1995-01-26 00:46:29 +000010984was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10986$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010988/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010989
10990#include <sys/types.h>
10991#include <sys/select.h>
10992#include <sys/time.h>
10993
Martin v. Löwis11437992002-04-12 09:54:03 +000010994int
10995main ()
10996{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010997;
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ;
10999 return 0;
11000}
11001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011003
11004
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011006
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011007 was_it_defined=yes
11008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11012$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11015$as_echo_n "checking for addrinfo... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011016if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011020/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011021#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011022int
11023main ()
11024{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011025struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011026 ;
11027 return 0;
11028}
11029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011030if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011031 ac_cv_struct_addrinfo=yes
11032else
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11036fi
11037
Matthias Kloseb9621712010-04-24 17:59:49 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11039$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011040if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011041
Matthias Kloseb9621712010-04-24 17:59:49 +000011042$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011043
11044fi
11045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11047$as_echo_n "checking for sockaddr_storage... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011048if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011050else
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011052/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011053
11054# include <sys/types.h>
11055# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011056int
11057main ()
11058{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011059struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 ;
11061 return 0;
11062}
11063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011064if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011065 ac_cv_struct_sockaddr_storage=yes
11066else
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11070fi
11071
Matthias Kloseb9621712010-04-24 17:59:49 +000011072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11073$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011074if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
Matthias Kloseb9621712010-04-24 17:59:49 +000011076$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011077
11078fi
11079
Guido van Rossum627b2d71993-12-24 10:39:16 +000011080# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011081
Matthias Kloseb9621712010-04-24 17:59:49 +000011082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11083$as_echo_n "checking whether char is unsigned... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011084if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011086else
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011089$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011090int
11091main ()
11092{
11093static int test_array [1 - 2 * !(((char) -1) < 0)];
11094test_array [0] = 0
11095
11096 ;
11097 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011098}
Martin v. Löwis11437992002-04-12 09:54:03 +000011099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011100if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011101 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011102else
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11108$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011109if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011110 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011111
11112fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11115$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011116if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011118else
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011120/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121
Martin v. Löwis11437992002-04-12 09:54:03 +000011122int
11123main ()
11124{
11125/* FIXME: Include the comments suggested by Paul. */
11126#ifndef __cplusplus
11127 /* Ultrix mips cc rejects this. */
11128 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131 char const *const *pcpcc;
11132 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 /* NEC SVR4.0.2 mips cc rejects this. */
11134 struct point {int x, y;};
11135 static struct point const zero = {0,0};
11136 /* AIX XL C 1.02.0.0 rejects this.
11137 It does not let you subtract one const X* pointer from another in
11138 an arm of an if-expression whose if-part is not a constant
11139 expression */
11140 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143 ++pcpcc;
11144 ppc = (char**) pcpcc;
11145 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 { /* SCO 3.2v4 cc rejects this. */
11147 char *t;
11148 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011149
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011151 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011152 }
11153 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11154 int x[] = {25, 17};
11155 const int *foo = &x[0];
11156 ++foo;
11157 }
11158 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11159 typedef const int *iptr;
11160 iptr p = 0;
11161 ++p;
11162 }
11163 { /* AIX XL C 1.02.0.0 rejects this saying
11164 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11165 struct s { int j; const int *ap[3]; };
11166 struct s *b; b->j = 5;
11167 }
11168 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11169 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011173#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011174
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 ;
11176 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011177}
Martin v. Löwis11437992002-04-12 09:54:03 +000011178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011179if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180 ac_cv_c_const=yes
11181else
Matthias Kloseb9621712010-04-24 17:59:49 +000011182 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11187$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011191
11192fi
11193
Michael W. Hudson54241132001-12-07 15:38:26 +000011194
Guido van Rossumda88dad1995-01-26 00:46:29 +000011195works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11197$as_echo_n "checking for working volatile... " >&6; }
11198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011199/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011200
Martin v. Löwis11437992002-04-12 09:54:03 +000011201int
11202main ()
11203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011204volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 ;
11206 return 0;
11207}
11208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011210 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011211else
Skip Montanaro6dead952003-09-25 14:50:04 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011214
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011215
Guido van Rossum627b2d71993-12-24 10:39:16 +000011216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11219$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011220
Guido van Rossumda88dad1995-01-26 00:46:29 +000011221works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11223$as_echo_n "checking for working signed char... " >&6; }
11224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011225/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011226
Martin v. Löwis11437992002-04-12 09:54:03 +000011227int
11228main ()
11229{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011236 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011237else
Skip Montanaro6dead952003-09-25 14:50:04 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011240
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011241
Guido van Rossum7f43da71994-08-01 12:15:30 +000011242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11245$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011246
Guido van Rossumda88dad1995-01-26 00:46:29 +000011247have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11249$as_echo_n "checking for prototypes... " >&6; }
11250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011251/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011252int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011253int
11254main ()
11255{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011256return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011257 ;
11258 return 0;
11259}
11260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011261if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
Matthias Kloseb159a552010-04-25 21:00:44 +000011265 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11269$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011270
Guido van Rossumda88dad1995-01-26 00:46:29 +000011271works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11273$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011276
11277#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011278int foo(int x, ...) {
11279 va_list va;
11280 va_start(va, x);
11281 va_arg(va, int);
11282 va_arg(va, char *);
11283 va_arg(va, double);
11284 return 0;
11285}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011286
Martin v. Löwis11437992002-04-12 09:54:03 +000011287int
11288main ()
11289{
Guido van Rossum90eea071996-08-30 20:58:57 +000011290return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 ;
11292 return 0;
11293}
11294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011296
11297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011299
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011300 works=yes
11301
Guido van Rossum627b2d71993-12-24 10:39:16 +000011302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11305$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011306
Martin v. Löwisd6320502004-08-12 13:45:08 +000011307# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11309$as_echo_n "checking for socketpair... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011311/* end confdefs.h. */
11312
11313#include <sys/types.h>
11314#include <sys/socket.h>
11315
11316int
11317main ()
11318{
11319void *x=socketpair
11320 ;
11321 return 0;
11322}
11323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011327
Matthias Kloseb159a552010-04-25 21:00:44 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011330else
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011333
11334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011336
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011337# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11339$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011341/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011342#include <sys/types.h>
11343#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011344int
11345main ()
11346{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011347struct sockaddr x;
11348x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 ;
11350 return 0;
11351}
11352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011353if ac_fn_c_try_compile "$LINENO"; then :
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11355$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011358
11359else
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011362
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011365
Guido van Rossumda88dad1995-01-26 00:46:29 +000011366va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11368$as_echo_n "checking whether va_list is an array... " >&6; }
11369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371
11372#ifdef HAVE_STDARG_PROTOTYPES
11373#include <stdarg.h>
11374#else
11375#include <varargs.h>
11376#endif
11377
Martin v. Löwis11437992002-04-12 09:54:03 +000011378int
11379main ()
11380{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011381va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 ;
11383 return 0;
11384}
11385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011386if ac_fn_c_try_compile "$LINENO"; then :
11387
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011388else
Skip Montanaro6dead952003-09-25 14:50:04 +000011389
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Guido van Rossumda88dad1995-01-26 00:46:29 +000011393 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11398$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011400# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011401
11402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011404if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11409$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011410 OLD_CFLAGS=$CFLAGS
11411 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011414
11415# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
Martin v. Löwis11437992002-04-12 09:54:03 +000011417int
11418main ()
11419{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011420
11421 char *name;
11422 struct hostent *he, *res;
11423 char buffer[2048];
11424 int buflen = 2048;
11425 int h_errnop;
11426
11427 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
11429 ;
11430 return 0;
11431}
11432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011434
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011436
Martin v. Löwis11437992002-04-12 09:54:03 +000011437
Matthias Kloseb9621712010-04-24 17:59:49 +000011438$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11441$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011443else
Skip Montanaro6dead952003-09-25 14:50:04 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11448$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011450/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011452# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
Martin v. Löwis11437992002-04-12 09:54:03 +000011454int
11455main ()
11456{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011457
11458 char *name;
11459 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011460 char buffer[2048];
11461 int buflen = 2048;
11462 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011463
Matthias Kloseb159a552010-04-25 21:00:44 +000011464 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
11466 ;
11467 return 0;
11468}
11469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011473
Martin v. Löwis11437992002-04-12 09:54:03 +000011474
Matthias Kloseb159a552010-04-25 21:00:44 +000011475$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011476
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11478$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011480else
Skip Montanaro6dead952003-09-25 14:50:04 +000011481
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11485$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487/* end confdefs.h. */
11488
11489# include <netdb.h>
11490
11491int
11492main ()
11493{
11494
11495 char *name;
11496 struct hostent *he;
11497 struct hostent_data data;
11498
11499 (void) gethostbyname_r(name, he, &data);
11500
11501 ;
11502 return 0;
11503}
11504_ACEOF
11505if ac_fn_c_try_compile "$LINENO"; then :
11506
11507 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11508
11509
11510$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11511
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11513$as_echo "yes" >&6; }
11514
11515else
11516
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11518$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011528 CFLAGS=$OLD_CFLAGS
11529
11530else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 for ac_func in gethostbyname
11533do :
11534 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011535if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011537#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011538_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011540fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011541done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011542
Michael W. Hudson54241132001-12-07 15:38:26 +000011543
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011544fi
11545
Michael W. Hudson54241132001-12-07 15:38:26 +000011546
11547
11548
11549
11550
11551
Guido van Rossum627b2d71993-12-24 10:39:16 +000011552# checks for system services
11553# (none yet)
11554
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011555# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011556ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011557if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011558
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011559else
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11561$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011562if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011564else
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011566LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570/* Override any GCC internal prototype to avoid an error.
11571 Use char because int might match the return type of a GCC
11572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011573#ifdef __cplusplus
11574extern "C"
11575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011576char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011577int
11578main ()
11579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011580return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 ;
11582 return 0;
11583}
11584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011590rm -f core conftest.err conftest.$ac_objext \
11591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011592LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11595$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011596if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 cat >>confdefs.h <<_ACEOF
11598#define HAVE_LIBIEEE 1
11599_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011600
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011601 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011602
Guido van Rossum627b2d71993-12-24 10:39:16 +000011603fi
11604
Michael W. Hudson54241132001-12-07 15:38:26 +000011605
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011606fi
11607
Michael W. Hudson54241132001-12-07 15:38:26 +000011608
Guido van Rossum7f253911997-05-09 02:42:48 +000011609# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11611$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011613# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011614if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011616if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011617then
11618
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011620
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11622$as_echo "yes" >&6; }
11623else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11624$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011625fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011626else
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11628$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629fi
11630
Guido van Rossum7f253911997-05-09 02:42:48 +000011631
Guido van Rossum7f43da71994-08-01 12:15:30 +000011632# check for --with-libm=...
11633
Guido van Rossum563e7081996-09-10 18:20:48 +000011634case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011635Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011636*) LIBM=-lm
11637esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11639$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011641# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011642if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011644if test "$withval" = no
11645then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11647$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011648elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011649then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11651$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011652else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011653fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11656$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657fi
11658
Guido van Rossum7f43da71994-08-01 12:15:30 +000011659
11660# check for --with-libc=...
11661
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11663$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011666if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011668if test "$withval" = no
11669then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11671$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011672elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011673then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11675$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011676else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011677fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011678else
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11680$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011681fi
11682
Guido van Rossum7f43da71994-08-01 12:15:30 +000011683
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684# **************************************************
11685# * Check for various properties of floating point *
11686# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11689$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011690if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011691 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692else
11693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695 ac_cv_little_endian_double=no
11696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698/* end confdefs.h. */
11699
11700#include <string.h>
11701int main() {
11702 double x = 9006104071832581.0;
11703 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11704 return 0;
11705 else
11706 return 1;
11707}
11708
11709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011710if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711 ac_cv_little_endian_double=yes
11712else
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011717fi
11718
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719fi
11720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11722$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011723if test "$ac_cv_little_endian_double" = yes
11724then
11725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727
11728fi
11729
Matthias Kloseb9621712010-04-24 17:59:49 +000011730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11731$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011732if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734else
11735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737 ac_cv_big_endian_double=no
11738else
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740/* end confdefs.h. */
11741
11742#include <string.h>
11743int main() {
11744 double x = 9006104071832581.0;
11745 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11746 return 0;
11747 else
11748 return 1;
11749}
11750
11751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753 ac_cv_big_endian_double=yes
11754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011759fi
11760
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761fi
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11764$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011765if test "$ac_cv_big_endian_double" = yes
11766then
11767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769
11770fi
11771
11772# Some ARM platforms use a mixed-endian representation for doubles.
11773# While Python doesn't currently have full support for these platforms
11774# (see e.g., issue 1762561), we can at least make sure that float <-> string
11775# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11777$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011778if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780else
11781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783 ac_cv_mixed_endian_double=no
11784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786/* end confdefs.h. */
11787
11788#include <string.h>
11789int main() {
11790 double x = 9006104071832581.0;
11791 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11792 return 0;
11793 else
11794 return 1;
11795}
11796
11797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011798if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011799 ac_cv_mixed_endian_double=yes
11800else
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011805fi
11806
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807fi
11808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11810$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011811if test "$ac_cv_mixed_endian_double" = yes
11812then
11813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011815
11816fi
11817
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011818# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011819# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011820# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011821# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011822# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011823# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011824
11825# This inline assembler syntax may also work for suncc and icc,
11826# so we try it on all platforms.
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11829$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831/* end confdefs.h. */
11832
11833int
11834main ()
11835{
11836
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011837 unsigned short cw;
11838 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11839 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011840
11841 ;
11842 return 0;
11843}
11844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846 have_gcc_asm_for_x87=yes
11847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011849fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11852$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011853if test "$have_gcc_asm_for_x87" = yes
11854then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011855
Matthias Kloseb9621712010-04-24 17:59:49 +000011856$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011857
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011858fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011859
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011860# Detect whether system arithmetic is subject to x87-style double
11861# rounding issues. The result of this test has little meaning on non
11862# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11863# mode is round-to-nearest and double rounding issues are present, and
11864# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11866$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011867# $BASECFLAGS may affect the result
11868ac_save_cc="$CC"
11869CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011870if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011871 ac_cv_x87_double_rounding=no
11872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011874/* end confdefs.h. */
11875
11876#include <stdlib.h>
11877#include <math.h>
11878int main() {
11879 volatile double x, y, z;
11880 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11881 x = 0.99999999999999989; /* 1-2**-53 */
11882 y = 1./x;
11883 if (y != 1.)
11884 exit(0);
11885 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11886 x = 1e16;
11887 y = 2.99999;
11888 z = x + y;
11889 if (z != 1e16+4.)
11890 exit(0);
11891 /* both tests show evidence of double rounding */
11892 exit(1);
11893}
11894
11895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011897 ac_cv_x87_double_rounding=no
11898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011903fi
11904
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011905CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11907$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011908if test "$ac_cv_x87_double_rounding" = yes
11909then
11910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011912
11913fi
11914
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011915# ************************************
11916# * Check for mathematical functions *
11917# ************************************
11918
11919LIBS_SAVE=$LIBS
11920LIBS="$LIBS $LIBM"
11921
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011922for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11923do :
11924 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11925ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011926eval as_val=\$$as_ac_var
11927 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011928 cat >>confdefs.h <<_ACEOF
11929#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11930_ACEOF
11931
11932fi
11933done
11934
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011935for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011936do :
11937 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11938ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011939eval as_val=\$$as_ac_var
11940 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011941 cat >>confdefs.h <<_ACEOF
11942#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11943_ACEOF
11944
11945fi
11946done
11947
11948ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11949"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011950if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011951 ac_have_decl=1
11952else
11953 ac_have_decl=0
11954fi
11955
11956cat >>confdefs.h <<_ACEOF
11957#define HAVE_DECL_ISINF $ac_have_decl
11958_ACEOF
11959ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11960"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011961if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011962 ac_have_decl=1
11963else
11964 ac_have_decl=0
11965fi
11966
11967cat >>confdefs.h <<_ACEOF
11968#define HAVE_DECL_ISNAN $ac_have_decl
11969_ACEOF
11970ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11971"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011972if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011973 ac_have_decl=1
11974else
11975 ac_have_decl=0
11976fi
11977
11978cat >>confdefs.h <<_ACEOF
11979#define HAVE_DECL_ISFINITE $ac_have_decl
11980_ACEOF
11981
11982
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011983# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11984# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11986$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011987if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011989else
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011992 ac_cv_tanh_preserves_zero_sign=no
11993else
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011995/* end confdefs.h. */
11996
11997#include <math.h>
11998#include <stdlib.h>
11999int main() {
12000 /* return 0 if either negative zeros don't exist
12001 on this platform or if negative zeros exist
12002 and tanh(-0.) == -0. */
12003 if (atan2(0., -1.) == atan2(-0., -1.) ||
12004 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12005 else exit(1);
12006}
12007
12008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012009if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012010 ac_cv_tanh_preserves_zero_sign=yes
12011else
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12015 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012016fi
12017
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012018fi
12019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12021$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012022if test "$ac_cv_tanh_preserves_zero_sign" = yes
12023then
12024
Matthias Kloseb9621712010-04-24 17:59:49 +000012025$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012026
12027fi
12028
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012029if test "$ac_cv_func_log1p" = yes
12030then
12031 # On some versions of AIX, log1p(-0.) returns 0. instead of
12032 # -0. See issue #9920.
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12034$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012035 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012036 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012037else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012038
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012039 if test "$cross_compiling" = yes; then :
12040 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012041else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12043/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012044
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012045 #include <math.h>
12046 #include <stdlib.h>
12047 int main() {
12048 /* Fail if the signs of log1p(-0.) and -0. can be
12049 distinguished. */
12050 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12051 return 0;
12052 else
12053 return 1;
12054 }
12055
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012056_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012057if ac_fn_c_try_run "$LINENO"; then :
12058 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012059else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012060 ac_cv_log1p_drops_zero_sign=yes
12061fi
12062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012064fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012065
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012066fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012067
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12069$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12070fi
12071if test "$ac_cv_log1p_drops_zero_sign" = yes
12072then
12073
12074$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12075
12076fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012077
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012078LIBS=$LIBS_SAVE
12079
Mark Dickinsona614f042009-11-28 12:48:43 +000012080# For multiprocessing module, check that sem_open
12081# actually works. For FreeBSD versions <= 7.2,
12082# the kernel module that provides POSIX semaphores
12083# isn't loaded by default, so an attempt to call
12084# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12086$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012087if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012089else
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012091 ac_cv_posix_semaphores_enabled=yes
12092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012094/* end confdefs.h. */
12095
12096#include <unistd.h>
12097#include <fcntl.h>
12098#include <stdio.h>
12099#include <semaphore.h>
12100#include <sys/stat.h>
12101
12102int main(void) {
12103 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12104 if (a == SEM_FAILED) {
12105 perror("sem_open");
12106 return 1;
12107 }
12108 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012109 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012110 return 0;
12111}
12112
12113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012114if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012115 ac_cv_posix_semaphores_enabled=yes
12116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12120 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012121fi
12122
12123
Mark Dickinsona614f042009-11-28 12:48:43 +000012124fi
12125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12127$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012128if test $ac_cv_posix_semaphores_enabled = no
12129then
12130
Matthias Kloseb9621712010-04-24 17:59:49 +000012131$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012132
12133fi
12134
Mark Dickinson10683072009-04-18 21:18:19 +000012135# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12137$as_echo_n "checking for broken sem_getvalue... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012138if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012142 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012145/* end confdefs.h. */
12146
12147#include <unistd.h>
12148#include <fcntl.h>
12149#include <stdio.h>
12150#include <semaphore.h>
12151#include <sys/stat.h>
12152
12153int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012154 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012155 int count;
12156 int res;
12157 if(a==SEM_FAILED){
12158 perror("sem_open");
12159 return 1;
12160
12161 }
12162 res = sem_getvalue(a, &count);
12163 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012164 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012165 return res==-1 ? 1 : 0;
12166}
12167
Mark Dickinson10683072009-04-18 21:18:19 +000012168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012169if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012170 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012171else
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012176fi
12177
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012179fi
12180
Matthias Kloseb9621712010-04-24 17:59:49 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12182$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012183if test $ac_cv_broken_sem_getvalue = yes
12184then
12185
Matthias Kloseb9621712010-04-24 17:59:49 +000012186$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012187
12188fi
12189
Mark Dickinsonbd792642009-03-18 20:06:12 +000012190# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12192$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012193# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012194if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012195 enableval=$enable_big_digits; case $enable_big_digits in
12196yes)
12197 enable_big_digits=30 ;;
12198no)
12199 enable_big_digits=15 ;;
1220015|30)
12201 ;;
12202*)
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012203 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 +000012204esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12206$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012207
12208cat >>confdefs.h <<_ACEOF
12209#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12210_ACEOF
12211
12212
12213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12215$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012216fi
12217
12218
Guido van Rossumef2255b2000-03-10 22:30:29 +000012219# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012220ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012221if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012222
12223
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012225
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012226 wchar_h="yes"
12227
Guido van Rossumef2255b2000-03-10 22:30:29 +000012228else
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012230
12231fi
12232
Michael W. Hudson54241132001-12-07 15:38:26 +000012233
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012235# determine wchar_t size
12236if test "$wchar_h" = yes
12237then
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12241# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12243$as_echo_n "checking size of wchar_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012244if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12248"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
Martin v. Löwis11437992002-04-12 09:54:03 +000012250else
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 if test "$ac_cv_type_wchar_t" = yes; then
12252 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012254{ as_fn_set_status 77
12255as_fn_error "cannot compute sizeof (wchar_t)
12256See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257 else
12258 ac_cv_sizeof_wchar_t=0
12259 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012261
Martin v. Löwis11437992002-04-12 09:54:03 +000012262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12264$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265
12266
12267
Martin v. Löwis11437992002-04-12 09:54:03 +000012268cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012269#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012270_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012271
Michael W. Hudson54241132001-12-07 15:38:26 +000012272
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012273fi
12274
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12276$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012277have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012279/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012280
12281#include <tcl.h>
12282#if TCL_UTF_MAX != 6
12283# error "NOT UCS4_TCL"
12284#endif
12285int
12286main ()
12287{
12288
12289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012294
12295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012297
12298 have_ucs4_tcl=yes
12299
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12303$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012304
Skip Montanaro6dead952003-09-25 14:50:04 +000012305# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012306if test "$wchar_h" = yes
12307then
12308 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12310$as_echo_n "checking whether wchar_t is signed... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012311 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012313else
12314
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012316 ac_cv_wchar_t_signed=yes
12317else
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012320
12321 #include <wchar.h>
12322 int main()
12323 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012324 /* Success: exit code 0 */
12325 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012326 }
12327
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012330 ac_cv_wchar_t_signed=yes
12331else
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12335 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012336fi
12337
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012338fi
12339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12341$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342fi
12343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12345$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012346
12347# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012348if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012349 withval=$with_wide_unicode;
12350if test "$withval" != no
12351then unicode_size="4"
12352else unicode_size="2"
12353fi
12354
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012355else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356
Georg Brandl52d168a2008-01-07 18:10:24 +000012357case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012358 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012359 *) unicode_size="2" ;;
12360esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012361
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012362fi
12363
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012364
12365
Georg Brandl52d168a2008-01-07 18:10:24 +000012366case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012367 4)
12368 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12369
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012370 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012371 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012372 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012373 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012374esac
12375
Michael W. Hudson54241132001-12-07 15:38:26 +000012376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377
Georg Brandl52d168a2008-01-07 18:10:24 +000012378# wchar_t is only usable if it maps to an unsigned type
12379if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012380 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012381then
12382 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012387
Georg Brandl52d168a2008-01-07 18:10:24 +000012388elif test "$ac_cv_sizeof_short" = "$unicode_size"
12389then
12390 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012392
Georg Brandl52d168a2008-01-07 18:10:24 +000012393elif test "$ac_cv_sizeof_long" = "$unicode_size"
12394then
12395 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012397
Georg Brandl52d168a2008-01-07 18:10:24 +000012398else
12399 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12402$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012403
12404# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12406$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012407if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012409else
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 ac_cv_c_bigendian=unknown
12411 # See if we're dealing with a universal compiler.
12412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12413/* end confdefs.h. */
12414#ifndef __APPLE_CC__
12415 not a universal capable compiler
12416 #endif
12417 typedef int dummy;
12418
Skip Montanaro6dead952003-09-25 14:50:04 +000012419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012420if ac_fn_c_try_compile "$LINENO"; then :
12421
12422 # Check for potential -arch flags. It is not universal unless
12423 # there are at least two -arch flags with different values.
12424 ac_arch=
12425 ac_prev=
12426 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12427 if test -n "$ac_prev"; then
12428 case $ac_word in
12429 i?86 | x86_64 | ppc | ppc64)
12430 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12431 ac_arch=$ac_word
12432 else
12433 ac_cv_c_bigendian=universal
12434 break
12435 fi
12436 ;;
12437 esac
12438 ac_prev=
12439 elif test "x$ac_word" = "x-arch"; then
12440 ac_prev=arch
12441 fi
12442 done
12443fi
12444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12445 if test $ac_cv_c_bigendian = unknown; then
12446 # See if sys/param.h defines the BYTE_ORDER macro.
12447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012448/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012449#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012451
Martin v. Löwis11437992002-04-12 09:54:03 +000012452int
12453main ()
12454{
Matthias Kloseb9621712010-04-24 17:59:49 +000012455#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12456 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12457 && LITTLE_ENDIAN)
12458 bogus endian macros
12459 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
12461 ;
12462 return 0;
12463}
12464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012465if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012466 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012468/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012469#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471
Martin v. Löwis11437992002-04-12 09:54:03 +000012472int
12473main ()
12474{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012475#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 not big endian
12477 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
12479 ;
12480 return 0;
12481}
12482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012483if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012484 ac_cv_c_bigendian=yes
12485else
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012489fi
12490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12491 fi
12492 if test $ac_cv_c_bigendian = unknown; then
12493 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012495/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012496#include <limits.h>
12497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Matthias Kloseb9621712010-04-24 17:59:49 +000012501#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12502 bogus endian macros
12503 #endif
12504
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 ;
12506 return 0;
12507}
12508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012509if ac_fn_c_try_compile "$LINENO"; then :
12510 # It does; now see whether it defined to _BIG_ENDIAN or not.
12511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12512/* end confdefs.h. */
12513#include <limits.h>
12514
12515int
12516main ()
12517{
12518#ifndef _BIG_ENDIAN
12519 not big endian
12520 #endif
12521
12522 ;
12523 return 0;
12524}
12525_ACEOF
12526if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012528else
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12532fi
12533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12534 fi
12535 if test $ac_cv_c_bigendian = unknown; then
12536 # Compile a test program.
12537 if test "$cross_compiling" = yes; then :
12538 # Try to guess by grepping values from an object file.
12539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12540/* end confdefs.h. */
12541short int ascii_mm[] =
12542 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12543 short int ascii_ii[] =
12544 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12545 int use_ascii (int i) {
12546 return ascii_mm[i] + ascii_ii[i];
12547 }
12548 short int ebcdic_ii[] =
12549 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12550 short int ebcdic_mm[] =
12551 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12552 int use_ebcdic (int i) {
12553 return ebcdic_mm[i] + ebcdic_ii[i];
12554 }
12555 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012556
Matthias Kloseb9621712010-04-24 17:59:49 +000012557int
12558main ()
12559{
12560return use_ascii (foo) == use_ebcdic (foo);
12561 ;
12562 return 0;
12563}
12564_ACEOF
12565if ac_fn_c_try_compile "$LINENO"; then :
12566 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12567 ac_cv_c_bigendian=yes
12568 fi
12569 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12570 if test "$ac_cv_c_bigendian" = unknown; then
12571 ac_cv_c_bigendian=no
12572 else
12573 # finding both strings is unlikely to happen, but who knows?
12574 ac_cv_c_bigendian=unknown
12575 fi
12576 fi
12577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012579else
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012581/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012583int
12584main ()
12585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 /* Are we little or big endian? From Harbison&Steele. */
12588 union
12589 {
12590 long int l;
12591 char c[sizeof (long int)];
12592 } u;
12593 u.l = 1;
12594 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595
12596 ;
12597 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012598}
Martin v. Löwis11437992002-04-12 09:54:03 +000012599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012600if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012601 ac_cv_c_bigendian=no
12602else
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12612$as_echo "$ac_cv_c_bigendian" >&6; }
12613 case $ac_cv_c_bigendian in #(
12614 yes)
12615 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12616;; #(
12617 no)
12618 ;; #(
12619 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012620
Matthias Kloseb9621712010-04-24 17:59:49 +000012621$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012622
Matthias Kloseb9621712010-04-24 17:59:49 +000012623 ;; #(
12624 *)
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012625 as_fn_error "unknown endianness
12626 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012628
Michael W. Hudson54241132001-12-07 15:38:26 +000012629
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012630# ABI version string for Python extension modules. This appears between the
12631# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12632# from the following attributes which affect the ABI of this Python build (in
12633# this order):
12634#
12635# * The Python implementation (always 'cpython-' for us)
12636# * The major and minor version numbers
12637# * --with-pydebug (adds a 'd')
12638# * --with-pymalloc (adds a 'm')
12639# * --with-wide-unicode (adds a 'u')
12640#
12641# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012642# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12643# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012644
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12646$as_echo_n "checking ABIFLAGS... " >&6; }
12647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12648$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12650$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012651SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12653$as_echo "$SOABI" >&6; }
12654
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12656$as_echo_n "checking LDVERSION... " >&6; }
12657LDVERSION='$(VERSION)$(ABIFLAGS)'
12658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12659$as_echo "$LDVERSION" >&6; }
12660
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012661# SO is the extension of shared libraries `(including the dot!)
12662# -- usually .so, .sl on HP-UX, .dll on Cygwin
12663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12664$as_echo_n "checking SO... " >&6; }
12665if test -z "$SO"
12666then
12667 case $ac_sys_system in
12668 hp*|HP*)
12669 case `uname -m` in
12670 ia64) SO=.so;;
12671 *) SO=.sl;;
12672 esac
12673 ;;
12674 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012675 Linux*|GNU*)
12676 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012677 *) SO=.so;;
12678 esac
12679else
12680 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012681 echo
12682 echo '====================================================================='
12683 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012684 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012685 echo '+ Do you really mean to change the extension for shared libraries? +'
12686 echo '+ Continuing in 10 seconds to let you to ponder. +'
12687 echo '+ +'
12688 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012689 sleep 10
12690fi
12691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12692$as_echo "$SO" >&6; }
12693
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012694# Check whether right shifting a negative integer extends the sign bit
12695# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12697$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012698if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012700else
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012703 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012704else
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012706/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012707
12708int main()
12709{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012710 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012711}
12712
Martin v. Löwis11437992002-04-12 09:54:03 +000012713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012715 ac_cv_rshift_extends_sign=yes
12716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012721fi
12722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723fi
12724
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12726$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012727if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012728then
Martin v. Löwis11437992002-04-12 09:54:03 +000012729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012731
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012732fi
12733
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012734# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12736$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012737if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012739else
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012742/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012743#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012744int
12745main ()
12746{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012747
12748 FILE *f = fopen("/dev/null", "r");
12749 flockfile(f);
12750 getc_unlocked(f);
12751 funlockfile(f);
12752
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 ;
12754 return 0;
12755}
12756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012757if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012758 ac_cv_have_getc_unlocked=yes
12759else
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 ac_cv_have_getc_unlocked=no
12761fi
12762rm -f core conftest.err conftest.$ac_objext \
12763 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12767$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012768if test "$ac_cv_have_getc_unlocked" = yes
12769then
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012772
12773fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012774
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012775# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012776# save the value of LIBS so we don't actually link Python with readline
12777LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012778
Gregory P. Smith18820942008-09-07 06:24:49 +000012779# On some systems we need to link readline to a termcap compatible
12780# library. NOTE: Keep the precedence of listed libraries synchronised
12781# with setup.py.
12782py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12784$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012785for py_libtermcap in "" ncursesw ncurses curses termcap; do
12786 if test -z "$py_libtermcap"; then
12787 READLINE_LIBS="-lreadline"
12788 else
12789 READLINE_LIBS="-lreadline -l$py_libtermcap"
12790 fi
12791 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012793/* end confdefs.h. */
12794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795/* Override any GCC internal prototype to avoid an error.
12796 Use char because int might match the return type of a GCC
12797 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012798#ifdef __cplusplus
12799extern "C"
12800#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012801char readline ();
12802int
12803main ()
12804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012806 ;
12807 return 0;
12808}
12809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012810if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012811 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012813rm -f core conftest.err conftest.$ac_objext \
12814 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012815 if test $py_cv_lib_readline = yes; then
12816 break
12817 fi
12818done
12819# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12820#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012821if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12823$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012824else
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12826$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012829
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012830fi
12831
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012832# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12834$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012835if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012836 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012837else
12838 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012839LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012841/* end confdefs.h. */
12842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843/* Override any GCC internal prototype to avoid an error.
12844 Use char because int might match the return type of a GCC
12845 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012846#ifdef __cplusplus
12847extern "C"
12848#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012849char rl_callback_handler_install ();
12850int
12851main ()
12852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012854 ;
12855 return 0;
12856}
12857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012859 ac_cv_lib_readline_rl_callback_handler_install=yes
12860else
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012863rm -f core conftest.err conftest.$ac_objext \
12864 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012865LIBS=$ac_check_lib_save_LIBS
12866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12868$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012869if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012872
12873fi
12874
12875
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012876# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012878/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012879#include <readline/readline.h>
12880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012881if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012882 have_readline=yes
12883else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012884 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012885
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012886fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012887rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012888if test $have_readline = yes
12889then
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012891/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012892#include <readline/readline.h>
12893
12894_ACEOF
12895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012899
12900fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012901rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012904/* end confdefs.h. */
12905#include <readline/readline.h>
12906
12907_ACEOF
12908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012912
12913fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012914rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012915
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012916fi
12917
Martin v. Löwis0daad592001-09-30 21:09:59 +000012918# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12920$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012921if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012923else
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012925LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929/* Override any GCC internal prototype to avoid an error.
12930 Use char because int might match the return type of a GCC
12931 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012932#ifdef __cplusplus
12933extern "C"
12934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012935char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012936int
12937main ()
12938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 ;
12941 return 0;
12942}
12943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012944if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012949rm -f core conftest.err conftest.$ac_objext \
12950 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012951LIBS=$ac_check_lib_save_LIBS
12952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12954$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012955if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012958
Martin v. Löwis0daad592001-09-30 21:09:59 +000012959fi
12960
Michael W. Hudson54241132001-12-07 15:38:26 +000012961
Thomas Wouters89d996e2007-09-08 17:39:28 +000012962# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12964$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012965if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012967else
12968 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012969LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012971/* end confdefs.h. */
12972
12973/* Override any GCC internal prototype to avoid an error.
12974 Use char because int might match the return type of a GCC
12975 builtin and then its argument prototype would still apply. */
12976#ifdef __cplusplus
12977extern "C"
12978#endif
12979char rl_completion_display_matches_hook ();
12980int
12981main ()
12982{
12983return rl_completion_display_matches_hook ();
12984 ;
12985 return 0;
12986}
12987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012988if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012989 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12990else
Matthias Kloseb9621712010-04-24 17:59:49 +000012991 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012993rm -f core conftest.err conftest.$ac_objext \
12994 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012995LIBS=$ac_check_lib_save_LIBS
12996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12998$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012999if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013002
13003fi
13004
13005
Martin v. Löwis0daad592001-09-30 21:09:59 +000013006# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13008$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013009if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013010 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013011else
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013013LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013017/* Override any GCC internal prototype to avoid an error.
13018 Use char because int might match the return type of a GCC
13019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013020#ifdef __cplusplus
13021extern "C"
13022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013023char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013024int
13025main ()
13026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013027return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 ;
13029 return 0;
13030}
13031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013032if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013034else
Matthias Kloseb9621712010-04-24 17:59:49 +000013035 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013037rm -f core conftest.err conftest.$ac_objext \
13038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013039LIBS=$ac_check_lib_save_LIBS
13040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13042$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013043if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013046
Guido van Rossum353ae582001-07-10 16:45:32 +000013047fi
13048
Jack Jansendd19cf82001-12-06 22:36:17 +000013049
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013050# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013052/* end confdefs.h. */
13053#include <readline/readline.h>
13054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013055if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013056 have_readline=yes
13057else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013058 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013059
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013060fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050013061rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013062if test $have_readline = yes
13063then
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013065/* end confdefs.h. */
13066#include <readline/readline.h>
13067
13068_ACEOF
13069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013071
Matthias Kloseb9621712010-04-24 17:59:49 +000013072$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013073
13074fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013075rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013076
13077fi
13078
Martin v. Löwis82bca632006-02-10 20:49:30 +000013079# End of readline checks: restore LIBS
13080LIBS=$LIBS_no_readline
13081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13083$as_echo_n "checking for broken nice()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013084if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013086else
Martin v. Löwis11437992002-04-12 09:54:03 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013089 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013090else
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013092/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013093
13094int main()
13095{
13096 int val1 = nice(1);
13097 if (val1 != -1 && val1 == nice(2))
13098 exit(0);
13099 exit(1);
13100}
13101
Martin v. Löwis11437992002-04-12 09:54:03 +000013102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013103if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013104 ac_cv_broken_nice=yes
13105else
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13109 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013110fi
13111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112fi
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13115$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013116if test "$ac_cv_broken_nice" = yes
13117then
Martin v. Löwis11437992002-04-12 09:54:03 +000013118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013120
13121fi
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13124$as_echo_n "checking for broken poll()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013125if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013129 ac_cv_broken_poll=no
13130else
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013132/* end confdefs.h. */
13133
13134#include <poll.h>
13135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013136int main()
13137{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013138 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013140
13141 close (42);
13142
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013143 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013144 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013146 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013148 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013149 return 1;
13150}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013151
13152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013153if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013154 ac_cv_broken_poll=yes
13155else
Matthias Kloseb9621712010-04-24 17:59:49 +000013156 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13159 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013161
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013162fi
13163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13165$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013166if test "$ac_cv_broken_poll" = yes
13167then
13168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013170
13171fi
13172
Brett Cannon43802422005-02-10 20:48:03 +000013173# 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 +000013174# (which is not required by ISO C or UNIX spec) and/or if we support
13175# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013176ac_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 +000013177#include <$ac_cv_struct_tm>
13178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013180if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013181
13182cat >>confdefs.h <<_ACEOF
13183#define HAVE_STRUCT_TM_TM_ZONE 1
13184_ACEOF
13185
13186
13187fi
13188
13189if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013192
13193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13195"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013196if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198else
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200fi
13201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013202cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013203#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013204_ACEOF
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13207$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013208if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013210else
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013212/* end confdefs.h. */
13213#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214#if !HAVE_DECL_TZNAME
13215extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013216#endif
13217
13218int
13219main ()
13220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013221return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013222 ;
13223 return 0;
13224}
13225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013226if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013227 ac_cv_var_tzname=yes
13228else
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013231rm -f core conftest.err conftest.$ac_objext \
13232 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13235$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013236 if test $ac_cv_var_tzname = yes; then
13237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013239
13240 fi
13241fi
13242
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013243
Martin v. Löwis1d459062005-03-14 21:23:33 +000013244# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13246$as_echo_n "checking for working tzset()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013247if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013249else
13250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013252 ac_cv_working_tzset=no
13253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013255/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013256
13257#include <stdlib.h>
13258#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013259#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013260
13261#if HAVE_TZNAME
13262extern char *tzname[];
13263#endif
13264
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013265int main()
13266{
Brett Cannon18367812003-09-19 00:59:16 +000013267 /* Note that we need to ensure that not only does tzset(3)
13268 do 'something' with localtime, but it works as documented
13269 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013270 This includes making sure that tzname is set properly if
13271 tm->tm_zone does not exist since it is the alternative way
13272 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013273
13274 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013275 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013276 */
13277
Martin v. Löwis1d459062005-03-14 21:23:33 +000013278 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013279 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13280
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013281 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013282 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013283 if (localtime(&groundhogday)->tm_hour != 0)
13284 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013285#if HAVE_TZNAME
13286 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13287 if (strcmp(tzname[0], "UTC") ||
13288 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13289 exit(1);
13290#endif
Brett Cannon18367812003-09-19 00:59:16 +000013291
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013292 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013293 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013294 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013295 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013296#if HAVE_TZNAME
13297 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13298 exit(1);
13299#endif
Brett Cannon18367812003-09-19 00:59:16 +000013300
13301 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13302 tzset();
13303 if (localtime(&groundhogday)->tm_hour != 11)
13304 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013305#if HAVE_TZNAME
13306 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13307 exit(1);
13308#endif
13309
13310#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013311 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13312 exit(1);
13313 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13314 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013315#endif
Brett Cannon18367812003-09-19 00:59:16 +000013316
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013317 exit(0);
13318}
13319
13320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013321if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013322 ac_cv_working_tzset=yes
13323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013328fi
13329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330fi
13331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13333$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013334if test "$ac_cv_working_tzset" = yes
13335then
13336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013338
13339fi
13340
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013341# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13343$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013344if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013348/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013349#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013350int
13351main ()
13352{
13353
13354struct stat st;
13355st.st_mtim.tv_nsec = 1;
13356
13357 ;
13358 return 0;
13359}
13360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013362 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013363else
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13367fi
13368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13370$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013371if test "$ac_cv_stat_tv_nsec" = yes
13372then
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013375
13376fi
13377
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013378# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13380$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013381if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013383else
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013385/* end confdefs.h. */
13386#include <sys/stat.h>
13387int
13388main ()
13389{
13390
13391struct stat st;
13392st.st_mtimespec.tv_nsec = 1;
13393
13394 ;
13395 return 0;
13396}
13397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013399 ac_cv_stat_tv_nsec2=yes
13400else
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13404fi
13405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13407$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013408if test "$ac_cv_stat_tv_nsec2" = yes
13409then
13410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013412
13413fi
13414
Jack Jansen666b1e72001-10-31 12:11:48 +000013415# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13417$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013418if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013422/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013423#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013424int
13425main ()
13426{
Jack Jansen666b1e72001-10-31 12:11:48 +000013427
13428 int rtn;
13429 rtn = mvwdelch(0,0,0);
13430
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 ;
13432 return 0;
13433}
13434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013435if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013436 ac_cv_mvwdelch_is_expression=yes
13437else
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13441fi
13442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13444$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013445
13446if test "$ac_cv_mvwdelch_is_expression" = yes
13447then
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013450
13451fi
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13454$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013455if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013457else
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013459/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013460#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013461int
13462main ()
13463{
Jack Jansen666b1e72001-10-31 12:11:48 +000013464
13465 WINDOW *w;
13466 w->_flags = 0;
13467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 ;
13469 return 0;
13470}
13471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013472if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013473 ac_cv_window_has_flags=yes
13474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13478fi
13479
Matthias Kloseb9621712010-04-24 17:59:49 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13481$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013482
Jack Jansen666b1e72001-10-31 12:11:48 +000013483
13484if test "$ac_cv_window_has_flags" = yes
13485then
Martin v. Löwis11437992002-04-12 09:54:03 +000013486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013488
13489fi
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13492$as_echo_n "checking for is_term_resized... " >&6; }
13493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013494/* end confdefs.h. */
13495#include <curses.h>
13496int
13497main ()
13498{
13499void *x=is_term_resized
13500 ;
13501 return 0;
13502}
13503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013505
Matthias Kloseb9621712010-04-24 17:59:49 +000013506$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013507
Matthias Kloseb159a552010-04-25 21:00:44 +000013508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013509$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013510else
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13512$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013513
13514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13518$as_echo_n "checking for resize_term... " >&6; }
13519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013520/* end confdefs.h. */
13521#include <curses.h>
13522int
13523main ()
13524{
13525void *x=resize_term
13526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013533
Matthias Kloseb159a552010-04-25 21:00:44 +000013534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013536else
Matthias Kloseb9621712010-04-24 17:59:49 +000013537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13538$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013539
13540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542
Matthias Kloseb9621712010-04-24 17:59:49 +000013543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13544$as_echo_n "checking for resizeterm... " >&6; }
13545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013546/* end confdefs.h. */
13547#include <curses.h>
13548int
13549main ()
13550{
13551void *x=resizeterm
13552 ;
13553 return 0;
13554}
13555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013556if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013559
Matthias Kloseb159a552010-04-25 21:00:44 +000013560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013561$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13564$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013565
13566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13570$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013571
13572if test -r /dev/ptmx
13573then
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13575$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013578
Thomas Wouters89f507f2006-12-13 04:49:30 +000013579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13581$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013582fi
13583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13585$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013586
13587if test -r /dev/ptc
13588then
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13590$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013593
Thomas Wouters89f507f2006-12-13 04:49:30 +000013594else
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13596$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013597fi
13598
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013599if test "$have_long_long" = yes
13600then
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13602$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013603 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013605else
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013607 ac_cv_have_long_long_format=no
13608else
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013610/* end confdefs.h. */
13611
13612 #include <stdio.h>
13613 #include <stddef.h>
13614 #include <string.h>
13615
13616 #ifdef HAVE_SYS_TYPES_H
13617 #include <sys/types.h>
13618 #endif
13619
13620 int main()
13621 {
13622 char buffer[256];
13623
13624 if (sprintf(buffer, "%lld", (long long)123) < 0)
13625 return 1;
13626 if (strcmp(buffer, "123"))
13627 return 1;
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, "%llu", (unsigned long long)123) < 0)
13635 return 1;
13636 if (strcmp(buffer, "123"))
13637 return 1;
13638
13639 return 0;
13640 }
13641
13642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013643if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013644 ac_cv_have_long_long_format=yes
13645else
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013650fi
13651
13652
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013653fi
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13656$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013657fi
13658
Mark Dickinson89d7d412009-12-31 20:50:59 +000013659if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013660then
13661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013663
13664fi
13665
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013666if test $ac_sys_system = Darwin
13667then
13668 LIBS="$LIBS -framework CoreFoundation"
13669fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13672$as_echo_n "checking for %zd printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013673if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013675else
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013677 ac_cv_have_size_t_format="cross -- assuming yes"
13678
Thomas Wouters477c8d52006-05-27 19:21:47 +000013679else
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013681/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013682
Thomas Wouters477c8d52006-05-27 19:21:47 +000013683#include <stdio.h>
13684#include <stddef.h>
13685#include <string.h>
13686
Christian Heimes2c181612007-12-17 20:04:13 +000013687#ifdef HAVE_SYS_TYPES_H
13688#include <sys/types.h>
13689#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013690
13691#ifdef HAVE_SSIZE_T
13692typedef ssize_t Py_ssize_t;
13693#elif SIZEOF_VOID_P == SIZEOF_LONG
13694typedef long Py_ssize_t;
13695#else
13696typedef int Py_ssize_t;
13697#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013698
Christian Heimes2c181612007-12-17 20:04:13 +000013699int main()
13700{
13701 char buffer[256];
13702
Thomas Wouters477c8d52006-05-27 19:21:47 +000013703 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13704 return 1;
13705
Thomas Wouters89f507f2006-12-13 04:49:30 +000013706 if (strcmp(buffer, "123"))
13707 return 1;
13708
13709 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13710 return 1;
13711
13712 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013713 return 1;
13714
13715 return 0;
13716}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013717
Thomas Wouters477c8d52006-05-27 19:21:47 +000013718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013719if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013720 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013721else
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013726fi
13727
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13730$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013731if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013734
13735fi
13736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013738#ifdef HAVE_SYS_TYPES_H
13739#include <sys/types.h>
13740#endif
13741#ifdef HAVE_SYS_SOCKET_H
13742#include <sys/socket.h>
13743#endif
13744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013746if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013751
13752fi
13753
Michael W. Hudson54241132001-12-07 15:38:26 +000013754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13756$as_echo_n "checking for broken mbstowcs... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013757if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013759else
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013761 ac_cv_broken_mbstowcs=no
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013764/* end confdefs.h. */
13765
13766#include<stdlib.h>
13767int main() {
13768 size_t len = -1;
13769 const char *str = "text";
13770 len = mbstowcs(NULL, str, 0);
13771 return (len != 4);
13772}
13773
13774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013775if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013776 ac_cv_broken_mbstowcs=no
13777else
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013782fi
13783
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013784fi
13785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13787$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013788if test "$ac_cv_broken_mbstowcs" = yes
13789then
13790
Matthias Kloseb9621712010-04-24 17:59:49 +000013791$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013792
13793fi
13794
Antoine Pitrou042b1282010-08-13 21:15:58 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13796$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013797if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013798 $as_echo_n "(cached) " >&6
13799else
13800 if test "$cross_compiling" = yes; then :
13801 ac_cv_computed_gotos=no
13802else
13803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13804/* end confdefs.h. */
13805
13806int main(int argc, char **argv)
13807{
13808 static void *targets[1] = { &&LABEL1 };
13809 goto LABEL2;
13810LABEL1:
13811 return 0;
13812LABEL2:
13813 goto *targets[0];
13814 return 1;
13815}
13816
13817_ACEOF
13818if ac_fn_c_try_run "$LINENO"; then :
13819 ac_cv_computed_gotos=yes
13820else
13821 ac_cv_computed_gotos=no
13822fi
13823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13824 conftest.$ac_objext conftest.beam conftest.$ac_ext
13825fi
13826
13827fi
13828
13829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13830$as_echo "$ac_cv_computed_gotos" >&6; }
13831if test "$ac_cv_computed_gotos" = yes
13832then
13833
13834$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13835
13836fi
13837
Antoine Pitroub52ec782009-01-25 16:34:23 +000013838# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13840$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013841
13842# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013843if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013844 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013845if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013846then
13847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13851$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013852fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013853if test "$withval" = no
13854then
13855
13856$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13859$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013860fi
13861
Antoine Pitrou042b1282010-08-13 21:15:58 +000013862else
13863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13864$as_echo "no value specified" >&6; }
13865fi
13866
Antoine Pitroub52ec782009-01-25 16:34:23 +000013867
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013868case $ac_sys_system in
13869AIX*)
13870
13871$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13872 ;;
13873esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013874
Michael W. Hudson54241132001-12-07 15:38:26 +000013875
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013876
13877
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013878for h in `(cd $srcdir;echo Python/thread_*.h)`
13879do
13880 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13881done
13882
Michael W. Hudson54241132001-12-07 15:38:26 +000013883
Neal Norwitzd24499d2005-12-18 21:36:39 +000013884SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13886$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013887for dir in $SRCDIRS; do
13888 if test ! -d $dir; then
13889 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013890 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013891done
Matthias Kloseb9621712010-04-24 17:59:49 +000013892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13893$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013894
Guido van Rossum627b2d71993-12-24 10:39:16 +000013895# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013896ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013897
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013898ac_config_files="$ac_config_files Modules/ld_so_aix"
13899
Martin v. Löwis11437992002-04-12 09:54:03 +000013900cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013901# This file is a shell script that caches the results of configure
13902# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013903# scripts and configure runs, see configure's option --config-cache.
13904# It is not useful on other systems. If it contains results you don't
13905# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906#
Martin v. Löwis11437992002-04-12 09:54:03 +000013907# config.status only pays attention to the cache file if you give it
13908# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013909#
Skip Montanaro6dead952003-09-25 14:50:04 +000013910# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013911# loading this file, other *unset* `ac_cv_foo' will be assigned the
13912# following values.
13913
13914_ACEOF
13915
Guido van Rossumf78abae1997-01-21 22:02:36 +000013916# The following way of writing the cache mishandles newlines in values,
13917# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013919# Ultrix sh set writes to stderr and can't be redirected directly,
13920# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921(
13922 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13923 eval ac_val=\$$ac_var
13924 case $ac_val in #(
13925 *${as_nl}*)
13926 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13928$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929 esac
13930 case $ac_var in #(
13931 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13933 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934 esac ;;
13935 esac
13936 done
13937
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13940 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 # `set' does not quote correctly, so add quotes: double-quote
13942 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013944 "s/'/'\\\\''/g;
13945 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 *)
13948 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013950 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951 esac |
13952 sort
13953) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013954 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013955 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013956 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013958 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13959 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13961 :end' >>confcache
13962if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13963 if test -w "$cache_file"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013964 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13966$as_echo "$as_me: updating cache $cache_file" >&6;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013967 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013968 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13970$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013971 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013973rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013974
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013975test "x$prefix" = xNONE && prefix=$ac_default_prefix
13976# Let make expand exec_prefix.
13977test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013978
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013979DEFS=-DHAVE_CONFIG_H
13980
Skip Montanaro6dead952003-09-25 14:50:04 +000013981ac_libobjs=
13982ac_ltlibobjs=
13983for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13984 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13988 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13990 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013991done
13992LIBOBJS=$ac_libobjs
13993
13994LTLIBOBJS=$ac_ltlibobjs
13995
13996
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
Matthias Kloseb9621712010-04-24 17:59:49 +000013998
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013999: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000014000ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014001ac_clean_files_save=$ac_clean_files
14002ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014003{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14004$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14005as_write_fail=0
14006cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014007#! $SHELL
14008# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014009# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014010# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014011# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014012
Martin v. Löwis11437992002-04-12 09:54:03 +000014013debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014014ac_cs_recheck=false
14015ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014016
Matthias Kloseb9621712010-04-24 17:59:49 +000014017SHELL=\${CONFIG_SHELL-$SHELL}
14018export SHELL
14019_ASEOF
14020cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14021## -------------------- ##
14022## M4sh Initialization. ##
14023## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014025# Be more Bourne compatible
14026DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014027if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 emulate sh
14029 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014031 # is contrary to our usage. Disable this feature.
14032 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014034else
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 case `(set -o) 2>/dev/null` in #(
14036 *posix*) :
14037 set -o posix ;; #(
14038 *) :
14039 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014040esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014041fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014042
14043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044as_nl='
14045'
14046export as_nl
14047# Printing a long string crashes Solaris 7 /usr/bin/printf.
14048as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14049as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14050as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14051# Prefer a ksh shell builtin over an external printf program on Solaris,
14052# but without wasting forks for bash or zsh.
14053if test -z "$BASH_VERSION$ZSH_VERSION" \
14054 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14055 as_echo='print -r --'
14056 as_echo_n='print -rn --'
14057elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14058 as_echo='printf %s\n'
14059 as_echo_n='printf %s'
14060else
14061 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14062 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14063 as_echo_n='/usr/ucb/echo -n'
14064 else
14065 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14066 as_echo_n_body='eval
14067 arg=$1;
14068 case $arg in #(
14069 *"$as_nl"*)
14070 expr "X$arg" : "X\\(.*\\)$as_nl";
14071 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14072 esac;
14073 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14074 '
14075 export as_echo_n_body
14076 as_echo_n='sh -c $as_echo_n_body as_echo'
14077 fi
14078 export as_echo_body
14079 as_echo='sh -c $as_echo_body as_echo'
14080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
14082# The user is always right.
14083if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 PATH_SEPARATOR=:
14085 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14086 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14087 PATH_SEPARATOR=';'
14088 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091
14092# IFS
14093# We need space, tab and new line, in precisely that order. Quoting is
14094# there to prevent editors from complaining about space-tab.
14095# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14096# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097IFS=" "" $as_nl"
14098
14099# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014100case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014101 *[\\/]* ) as_myself=$0 ;;
14102 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014103for as_dir in $PATH
14104do
14105 IFS=$as_save_IFS
14106 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14108 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014109IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111 ;;
14112esac
14113# We did not find ourselves, most probably we were run as `sh COMMAND'
14114# in which case we are not to be found in the path.
14115if test "x$as_myself" = x; then
14116 as_myself=$0
14117fi
14118if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14120 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121fi
14122
Matthias Kloseb9621712010-04-24 17:59:49 +000014123# Unset variables that we do not need and which cause bugs (e.g. in
14124# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14125# suppresses any "Segmentation fault" message there. '((' could
14126# trigger a bug in pdksh 5.2.14.
14127for as_var in BASH_ENV ENV MAIL MAILPATH
14128do eval test x\${$as_var+set} = xset \
14129 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130done
14131PS1='$ '
14132PS2='> '
14133PS4='+ '
14134
14135# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014136LC_ALL=C
14137export LC_ALL
14138LANGUAGE=C
14139export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140
Matthias Kloseb9621712010-04-24 17:59:49 +000014141# CDPATH.
14142(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14143
14144
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014145# as_fn_error ERROR [LINENO LOG_FD]
14146# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014147# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14148# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014149# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014150as_fn_error ()
14151{
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014152 as_status=$?; test $as_status -eq 0 && as_status=1
14153 if test "$3"; then
14154 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14155 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014157 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 as_fn_exit $as_status
14159} # as_fn_error
14160
14161
14162# as_fn_set_status STATUS
14163# -----------------------
14164# Set $? to STATUS, without forking.
14165as_fn_set_status ()
14166{
14167 return $1
14168} # as_fn_set_status
14169
14170# as_fn_exit STATUS
14171# -----------------
14172# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14173as_fn_exit ()
14174{
14175 set +e
14176 as_fn_set_status $1
14177 exit $1
14178} # as_fn_exit
14179
14180# as_fn_unset VAR
14181# ---------------
14182# Portably unset VAR.
14183as_fn_unset ()
14184{
14185 { eval $1=; unset $1;}
14186}
14187as_unset=as_fn_unset
14188# as_fn_append VAR VALUE
14189# ----------------------
14190# Append the text in VALUE to the end of the definition contained in VAR. Take
14191# advantage of any shell optimizations that allow amortized linear growth over
14192# repeated appends, instead of the typical quadratic growth present in naive
14193# implementations.
14194if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14195 eval 'as_fn_append ()
14196 {
14197 eval $1+=\$2
14198 }'
14199else
14200 as_fn_append ()
14201 {
14202 eval $1=\$$1\$2
14203 }
14204fi # as_fn_append
14205
14206# as_fn_arith ARG...
14207# ------------------
14208# Perform arithmetic evaluation on the ARGs, and store the result in the
14209# global $as_val. Take advantage of shells that can avoid forks. The arguments
14210# must be portable across $(()) and expr.
14211if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14212 eval 'as_fn_arith ()
14213 {
14214 as_val=$(( $* ))
14215 }'
14216else
14217 as_fn_arith ()
14218 {
14219 as_val=`expr "$@" || test $? -eq 1`
14220 }
14221fi # as_fn_arith
14222
14223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224if expr a : '\(a\)' >/dev/null 2>&1 &&
14225 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14226 as_expr=expr
14227else
14228 as_expr=false
14229fi
14230
14231if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14232 as_basename=basename
14233else
14234 as_basename=false
14235fi
14236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14238 as_dirname=dirname
14239else
14240 as_dirname=false
14241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243as_me=`$as_basename -- "$0" ||
14244$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14245 X"$0" : 'X\(//\)$' \| \
14246 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014247$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248 sed '/^.*\/\([^/][^/]*\)\/*$/{
14249 s//\1/
14250 q
14251 }
14252 /^X\/\(\/\/\)$/{
14253 s//\1/
14254 q
14255 }
14256 /^X\/\(\/\).*/{
14257 s//\1/
14258 q
14259 }
14260 s/.*/./; q'`
14261
Matthias Kloseb9621712010-04-24 17:59:49 +000014262# Avoid depending upon Character Ranges.
14263as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14264as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14265as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14266as_cr_digits='0123456789'
14267as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268
14269ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014270case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 xy) ECHO_C='\c';;
14275 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14276 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277 esac;;
14278*)
14279 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014280esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014281
Martin v. Löwis11437992002-04-12 09:54:03 +000014282rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283if test -d conf$$.dir; then
14284 rm -f conf$$.dir/conf$$.file
14285else
14286 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014289if (echo >conf$$.file) 2>/dev/null; then
14290 if ln -s conf$$.file conf$$ 2>/dev/null; then
14291 as_ln_s='ln -s'
14292 # ... but there are two gotchas:
14293 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14294 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14295 # In both cases, we have to default to `cp -p'.
14296 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14297 as_ln_s='cp -p'
14298 elif ln conf$$.file conf$$ 2>/dev/null; then
14299 as_ln_s=ln
14300 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014301 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014303else
14304 as_ln_s='cp -p'
14305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14307rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309
14310# as_fn_mkdir_p
14311# -------------
14312# Create "$as_dir" as a directory, including parents if necessary.
14313as_fn_mkdir_p ()
14314{
14315
14316 case $as_dir in #(
14317 -*) as_dir=./$as_dir;;
14318 esac
14319 test -d "$as_dir" || eval $as_mkdir_p || {
14320 as_dirs=
14321 while :; do
14322 case $as_dir in #(
14323 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14324 *) as_qdir=$as_dir;;
14325 esac
14326 as_dirs="'$as_qdir' $as_dirs"
14327 as_dir=`$as_dirname -- "$as_dir" ||
14328$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14329 X"$as_dir" : 'X\(//\)[^/]' \| \
14330 X"$as_dir" : 'X\(//\)$' \| \
14331 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14332$as_echo X"$as_dir" |
14333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14334 s//\1/
14335 q
14336 }
14337 /^X\(\/\/\)[^/].*/{
14338 s//\1/
14339 q
14340 }
14341 /^X\(\/\/\)$/{
14342 s//\1/
14343 q
14344 }
14345 /^X\(\/\).*/{
14346 s//\1/
14347 q
14348 }
14349 s/.*/./; q'`
14350 test -d "$as_dir" && break
14351 done
14352 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014353 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014354
14355
14356} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014357if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014358 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014359else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014360 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014361 as_mkdir_p=false
14362fi
14363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364if test -x / >/dev/null 2>&1; then
14365 as_test_x='test -x'
14366else
14367 if ls -dL / >/dev/null 2>&1; then
14368 as_ls_L_option=L
14369 else
14370 as_ls_L_option=
14371 fi
14372 as_test_x='
14373 eval sh -c '\''
14374 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 case $1 in #(
14378 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381 ???[sx]*):;;*)false;;esac;fi
14382 '\'' sh
14383 '
14384fi
14385as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
14387# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014388as_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 +000014389
14390# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014391as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
14393
Martin v. Löwis11437992002-04-12 09:54:03 +000014394exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014395## ----------------------------------- ##
14396## Main body of $CONFIG_STATUS script. ##
14397## ----------------------------------- ##
14398_ASEOF
14399test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014400
Matthias Kloseb9621712010-04-24 17:59:49 +000014401cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14402# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014403# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404# values after options handling.
14405ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014406This file was extended by python $as_me 3.3, which was
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014407generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
14409 CONFIG_FILES = $CONFIG_FILES
14410 CONFIG_HEADERS = $CONFIG_HEADERS
14411 CONFIG_LINKS = $CONFIG_LINKS
14412 CONFIG_COMMANDS = $CONFIG_COMMANDS
14413 $ $0 $@
14414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415on `(hostname || uname -n) 2>/dev/null | sed 1q`
14416"
14417
Martin v. Löwis11437992002-04-12 09:54:03 +000014418_ACEOF
14419
Matthias Kloseb9621712010-04-24 17:59:49 +000014420case $ac_config_files in *"
14421"*) set x $ac_config_files; shift; ac_config_files=$*;;
14422esac
14423
14424case $ac_config_headers in *"
14425"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14426esac
14427
14428
14429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014430# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014431config_files="$ac_config_files"
14432config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014437ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014438\`$as_me' instantiates files and other configuration actions
14439from templates according to the current configuration. Unless the files
14440and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
14444 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 --config print configuration, then exit
14447 -q, --quiet, --silent
14448 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 -d, --debug don't remove temporary files
14450 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 --file=FILE[:TEMPLATE]
14452 instantiate the configuration file FILE
14453 --header=FILE[:TEMPLATE]
14454 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014455
14456Configuration files:
14457$config_files
14458
14459Configuration headers:
14460$config_headers
14461
Matthias Kloseb9621712010-04-24 17:59:49 +000014462Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014465cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14466ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014467ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014468python config.status 3.3
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014469configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014471
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014472Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014473This config.status script is free software; the Free Software Foundation
14474gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475
14476ac_pwd='$ac_pwd'
14477srcdir='$srcdir'
14478INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014479test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014480_ACEOF
14481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14483# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014484ac_need_defaults=:
14485while test $# != 0
14486do
14487 case $1 in
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014488 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14490 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014491 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014494 ac_option=$1
14495 ac_optarg=$2
14496 ac_shift=shift
14497 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 esac
14499
Skip Montanaro6dead952003-09-25 14:50:04 +000014500 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014502 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14503 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo "$ac_cs_version"; exit ;;
14506 --config | --confi | --conf | --con | --co | --c )
14507 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 debug=: ;;
14510 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014511 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 case $ac_optarg in
14513 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14514 esac
14515 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 ac_need_defaults=false;;
14517 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014518 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 case $ac_optarg in
14520 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14521 esac
14522 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 --he | --h)
14525 # Conflict between --help and --header
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014526 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014527Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014530 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14531 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14532 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014533
14534 # This is an error.
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014535 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014536Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014540
14541 esac
14542 shift
14543done
14544
Skip Montanaro6dead952003-09-25 14:50:04 +000014545ac_configure_extra_args=
14546
14547if $ac_cs_silent; then
14548 exec 6>/dev/null
14549 ac_configure_extra_args="$ac_configure_extra_args --silent"
14550fi
14551
14552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014553cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014554if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14556 shift
14557 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14558 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014561fi
14562
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565exec 5>>config.log
14566{
14567 echo
14568 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14569## Running $as_me. ##
14570_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014575cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579
14580# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014581for ac_config_target in $ac_config_targets
14582do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583 case $ac_config_target in
14584 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14585 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14586 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014587 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14588 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14590 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014591 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014592 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014594 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 esac
14596done
14597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598
Martin v. Löwis11437992002-04-12 09:54:03 +000014599# If the user did not use the arguments to specify the items to instantiate,
14600# then the envvar interface is used. Set only those that are not.
14601# We use the long form for the default assignment because of an extremely
14602# bizarre bug on SunOS 4.1.3.
14603if $ac_need_defaults; then
14604 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14605 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14606fi
14607
Skip Montanaro6dead952003-09-25 14:50:04 +000014608# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014610# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611# Hook for its removal unless debugging.
14612# Note that there is a small window in which the directory will not be cleaned:
14613# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014614$debug ||
14615{
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014616 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617 trap 'exit_status=$?
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014618 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014621}
Martin v. Löwis11437992002-04-12 09:54:03 +000014622# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014626 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014627} ||
14628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 tmp=./conf$$-$RANDOM
14630 (umask 077 && mkdir "$tmp")
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014631} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633# Set up the scripts for CONFIG_FILES section.
14634# No need to generate them if there are no CONFIG_FILES.
14635# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638
14639ac_cr=`echo X | tr X '\015'`
14640# On cygwin, bash can eat \r inside `` if the user requested igncr.
14641# But we know of no other shell where ac_cr would be empty at this
14642# point, so we can use a bashism as a fallback.
14643if test "x$ac_cr" = x; then
14644 eval ac_cr=\$\'\\r\'
14645fi
14646ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14647if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014648 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014649else
14650 ac_cs_awk_cr=$ac_cr
14651fi
14652
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014653echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014654_ACEOF
14655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656
Matthias Kloseb9621712010-04-24 17:59:49 +000014657{
14658 echo "cat >conf$$subs.awk <<_ACEOF" &&
14659 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14660 echo "_ACEOF"
14661} >conf$$subs.sh ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014662 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14663ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664ac_delim='%!_!# '
14665for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 . ./conf$$subs.sh ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014667 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14670 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671 break
14672 elif $ac_last_try; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014673 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 else
14675 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677done
Matthias Kloseb9621712010-04-24 17:59:49 +000014678rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014679
Matthias Kloseb9621712010-04-24 17:59:49 +000014680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014681cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014683sed -n '
14684h
14685s/^/S["/; s/!.*/"]=/
14686p
14687g
14688s/^[^!]*!//
14689:repl
14690t repl
14691s/'"$ac_delim"'$//
14692t delim
14693:nl
14694h
14695s/\(.\{148\}\)..*/\1/
14696t more1
14697s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14698p
14699n
14700b repl
14701:more1
14702s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14703p
14704g
14705s/.\{148\}//
14706t nl
14707:delim
14708h
14709s/\(.\{148\}\)..*/\1/
14710t more2
14711s/["\\]/\\&/g; s/^/"/; s/$/"/
14712p
14713b
14714:more2
14715s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14716p
14717g
14718s/.\{148\}//
14719t delim
14720' <conf$$subs.awk | sed '
14721/^[^""]/{
14722 N
14723 s/\n//
14724}
14725' >>$CONFIG_STATUS || ac_write_fail=1
14726rm -f conf$$subs.awk
14727cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14728_ACAWK
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014729cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 for (key in S) S_is_set[key] = 1
14731 FS = ""
14732
14733}
14734{
14735 line = $ 0
14736 nfields = split(line, field, "@")
14737 substed = 0
14738 len = length(field[1])
14739 for (i = 2; i < nfields; i++) {
14740 key = field[i]
14741 keylen = length(key)
14742 if (S_is_set[key]) {
14743 value = S[key]
14744 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14745 len += length(value) + length(field[++i])
14746 substed = 1
14747 } else
14748 len += 1 + keylen
14749 }
14750
14751 print line
14752}
14753
14754_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14757if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14758 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14759else
14760 cat
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014761fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014762 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014763_ACEOF
14764
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014765# VPATH may cause trouble with some makes, so we remove $(srcdir),
14766# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767# trailing colons and then remove the whole line if VPATH becomes empty
14768# (actually we leave an empty line to preserve line numbers).
14769if test "x$srcdir" = x.; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014770 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14771s/:*\$(srcdir):*/:/
14772s/:*\${srcdir}:*/:/
14773s/:*@srcdir@:*/:/
14774s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775s/:*$//
14776s/^[^=]*=[ ]*$//
14777}'
14778fi
14779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014781fi # test -n "$CONFIG_FILES"
14782
Matthias Kloseb9621712010-04-24 17:59:49 +000014783# Set up the scripts for CONFIG_HEADERS section.
14784# No need to generate them if there are no CONFIG_HEADERS.
14785# This happens for instance with `./config.status Makefile'.
14786if test -n "$CONFIG_HEADERS"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014787cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014788BEGIN {
14789_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791# Transform confdefs.h into an awk script `defines.awk', embedded as
14792# here-document in config.status, that substitutes the proper values into
14793# config.h.in to produce config.h.
14794
14795# Create a delimiter string that does not exist in confdefs.h, to ease
14796# handling of long lines.
14797ac_delim='%!_!# '
14798for ac_last_try in false false :; do
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014799 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14800 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 break
14802 elif $ac_last_try; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014803 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 else
14805 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14806 fi
14807done
14808
14809# For the awk script, D is an array of macro values keyed by name,
14810# likewise P contains macro parameters if any. Preserve backslash
14811# newline sequences.
14812
14813ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14814sed -n '
14815s/.\{148\}/&'"$ac_delim"'/g
14816t rset
14817:rset
14818s/^[ ]*#[ ]*define[ ][ ]*/ /
14819t def
14820d
14821:def
14822s/\\$//
14823t bsnl
14824s/["\\]/\\&/g
14825s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14826D["\1"]=" \3"/p
14827s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14828d
14829:bsnl
14830s/["\\]/\\&/g
14831s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14832D["\1"]=" \3\\\\\\n"\\/p
14833t cont
14834s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14835t cont
14836d
14837:cont
14838n
14839s/.\{148\}/&'"$ac_delim"'/g
14840t clear
14841:clear
14842s/\\$//
14843t bsnlc
14844s/["\\]/\\&/g; s/^/"/; s/$/"/p
14845d
14846:bsnlc
14847s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14848b cont
14849' <confdefs.h | sed '
14850s/'"$ac_delim"'/"\\\
14851"/g' >>$CONFIG_STATUS || ac_write_fail=1
14852
14853cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14854 for (key in D) D_is_set[key] = 1
14855 FS = ""
14856}
14857/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14858 line = \$ 0
14859 split(line, arg, " ")
14860 if (arg[1] == "#") {
14861 defundef = arg[2]
14862 mac1 = arg[3]
14863 } else {
14864 defundef = substr(arg[1], 2)
14865 mac1 = arg[2]
14866 }
14867 split(mac1, mac2, "(") #)
14868 macro = mac2[1]
14869 prefix = substr(line, 1, index(line, defundef) - 1)
14870 if (D_is_set[macro]) {
14871 # Preserve the white space surrounding the "#".
14872 print prefix "define", macro P[macro] D[macro]
14873 next
14874 } else {
14875 # Replace #undef with comments. This is necessary, for example,
14876 # in the case of _POSIX_SOURCE, which is predefined and required
14877 # on some systems where configure will not decide to define it.
14878 if (defundef == "undef") {
14879 print "/*", prefix defundef, macro, "*/"
14880 next
14881 }
14882 }
14883}
14884{ print }
14885_ACAWK
14886_ACEOF
14887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014888 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014889fi # test -n "$CONFIG_HEADERS"
14890
14891
14892eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14893shift
14894for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895do
14896 case $ac_tag in
14897 :[FHLC]) ac_mode=$ac_tag; continue;;
14898 esac
14899 case $ac_mode$ac_tag in
14900 :[FHL]*:*);;
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014901 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902 :[FH]-) ac_tag=-:-;;
14903 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14904 esac
14905 ac_save_IFS=$IFS
14906 IFS=:
14907 set x $ac_tag
14908 IFS=$ac_save_IFS
14909 shift
14910 ac_file=$1
14911 shift
14912
14913 case $ac_mode in
14914 :L) ac_source=$1;;
14915 :[FH])
14916 ac_file_inputs=
14917 for ac_f
14918 do
14919 case $ac_f in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014920 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921 *) # Look for the file first in the build tree, then in the source tree
14922 # (if the path is not absolute). The absolute path cannot be DOS-style,
14923 # because $ac_f cannot contain `:'.
14924 test -f "$ac_f" ||
14925 case $ac_f in
14926 [\\/$]*) false;;
14927 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14928 esac ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014929 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14932 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933 done
14934
14935 # Let's still pretend it is `configure' which instantiates (i.e., don't
14936 # use $as_me), people would be surprised to read:
14937 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 configure_input='Generated from '`
14939 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14940 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 if test x"$ac_file" != x-; then
14942 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14944$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 # Neutralize special characters interpreted by sed in replacement strings.
14947 case $configure_input in #(
14948 *\&* | *\|* | *\\* )
14949 ac_sed_conf_input=`$as_echo "$configure_input" |
14950 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14951 *) ac_sed_conf_input=$configure_input;;
14952 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953
14954 case $ac_tag in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014955 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014956 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014957 esac
14958 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 esac
14960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014962$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014963 X"$ac_file" : 'X\(//\)[^/]' \| \
14964 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014966$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14968 s//\1/
14969 q
14970 }
14971 /^X\(\/\/\)[^/].*/{
14972 s//\1/
14973 q
14974 }
14975 /^X\(\/\/\)$/{
14976 s//\1/
14977 q
14978 }
14979 /^X\(\/\).*/{
14980 s//\1/
14981 q
14982 }
14983 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014984 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ac_builddir=.
14986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987case "$ac_dir" in
14988.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14989*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993 case $ac_top_builddir_sub in
14994 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14995 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14996 esac ;;
14997esac
14998ac_abs_top_builddir=$ac_pwd
14999ac_abs_builddir=$ac_pwd$ac_dir_suffix
15000# for backward compatibility:
15001ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015002
15003case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 ac_top_srcdir=$ac_top_builddir_sub
15007 ac_abs_top_srcdir=$ac_pwd ;;
15008 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 ac_top_srcdir=$srcdir
15011 ac_abs_top_srcdir=$srcdir ;;
15012 *) # Relative name.
15013 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15014 ac_top_srcdir=$ac_top_build_prefix$srcdir
15015 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015016esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015018
Martin v. Löwis11437992002-04-12 09:54:03 +000015019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020 case $ac_mode in
15021 :F)
15022 #
15023 # CONFIG_FILE
15024 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
15026 case $INSTALL in
15027 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015030_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033# If the template does not know about datarootdir, expand it.
15034# FIXME: This hack should be removed a few years after 2.60.
15035ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015036ac_sed_dataroot='
15037/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038 p
15039 q
15040}
15041/@datadir@/p
15042/@docdir@/p
15043/@infodir@/p
15044/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015045/@mandir@/p'
15046case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047*datarootdir*) ac_datarootdir_seen=yes;;
15048*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15050$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053 ac_datarootdir_hack='
15054 s&@datadir@&$datadir&g
15055 s&@docdir@&$docdir&g
15056 s&@infodir@&$infodir&g
15057 s&@localedir@&$localedir&g
15058 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060esac
15061_ACEOF
15062
15063# Neutralize VPATH when `$srcdir' = `.'.
15064# Shell code in configure.ac might set extrasub.
15065# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015066cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15067ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015068$extrasub
15069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015070cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015071:t
15072/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015073s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015075s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076s&@srcdir@&$ac_srcdir&;t t
15077s&@abs_srcdir@&$ac_abs_srcdir&;t t
15078s&@top_srcdir@&$ac_top_srcdir&;t t
15079s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15080s&@builddir@&$ac_builddir&;t t
15081s&@abs_builddir@&$ac_abs_builddir&;t t
15082s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15083s&@INSTALL@&$ac_INSTALL&;t t
15084$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015085"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015086eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015087 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015090 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15091 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015093which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015094$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015095which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015096
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015097 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 case $ac_file in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015099 -) cat "$tmp/out" && rm -f "$tmp/out";;
15100 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 esac \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015102 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103 ;;
15104 :H)
15105 #
15106 # CONFIG_HEADER
15107 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 {
15110 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015111 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15112 } >"$tmp/config.h" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015113 || as_fn_error "could not create $ac_file" "$LINENO" 5
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015114 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015115 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15116$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 rm -f "$ac_file"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015119 mv "$tmp/config.h" "$ac_file" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015120 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 fi
15122 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015124 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015125 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129
15130 esac
15131
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015132
15133 case $ac_file$ac_mode in
15134 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15135
15136 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137done # for ac_tag
15138
Guido van Rossum627b2d71993-12-24 10:39:16 +000015139
Matthias Kloseb9621712010-04-24 17:59:49 +000015140as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015141_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015142ac_clean_files=$ac_clean_files_save
15143
Matthias Kloseb9621712010-04-24 17:59:49 +000015144test $ac_write_fail = 0 ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015145 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015146
Martin v. Löwis11437992002-04-12 09:54:03 +000015147
15148# configure is writing to config.log, and then calls config.status.
15149# config.status does its own redirection, appending to config.log.
15150# Unfortunately, on DOS this fails, as config.log is still kept open
15151# by configure, so config.status won't be able to write to it; its
15152# output is simply discarded. So we exec the FD to /dev/null,
15153# effectively closing config.log, so it can be properly (re)opened and
15154# appended to by config.status. When coming back to configure, we
15155# need to make the FD available again.
15156if test "$no_create" != yes; then
15157 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015158 ac_config_status_args=
15159 test "$silent" = yes &&
15160 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015162 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 exec 5>>config.log
15164 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15165 # would make configure fail if this is the last instruction.
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015166 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015167fi
15168if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15170$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015171fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015172
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015173
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015174echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015175if test ! -f Modules/Setup
15176then
15177 cp $srcdir/Modules/Setup.dist Modules/Setup
15178fi
15179
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015180echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015181if test ! -f Modules/Setup.local
15182then
15183 echo "# Edit this file for local setup changes" >Modules/Setup.local
15184fi
15185
15186echo "creating Makefile"
15187$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15188 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015189 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015190mv config.c Modules