blob: 51b0114da26bb06dcc48bb0ec546e171e479fe98 [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.
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003# Generated by GNU Autoconf 2.67 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000094case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000115fi
116
Matthias Kloseb9621712010-04-24 17:59:49 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000134
Matthias Kloseb9621712010-04-24 17:59:49 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140 emulate sh
141 NULLCMD=:
142 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143 # is contrary to our usage. Disable this feature.
144 alias -g '\${1+\"\$@\"}'='\"\$@\"'
145 setopt NO_GLOB_SUBST
146else
147 case \`(set -o) 2>/dev/null\` in #(
148 *posix*) :
149 set -o posix ;; #(
150 *) :
151 ;;
152esac
153fi
154"
155 as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169 exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177 if (eval "$as_required") 2>/dev/null; then :
178 as_have_required=yes
179else
180 as_have_required=no
181fi
182 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189 IFS=$as_save_IFS
190 test -z "$as_dir" && as_dir=.
191 as_found=:
192 case $as_dir in #(
193 /*)
194 for as_base in sh bash ksh sh5; do
195 # Try only shells that exist, to save several forks.
196 as_shell=$as_dir/$as_base
197 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 CONFIG_SHELL=$as_shell as_have_required=yes
200 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 break 2
202fi
203fi
204 done;;
205 esac
206 as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210 CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215 if test "x$CONFIG_SHELL" != x; then :
216 # We cannot yet assume a decent shell, so we have to provide a
217 # neutralization value for shells without unset; and this also
218 # works around shells that cannot unset nonexistent variables.
219 BASH_ENV=/dev/null
220 ENV=/dev/null
221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222 export CONFIG_SHELL
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +0200223 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000224fi
225
226 if test x$as_have_required = xno; then :
227 $as_echo "$0: This script requires a shell more modern than all"
228 $as_echo "$0: the shells that I found on your system."
229 if test x${ZSH_VERSION+set} = xset ; then
230 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232 else
233 $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: http://bugs.python.org/ about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238 fi
239 exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257 { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266 return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274 set +e
275 as_fn_set_status $1
276 exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285 case $as_dir in #(
286 -*) as_dir=./$as_dir;;
287 esac
288 test -d "$as_dir" || eval $as_mkdir_p || {
289 as_dirs=
290 while :; do
291 case $as_dir in #(
292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293 *) as_qdir=$as_dir;;
294 esac
295 as_dirs="'$as_qdir' $as_dirs"
296 as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298 X"$as_dir" : 'X\(//\)[^/]' \| \
299 X"$as_dir" : 'X\(//\)$' \| \
300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303 s//\1/
304 q
305 }
306 /^X\(\/\/\)[^/].*/{
307 s//\1/
308 q
309 }
310 /^X\(\/\/\)$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\).*/{
315 s//\1/
316 q
317 }
318 s/.*/./; q'`
319 test -d "$as_dir" && break
320 done
321 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333 eval 'as_fn_append ()
334 {
335 eval $1+=\$2
336 }'
337else
338 as_fn_append ()
339 {
340 eval $1=\$$1\$2
341 }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350 eval 'as_fn_arith ()
351 {
352 as_val=$(( $* ))
353 }'
354else
355 as_fn_arith ()
356 {
357 as_val=`expr "$@" || test $? -eq 1`
358 }
359fi # as_fn_arith
360
361
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200366# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000367as_fn_error ()
368{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200369 as_status=$1; test $as_status -eq 0 && as_status=1
370 if test "$4"; then
371 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000373 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000375 as_fn_exit $as_status
376} # as_fn_error
377
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000378if expr a : '\(a\)' >/dev/null 2>&1 &&
379 test "X`expr 00001 : '.*\(...\)'`" = X001; then
380 as_expr=expr
381else
382 as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386 as_basename=basename
387else
388 as_basename=false
389fi
390
Matthias Kloseb9621712010-04-24 17:59:49 +0000391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392 as_dirname=dirname
393else
394 as_dirname=false
395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000396
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399 X"$0" : 'X\(//\)$' \| \
400 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000401$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000402 sed '/^.*\/\([^/][^/]*\)\/*$/{
403 s//\1/
404 q
405 }
406 /^X\/\(\/\/\)$/{
407 s//\1/
408 q
409 }
410 /^X\/\(\/\).*/{
411 s//\1/
412 q
413 }
414 s/.*/./; q'`
415
Matthias Kloseb9621712010-04-24 17:59:49 +0000416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424 as_lineno_1=$LINENO as_lineno_1a=$LINENO
425 as_lineno_2=$LINENO as_lineno_2a=$LINENO
426 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000429 sed -n '
430 p
431 /[$]LINENO/=
432 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000434 s/[$]LINENO.*/&-/
435 t lineno
436 b
437 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 :loop
440 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000444 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000446
447 # Don't try to exec as it changes $[0], causing all sort of problems
448 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000449 # original and so on. Autoconf is especially sensitive to this).
450 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 # Exit status is that of the last command.
452 exit
453}
454
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000455ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000456case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000458 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000459 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000460 xy) ECHO_C='\c';;
461 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
462 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463 esac;;
464*)
465 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000467
Martin v. Löwis11437992002-04-12 09:54:03 +0000468rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if test -d conf$$.dir; then
470 rm -f conf$$.dir/conf$$.file
471else
472 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000473 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000474fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000475if (echo >conf$$.file) 2>/dev/null; then
476 if ln -s conf$$.file conf$$ 2>/dev/null; then
477 as_ln_s='ln -s'
478 # ... but there are two gotchas:
479 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481 # In both cases, we have to default to `cp -p'.
482 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483 as_ln_s='cp -p'
484 elif ln conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s=ln
486 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000489else
490 as_ln_s='cp -p'
491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000494
Skip Montanaro6dead952003-09-25 14:50:04 +0000495if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000497else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000498 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000499 as_mkdir_p=false
500fi
501
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000502if test -x / >/dev/null 2>&1; then
503 as_test_x='test -x'
504else
505 if ls -dL / >/dev/null 2>&1; then
506 as_ls_L_option=L
507 else
508 as_ls_L_option=
509 fi
510 as_test_x='
511 eval sh -c '\''
512 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000513 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000515 case $1 in #(
516 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000518 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000519 ???[sx]*):;;*)false;;esac;fi
520 '\'' sh
521 '
522fi
523as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000524
525# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000527
528# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000530
531
Matthias Kloseb9621712010-04-24 17:59:49 +0000532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000534
535# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
Martin v. Löwis11437992002-04-12 09:54:03 +0000540#
541# Initializations.
542#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000543ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000544ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000545ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000546LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000551
Martin v. Löwis11437992002-04-12 09:54:03 +0000552# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000553PACKAGE_NAME='python'
554PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000555PACKAGE_VERSION='3.3'
556PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000557PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000558PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560ac_unique_file="Include/object.h"
561# Factoring default headers for most tests.
562ac_includes_default="\
563#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000564#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# include <sys/types.h>
566#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000567#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000568# include <sys/stat.h>
569#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000570#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000571# include <stdlib.h>
572# include <stddef.h>
573#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# include <stdlib.h>
576# endif
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef HAVE_STRING_H
579# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <memory.h>
581# endif
582# include <string.h>
583#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000584#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000585# include <strings.h>
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000589#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000590#ifdef HAVE_STDINT_H
591# include <stdint.h>
592#endif
593#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <unistd.h>
595#endif"
596
Matthias Kloseb9621712010-04-24 17:59:49 +0000597ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000598SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000599THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000600SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000601LIBC
602LIBM
603HAVE_GETHOSTBYNAME
604HAVE_GETHOSTBYNAME_R
605HAVE_GETHOSTBYNAME_R_3_ARG
606HAVE_GETHOSTBYNAME_R_5_ARG
607HAVE_GETHOSTBYNAME_R_6_ARG
608LIBOBJS
609TRUE
610MACHDEP_OBJS
611DYNLOADFILE
612DLINCLDIR
613THREADOBJ
614LDLAST
615USE_THREAD_MODULE
616SIGNAL_OBJS
617USE_SIGNAL_MODULE
618LIBFFI_INCLUDEDIR
619PKG_CONFIG
620SHLIBS
621CFLAGSFORSHARED
622LINKFORSHARED
623CCSHARED
624BLDSHARED
625LDCXXSHARED
626LDSHARED
627SO
628LIBTOOL_CRUFT
629OTHER_LIBTOOL_OPT
630UNIVERSAL_ARCH_FLAGS
631BASECFLAGS
632OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000633ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000634LN
635INSTALL_DATA
636INSTALL_SCRIPT
637INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500638HAS_PYTHON
639DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000640ARFLAGS
641AR
642RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000643USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000644GNULD
645LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000646LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000647RUNSHARED
648INSTSONAME
649LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000650PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000651BLDLIBRARY
652DLLLIBRARY
653LDLIBRARY
654LIBRARY
655BUILDEXEEXT
656EGREP
657GREP
658CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200659NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000660MAINCC
661CXX
662OBJEXT
663EXEEXT
664ac_ct_CC
665CPPFLAGS
666LDFLAGS
667CFLAGS
668CC
669EXPORT_MACOSX_DEPLOYMENT_TARGET
670CONFIGURE_MACOSX_DEPLOYMENT_TARGET
671SGI_ABI
672MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000673FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000674FRAMEWORKUNIXTOOLSPREFIX
675FRAMEWORKALTINSTALLLAST
676FRAMEWORKALTINSTALLFIRST
677FRAMEWORKINSTALLLAST
678FRAMEWORKINSTALLFIRST
679PYTHONFRAMEWORKINSTALLDIR
680PYTHONFRAMEWORKPREFIX
681PYTHONFRAMEWORKDIR
682PYTHONFRAMEWORKIDENTIFIER
683PYTHONFRAMEWORK
684LIPO_32BIT_FLAGS
685ARCH_RUN_32BIT
686UNIVERSALSDK
687CONFIG_ARGS
688SOVERSION
689VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500690HAS_HG
691HGBRANCH
692HGTAG
693HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000694target_alias
695host_alias
696build_alias
697LIBS
698ECHO_T
699ECHO_N
700ECHO_C
701DEFS
702mandir
703localedir
704libdir
705psdir
706pdfdir
707dvidir
708htmldir
709infodir
710docdir
711oldincludedir
712includedir
713localstatedir
714sharedstatedir
715sysconfdir
716datadir
717datarootdir
718libexecdir
719sbindir
720bindir
721program_transform_name
722prefix
723exec_prefix
724PACKAGE_URL
725PACKAGE_BUGREPORT
726PACKAGE_STRING
727PACKAGE_VERSION
728PACKAGE_TARNAME
729PACKAGE_NAME
730PATH_SEPARATOR
731SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000732ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000733ac_user_opts='
734enable_option_checking
735enable_universalsdk
736with_universal_archs
737with_framework_name
738enable_framework
739with_gcc
740with_cxx_main
741with_suffix
742enable_shared
743enable_profiling
744with_pydebug
745with_libs
746with_system_expat
747with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000748enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000749with_dbmliborder
750with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000751with_threads
752with_thread
753enable_ipv6
754with_doc_strings
755with_tsc
756with_pymalloc
757with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000758with_fpectl
759with_libm
760with_libc
761enable_big_digits
762with_wide_unicode
763with_computed_gotos
764'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000765 ac_precious_vars='build_alias
766host_alias
767target_alias
768CC
769CFLAGS
770LDFLAGS
771LIBS
772CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200773CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774
Guido van Rossum627b2d71993-12-24 10:39:16 +0000775
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000777ac_init_help=
778ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000779ac_unrecognized_opts=
780ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781# The variables have the same names as the options, with
782# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000783cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786no_recursion=
787prefix=NONE
788program_prefix=NONE
789program_suffix=NONE
790program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000791silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795x_includes=NONE
796x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000797
798# Installation directory options.
799# These are left unexpanded so users can "make install exec_prefix=/foo"
800# and all the variables that are supposed to be based on exec_prefix
801# by default will actually change.
802# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804bindir='${exec_prefix}/bin'
805sbindir='${exec_prefix}/sbin'
806libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807datarootdir='${prefix}/share'
808datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000809sysconfdir='${prefix}/etc'
810sharedstatedir='${prefix}/com'
811localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812includedir='${prefix}/include'
813oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
815infodir='${datarootdir}/info'
816htmldir='${docdir}'
817dvidir='${docdir}'
818pdfdir='${docdir}'
819psdir='${docdir}'
820libdir='${exec_prefix}/lib'
821localedir='${datarootdir}/locale'
822mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000823
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000827do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828 # If the previous option needs an argument, assign it.
829 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831 ac_prev=
832 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000835 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200836 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
837 *=) ac_optarg= ;;
838 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841 # Accept the important Cygnus configure options, so we can diagnose typos.
842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_dashdash$ac_option in
844 --)
845 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847 -bindir | --bindir | --bindi | --bind | --bin | --bi)
848 ac_prev=bindir ;;
849 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851
852 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857 -cache-file | --cache-file | --cache-fil | --cache-fi \
858 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
859 ac_prev=cache_file ;;
860 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
861 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 cache_file=$ac_optarg ;;
863
864 --config-cache | -C)
865 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
873 | --dataroo | --dataro | --datar)
874 ac_prev=datarootdir ;;
875 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
876 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
877 datarootdir=$ac_optarg ;;
878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000880 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000882 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200883 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000884 ac_useropt_orig=$ac_useropt
885 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
886 case $ac_user_opts in
887 *"
888"enable_$ac_useropt"
889"*) ;;
890 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
891 ac_unrecognized_sep=', ';;
892 esac
893 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894
895 -docdir | --docdir | --docdi | --doc | --do)
896 ac_prev=docdir ;;
897 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
898 docdir=$ac_optarg ;;
899
900 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
901 ac_prev=dvidir ;;
902 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
903 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
905 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000906 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000908 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200909 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000910 ac_useropt_orig=$ac_useropt
911 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
912 case $ac_user_opts in
913 *"
914"enable_$ac_useropt"
915"*) ;;
916 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
917 ac_unrecognized_sep=', ';;
918 esac
919 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
922 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
923 | --exec | --exe | --ex)
924 ac_prev=exec_prefix ;;
925 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
926 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
927 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
930 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Obsolete; use --with-gas.
932 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 -help | --help | --hel | --he | -h)
935 ac_init_help=long ;;
936 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
937 ac_init_help=recursive ;;
938 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
939 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
941 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
947 ac_prev=htmldir ;;
948 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
949 | --ht=*)
950 htmldir=$ac_optarg ;;
951
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952 -includedir | --includedir | --includedi | --included | --include \
953 | --includ | --inclu | --incl | --inc)
954 ac_prev=includedir ;;
955 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
956 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -infodir | --infodir | --infodi | --infod | --info | --inf)
960 ac_prev=infodir ;;
961 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
964 -libdir | --libdir | --libdi | --libd)
965 ac_prev=libdir ;;
966 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
969 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
970 | --libexe | --libex | --libe)
971 ac_prev=libexecdir ;;
972 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
973 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -localedir | --localedir | --localedi | --localed | --locale)
977 ac_prev=localedir ;;
978 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
979 localedir=$ac_optarg ;;
980
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983 ac_prev=localstatedir ;;
984 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000985 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
989 ac_prev=mandir ;;
990 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Obsolete; use --without-fp.
995 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 no_create=yes ;;
1000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1002 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1003 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1006 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1007 | --oldin | --oldi | --old | --ol | --o)
1008 ac_prev=oldincludedir ;;
1009 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1010 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1011 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1015 ac_prev=prefix ;;
1016 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1020 | --program-pre | --program-pr | --program-p)
1021 ac_prev=program_prefix ;;
1022 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1023 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1027 | --program-suf | --program-su | --program-s)
1028 ac_prev=program_suffix ;;
1029 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1030 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-transform-name | --program-transform-name \
1034 | --program-transform-nam | --program-transform-na \
1035 | --program-transform-n | --program-transform- \
1036 | --program-transform | --program-transfor \
1037 | --program-transfo | --program-transf \
1038 | --program-trans | --program-tran \
1039 | --progr-tra | --program-tr | --program-t)
1040 ac_prev=program_transform_name ;;
1041 -program-transform-name=* | --program-transform-name=* \
1042 | --program-transform-nam=* | --program-transform-na=* \
1043 | --program-transform-n=* | --program-transform-=* \
1044 | --program-transform=* | --program-transfor=* \
1045 | --program-transfo=* | --program-transf=* \
1046 | --program-trans=* | --program-tran=* \
1047 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1051 ac_prev=pdfdir ;;
1052 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1053 pdfdir=$ac_optarg ;;
1054
1055 -psdir | --psdir | --psdi | --psd | --ps)
1056 ac_prev=psdir ;;
1057 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1058 psdir=$ac_optarg ;;
1059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1061 | -silent | --silent | --silen | --sile | --sil)
1062 silent=yes ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1065 ac_prev=sbindir ;;
1066 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1067 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1071 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1072 | --sharedst | --shareds | --shared | --share | --shar \
1073 | --sha | --sh)
1074 ac_prev=sharedstatedir ;;
1075 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1076 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1077 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1078 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 -site | --site | --sit)
1082 ac_prev=site ;;
1083 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1087 ac_prev=srcdir ;;
1088 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1092 | --syscon | --sysco | --sysc | --sys | --sy)
1093 ac_prev=sysconfdir ;;
1094 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1095 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1104 verbose=yes ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 -version | --version | --versio | --versi | --vers | -V)
1107 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001110 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001112 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001113 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001114 ac_useropt_orig=$ac_useropt
1115 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1116 case $ac_user_opts in
1117 *"
1118"with_$ac_useropt"
1119"*) ;;
1120 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1121 ac_unrecognized_sep=', ';;
1122 esac
1123 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
1125 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001128 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001129 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001130 ac_useropt_orig=$ac_useropt
1131 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132 case $ac_user_opts in
1133 *"
1134"with_$ac_useropt"
1135"*) ;;
1136 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1137 ac_unrecognized_sep=', ';;
1138 esac
1139 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 --x)
1142 # Obsolete; use --with-x.
1143 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
1145 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1146 | --x-incl | --x-inc | --x-in | --x-i)
1147 ac_prev=x_includes ;;
1148 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1149 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1153 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1154 ac_prev=x_libraries ;;
1155 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1156 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001159 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1160Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 ;;
1162
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 *=*)
1164 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1165 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 case $ac_envvar in #(
1167 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001168 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001170 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 export $ac_envvar ;;
1172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001178 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 ;;
1180
1181 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182done
1183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001186 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187fi
1188
Matthias Kloseb9621712010-04-24 17:59:49 +00001189if test -n "$ac_unrecognized_opts"; then
1190 case $enable_option_checking in
1191 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001192 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1194 esac
1195fi
1196
1197# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1199 datadir sysconfdir sharedstatedir localstatedir includedir \
1200 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1201 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 # Remove trailing slashes.
1205 case $ac_val in
1206 */ )
1207 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1208 eval $ac_var=\$ac_val;;
1209 esac
1210 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 [\\/$]* | ?:[\\/]* ) continue;;
1213 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001216done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217
Martin v. Löwis11437992002-04-12 09:54:03 +00001218# There might be people who depend on the old broken behavior: `$host'
1219# used to hold the argument of --host etc.
1220# FIXME: To remove some day.
1221build=$build_alias
1222host=$host_alias
1223target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# FIXME: To remove some day.
1226if test "x$host_alias" != x; then
1227 if test "x$build_alias" = x; then
1228 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001229 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1230 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 elif test "x$build_alias" != "x$host_alias"; then
1232 cross_compiling=yes
1233 fi
1234fi
1235
1236ac_tool_prefix=
1237test -n "$host_alias" && ac_tool_prefix=$host_alias-
1238
1239test "$silent" = yes && exec 6>/dev/null
1240
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242ac_pwd=`pwd` && test -n "$ac_pwd" &&
1243ac_ls_di=`ls -di .` &&
1244ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248
1249
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250# Find the source files, if location was not specified.
1251if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 ac_confdir=`$as_dirname -- "$as_myself" ||
1255$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1256 X"$as_myself" : 'X\(//\)[^/]' \| \
1257 X"$as_myself" : 'X\(//\)$' \| \
1258 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1259$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\/\)[^/].*/{
1265 s//\1/
1266 q
1267 }
1268 /^X\(\/\/\)$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\).*/{
1273 s//\1/
1274 q
1275 }
1276 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279 srcdir=..
1280 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281else
1282 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284if test ! -r "$srcdir/$ac_unique_file"; then
1285 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001286 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1289ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 pwd)`
1292# When building in place, set srcdir=.
1293if test "$ac_abs_confdir" = "$ac_pwd"; then
1294 srcdir=.
1295fi
1296# Remove unnecessary trailing slashes from srcdir.
1297# Double slashes in file names in object file debugging info
1298# mess up M-x gdb in Emacs.
1299case $srcdir in
1300*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1301esac
1302for ac_var in $ac_precious_vars; do
1303 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1304 eval ac_env_${ac_var}_value=\$${ac_var}
1305 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1306 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1307done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309#
1310# Report the --help message.
1311#
1312if test "$ac_init_help" = "long"; then
1313 # Omit some internal or obsolete options to make the list less imposing.
1314 # This message is too long to be a string in the A/UX 3.1 sh.
1315 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001316\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318Usage: $0 [OPTION]... [VAR=VALUE]...
1319
1320To assign environment variables (e.g., CC, CFLAGS...), specify them as
1321VAR=VALUE. See below for descriptions of some of the useful variables.
1322
1323Defaults for the options are specified in brackets.
1324
1325Configuration:
1326 -h, --help display this help and exit
1327 --help=short display options specific to this package
1328 --help=recursive display the short help of all the included packages
1329 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001331 --cache-file=FILE cache test results in FILE [disabled]
1332 -C, --config-cache alias for \`--cache-file=config.cache'
1333 -n, --no-create do not create output files
1334 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1335
Martin v. Löwis11437992002-04-12 09:54:03 +00001336Installation directories:
1337 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342By default, \`make install' will install all the files in
1343\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1344an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1345for instance \`--prefix=\$HOME'.
1346
1347For better control, use the options below.
1348
1349Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 --bindir=DIR user executables [EPREFIX/bin]
1351 --sbindir=DIR system admin executables [EPREFIX/sbin]
1352 --libexecdir=DIR program executables [EPREFIX/libexec]
1353 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1354 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1355 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1356 --libdir=DIR object code libraries [EPREFIX/lib]
1357 --includedir=DIR C header files [PREFIX/include]
1358 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1359 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1360 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1361 --infodir=DIR info documentation [DATAROOTDIR/info]
1362 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1363 --mandir=DIR man documentation [DATAROOTDIR/man]
1364 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1365 --htmldir=DIR html documentation [DOCDIR]
1366 --dvidir=DIR dvi documentation [DOCDIR]
1367 --pdfdir=DIR pdf documentation [DOCDIR]
1368 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001369_ACEOF
1370
1371 cat <<\_ACEOF
1372_ACEOF
1373fi
1374
1375if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001376 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001377 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001378 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 cat <<\_ACEOF
1380
1381Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1384 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001385 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001386 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001387 --enable-framework[=INSTALLDIR]
1388 Build (MacOSX|Darwin) framework
1389 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001390 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001391 --enable-loadable-sqlite-extensions
1392 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001393 --enable-ipv6 Enable ipv6 (with ipv4) support
1394 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001395 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398Optional Packages:
1399 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1400 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001401 --with-universal-archs=ARCH
1402 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001403 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001404 --with-framework-name=FRAMEWORK
1405 specify an alternate name of the framework built
1406 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001408 --with-cxx-main=<compiler>
1409 compile main() and link python executable with C++
1410 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --with-suffix=.exe set executable suffix
1412 --with-pydebug build with Py_DEBUG defined
1413 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001414 --with-system-expat build pyexpat module using an installed expat
1415 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001417 --with-dbmliborder=db1:db2:...
1418 order to check db backends for dbm. Valid value is a
1419 colon separated string with the backend names
1420 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with(out)-threads[=DIRECTORY]
1423 disable/enable thread support
1424 --with(out)-thread[=DIRECTORY]
1425 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001427 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001429 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with-fpectl enable SIGFPE catching
1431 --with-libm=STRING math library
1432 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001433 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001434 --with(out)-computed-gotos
1435 Use computed gotos in evaluation loop (enabled by
1436 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438Some influential environment variables:
1439 CC C compiler command
1440 CFLAGS C compiler flags
1441 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1442 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001445 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 CPP C preprocessor
1447
1448Use these variables to override the choices made by `configure' or to help
1449it to find libraries and programs with nonstandard names/locations.
1450
Georg Brandle2e15612009-05-20 18:25:10 +00001451Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001454fi
1455
1456if test "$ac_init_help" = "recursive"; then
1457 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 test -d "$ac_dir" ||
1460 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1461 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 ac_builddir=.
1463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464case "$ac_dir" in
1465.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1466*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001468 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001469 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 case $ac_top_builddir_sub in
1471 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1472 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1473 esac ;;
1474esac
1475ac_abs_top_builddir=$ac_pwd
1476ac_abs_builddir=$ac_pwd$ac_dir_suffix
1477# for backward compatibility:
1478ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001479
1480case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 ac_top_srcdir=$ac_top_builddir_sub
1484 ac_abs_top_srcdir=$ac_pwd ;;
1485 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 ac_top_srcdir=$srcdir
1488 ac_abs_top_srcdir=$srcdir ;;
1489 *) # Relative name.
1490 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1491 ac_top_srcdir=$ac_top_build_prefix$srcdir
1492 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001493esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 cd "$ac_dir" || { ac_status=$?; continue; }
1497 # Check for guested configure.
1498 if test -f "$ac_srcdir/configure.gnu"; then
1499 echo &&
1500 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1501 elif test -f "$ac_srcdir/configure"; then
1502 echo &&
1503 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001505 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 fi || ac_status=$?
1507 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 done
1509fi
1510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001512if $ac_init_version; then
1513 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001514python configure 3.3
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001515generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001516
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001517Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518This configure script is free software; the Free Software Foundation
1519gives unlimited permission to copy, distribute and modify it.
1520_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001523
1524## ------------------------ ##
1525## Autoconf initialization. ##
1526## ------------------------ ##
1527
1528# ac_fn_c_try_compile LINENO
1529# --------------------------
1530# Try to compile conftest.$ac_ext, and return whether this succeeded.
1531ac_fn_c_try_compile ()
1532{
1533 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1534 rm -f conftest.$ac_objext
1535 if { { ac_try="$ac_compile"
1536case "(($ac_try" in
1537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1538 *) ac_try_echo=$ac_try;;
1539esac
1540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1541$as_echo "$ac_try_echo"; } >&5
1542 (eval "$ac_compile") 2>conftest.err
1543 ac_status=$?
1544 if test -s conftest.err; then
1545 grep -v '^ *+' conftest.err >conftest.er1
1546 cat conftest.er1 >&5
1547 mv -f conftest.er1 conftest.err
1548 fi
1549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1550 test $ac_status = 0; } && {
1551 test -z "$ac_c_werror_flag" ||
1552 test ! -s conftest.err
1553 } && test -s conftest.$ac_objext; then :
1554 ac_retval=0
1555else
1556 $as_echo "$as_me: failed program was:" >&5
1557sed 's/^/| /' conftest.$ac_ext >&5
1558
1559 ac_retval=1
1560fi
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001561 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001562 as_fn_set_status $ac_retval
1563
1564} # ac_fn_c_try_compile
1565
Matthias Kloseb9621712010-04-24 17:59:49 +00001566# ac_fn_c_try_link LINENO
1567# -----------------------
1568# Try to link conftest.$ac_ext, and return whether this succeeded.
1569ac_fn_c_try_link ()
1570{
1571 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1572 rm -f conftest.$ac_objext conftest$ac_exeext
1573 if { { ac_try="$ac_link"
1574case "(($ac_try" in
1575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1576 *) ac_try_echo=$ac_try;;
1577esac
1578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1579$as_echo "$ac_try_echo"; } >&5
1580 (eval "$ac_link") 2>conftest.err
1581 ac_status=$?
1582 if test -s conftest.err; then
1583 grep -v '^ *+' conftest.err >conftest.er1
1584 cat conftest.er1 >&5
1585 mv -f conftest.er1 conftest.err
1586 fi
1587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1588 test $ac_status = 0; } && {
1589 test -z "$ac_c_werror_flag" ||
1590 test ! -s conftest.err
1591 } && test -s conftest$ac_exeext && {
1592 test "$cross_compiling" = yes ||
1593 $as_test_x conftest$ac_exeext
1594 }; then :
1595 ac_retval=0
1596else
1597 $as_echo "$as_me: failed program was:" >&5
1598sed 's/^/| /' conftest.$ac_ext >&5
1599
1600 ac_retval=1
1601fi
1602 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1603 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1604 # interfere with the next link command; also delete a directory that is
1605 # left behind by Apple's compiler. We do this before executing the actions.
1606 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001607 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 as_fn_set_status $ac_retval
1609
1610} # ac_fn_c_try_link
1611
Matthias Kloseb9621712010-04-24 17:59:49 +00001612# ac_fn_c_try_cpp LINENO
1613# ----------------------
1614# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1615ac_fn_c_try_cpp ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1618 if { { ac_try="$ac_cpp conftest.$ac_ext"
1619case "(($ac_try" in
1620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1621 *) ac_try_echo=$ac_try;;
1622esac
1623eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1624$as_echo "$ac_try_echo"; } >&5
1625 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1626 ac_status=$?
1627 if test -s conftest.err; then
1628 grep -v '^ *+' conftest.err >conftest.er1
1629 cat conftest.er1 >&5
1630 mv -f conftest.er1 conftest.err
1631 fi
1632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001633 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1635 test ! -s conftest.err
1636 }; then :
1637 ac_retval=0
1638else
1639 $as_echo "$as_me: failed program was:" >&5
1640sed 's/^/| /' conftest.$ac_ext >&5
1641
1642 ac_retval=1
1643fi
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001644 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001645 as_fn_set_status $ac_retval
1646
1647} # ac_fn_c_try_cpp
1648
1649# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1650# -------------------------------------------------------
1651# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1652# the include files in INCLUDES and setting the cache variable VAR
1653# accordingly.
1654ac_fn_c_check_header_mongrel ()
1655{
1656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001657 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1659$as_echo_n "checking for $2... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001660if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001661 $as_echo_n "(cached) " >&6
1662fi
1663eval ac_res=\$$3
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1665$as_echo "$ac_res" >&6; }
1666else
1667 # Is the header compilable?
1668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1669$as_echo_n "checking $2 usability... " >&6; }
1670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1671/* end confdefs.h. */
1672$4
1673#include <$2>
1674_ACEOF
1675if ac_fn_c_try_compile "$LINENO"; then :
1676 ac_header_compiler=yes
1677else
1678 ac_header_compiler=no
1679fi
1680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1682$as_echo "$ac_header_compiler" >&6; }
1683
1684# Is the header present?
1685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1686$as_echo_n "checking $2 presence... " >&6; }
1687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1688/* end confdefs.h. */
1689#include <$2>
1690_ACEOF
1691if ac_fn_c_try_cpp "$LINENO"; then :
1692 ac_header_preproc=yes
1693else
1694 ac_header_preproc=no
1695fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001696rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1698$as_echo "$ac_header_preproc" >&6; }
1699
1700# So? What about this header?
1701case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1702 yes:no: )
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1704$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1706$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1707 ;;
1708 no:yes:* )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1710$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1712$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1714$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1716$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1718$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001719( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001720## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001721## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001722 ) | sed "s/^/$as_me: WARNING: /" >&2
1723 ;;
1724esac
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1726$as_echo_n "checking for $2... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001727if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 $as_echo_n "(cached) " >&6
1729else
1730 eval "$3=\$ac_header_compiler"
1731fi
1732eval ac_res=\$$3
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1734$as_echo "$ac_res" >&6; }
1735fi
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001736 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001737
1738} # ac_fn_c_check_header_mongrel
1739
1740# ac_fn_c_try_run LINENO
1741# ----------------------
1742# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1743# that executables *can* be run.
1744ac_fn_c_try_run ()
1745{
1746 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1747 if { { ac_try="$ac_link"
1748case "(($ac_try" in
1749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1750 *) ac_try_echo=$ac_try;;
1751esac
1752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1753$as_echo "$ac_try_echo"; } >&5
1754 (eval "$ac_link") 2>&5
1755 ac_status=$?
1756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1757 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1758 { { case "(($ac_try" in
1759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1760 *) ac_try_echo=$ac_try;;
1761esac
1762eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1763$as_echo "$ac_try_echo"; } >&5
1764 (eval "$ac_try") 2>&5
1765 ac_status=$?
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; }; }; then :
1768 ac_retval=0
1769else
1770 $as_echo "$as_me: program exited with status $ac_status" >&5
1771 $as_echo "$as_me: failed program was:" >&5
1772sed 's/^/| /' conftest.$ac_ext >&5
1773
1774 ac_retval=$ac_status
1775fi
1776 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001777 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 as_fn_set_status $ac_retval
1779
1780} # ac_fn_c_try_run
1781
1782# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1783# -------------------------------------------------------
1784# Tests whether HEADER exists and can be compiled using the include files in
1785# INCLUDES, setting the cache variable VAR accordingly.
1786ac_fn_c_check_header_compile ()
1787{
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1790$as_echo_n "checking for $2... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001791if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 $as_echo_n "(cached) " >&6
1793else
1794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1795/* end confdefs.h. */
1796$4
1797#include <$2>
1798_ACEOF
1799if ac_fn_c_try_compile "$LINENO"; then :
1800 eval "$3=yes"
1801else
1802 eval "$3=no"
1803fi
1804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1805fi
1806eval ac_res=\$$3
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1808$as_echo "$ac_res" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001809 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001810
1811} # ac_fn_c_check_header_compile
1812
Matthias Kloseb9621712010-04-24 17:59:49 +00001813# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1814# -------------------------------------------
1815# Tests whether TYPE exists after having included INCLUDES, setting cache
1816# variable VAR accordingly.
1817ac_fn_c_check_type ()
1818{
1819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1821$as_echo_n "checking for $2... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001822if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001823 $as_echo_n "(cached) " >&6
1824else
1825 eval "$3=no"
1826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1827/* end confdefs.h. */
1828$4
1829int
1830main ()
1831{
1832if (sizeof ($2))
1833 return 0;
1834 ;
1835 return 0;
1836}
1837_ACEOF
1838if ac_fn_c_try_compile "$LINENO"; then :
1839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1840/* end confdefs.h. */
1841$4
1842int
1843main ()
1844{
1845if (sizeof (($2)))
1846 return 0;
1847 ;
1848 return 0;
1849}
1850_ACEOF
1851if ac_fn_c_try_compile "$LINENO"; then :
1852
1853else
1854 eval "$3=yes"
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001863 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001864
1865} # ac_fn_c_check_type
1866
1867# ac_fn_c_find_uintX_t LINENO BITS VAR
1868# ------------------------------------
1869# Finds an unsigned integer type with width BITS, setting cache variable VAR
1870# accordingly.
1871ac_fn_c_find_uintX_t ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1875$as_echo_n "checking for uint$2_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001876if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 $as_echo_n "(cached) " >&6
1878else
1879 eval "$3=no"
1880 # Order is important - never check a type that is potentially smaller
1881 # than half of the expected target width.
1882 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1883 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885/* end confdefs.h. */
1886$ac_includes_default
1887int
1888main ()
1889{
1890static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1891test_array [0] = 0
1892
1893 ;
1894 return 0;
1895}
1896_ACEOF
1897if ac_fn_c_try_compile "$LINENO"; then :
1898 case $ac_type in #(
1899 uint$2_t) :
1900 eval "$3=yes" ;; #(
1901 *) :
1902 eval "$3=\$ac_type" ;;
1903esac
1904fi
1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001906 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907
1908else
1909 break
1910fi
1911 done
1912fi
1913eval ac_res=\$$3
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1915$as_echo "$ac_res" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001916 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001917
1918} # ac_fn_c_find_uintX_t
1919
1920# ac_fn_c_find_intX_t LINENO BITS VAR
1921# -----------------------------------
1922# Finds a signed integer type with width BITS, setting cache variable VAR
1923# accordingly.
1924ac_fn_c_find_intX_t ()
1925{
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1928$as_echo_n "checking for int$2_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001929if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=no"
1933 # Order is important - never check a type that is potentially smaller
1934 # than half of the expected target width.
1935 for ac_type in int$2_t 'int' 'long int' \
1936 'long long int' 'short int' 'signed char'; do
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001940 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001941int
1942main ()
1943{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001944static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001945test_array [0] = 0
1946
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_compile "$LINENO"; then :
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001955 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001956int
1957main ()
1958{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001959static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001960 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1961test_array [0] = 0
1962
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968
1969else
1970 case $ac_type in #(
1971 int$2_t) :
1972 eval "$3=yes" ;; #(
1973 *) :
1974 eval "$3=\$ac_type" ;;
1975esac
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001980 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02001990 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_intX_t
1993
1994# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1995# --------------------------------------------
1996# Tries to find the compile-time value of EXPR in a program that includes
1997# INCLUDES, setting VAR accordingly. Returns whether the value could be
1998# computed
1999ac_fn_c_compute_int ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 if test "$cross_compiling" = yes; then
2003 # Depending upon the size, compute the lo and hi bounds.
2004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) >= 0)];
2011test_array [0] = 0
2012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_lo=0 ac_mid=0
2019 while :; do
2020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021/* end confdefs.h. */
2022$4
2023int
2024main ()
2025{
2026static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2027test_array [0] = 0
2028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 ac_hi=$ac_mid; break
2035else
2036 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2037 if test $ac_lo -le $ac_mid; then
2038 ac_lo= ac_hi=
2039 break
2040 fi
2041 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2044 done
2045else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052static int test_array [1 - 2 * !(($2) < 0)];
2053test_array [0] = 0
2054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_hi=-1 ac_mid=-1
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2069test_array [0] = 0
2070
2071 ;
2072 return 0;
2073}
2074_ACEOF
2075if ac_fn_c_try_compile "$LINENO"; then :
2076 ac_lo=$ac_mid; break
2077else
2078 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2079 if test $ac_mid -le $ac_hi; then
2080 ac_lo= ac_hi=
2081 break
2082 fi
2083 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086 done
2087else
2088 ac_lo= ac_hi=
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093# Binary search between lo and hi bounds.
2094while test "x$ac_lo" != "x$ac_hi"; do
2095 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
2098$4
2099int
2100main ()
2101{
2102static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2103test_array [0] = 0
2104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=$ac_mid
2111else
2112 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115done
2116case $ac_lo in #((
2117?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2118'') ac_retval=1 ;;
2119esac
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124static long int longval () { return $2; }
2125static unsigned long int ulongval () { return $2; }
2126#include <stdio.h>
2127#include <stdlib.h>
2128int
2129main ()
2130{
2131
2132 FILE *f = fopen ("conftest.val", "w");
2133 if (! f)
2134 return 1;
2135 if (($2) < 0)
2136 {
2137 long int i = longval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%ld", i);
2141 }
2142 else
2143 {
2144 unsigned long int i = ulongval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%lu", i);
2148 }
2149 /* Do not output a trailing newline, as this causes \r\n confusion
2150 on some platforms. */
2151 return ferror (f) || fclose (f) != 0;
2152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_run "$LINENO"; then :
2158 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2159else
2160 ac_retval=1
2161fi
2162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2163 conftest.$ac_objext conftest.beam conftest.$ac_ext
2164rm -f conftest.val
2165
2166 fi
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002167 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_compute_int
2171
2172# ac_fn_c_check_func LINENO FUNC VAR
2173# ----------------------------------
2174# Tests whether FUNC exists, setting the cache variable VAR accordingly
2175ac_fn_c_check_func ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2179$as_echo_n "checking for $2... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002180if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 $as_echo_n "(cached) " >&6
2182else
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2187#define $2 innocuous_$2
2188
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $2 (); below.
2191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2192 <limits.h> exists even on freestanding compilers. */
2193
2194#ifdef __STDC__
2195# include <limits.h>
2196#else
2197# include <assert.h>
2198#endif
2199
2200#undef $2
2201
2202/* Override any GCC internal prototype to avoid an error.
2203 Use char because int might match the return type of a GCC
2204 builtin and then its argument prototype would still apply. */
2205#ifdef __cplusplus
2206extern "C"
2207#endif
2208char $2 ();
2209/* The GNU C library defines this for functions which it implements
2210 to always fail with ENOSYS. Some functions are actually named
2211 something starting with __ and the normal name is an alias. */
2212#if defined __stub_$2 || defined __stub___$2
2213choke me
2214#endif
2215
2216int
2217main ()
2218{
2219return $2 ();
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_link "$LINENO"; then :
2225 eval "$3=yes"
2226else
2227 eval "$3=no"
2228fi
2229rm -f core conftest.err conftest.$ac_objext \
2230 conftest$ac_exeext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002235 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002236
2237} # ac_fn_c_check_func
2238
2239# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2240# ----------------------------------------------------
2241# Tries to find if the field MEMBER exists in type AGGR, after including
2242# INCLUDES, setting cache variable VAR accordingly.
2243ac_fn_c_check_member ()
2244{
2245 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2247$as_echo_n "checking for $2.$3... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002248if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$5
2254int
2255main ()
2256{
2257static $2 ac_aggr;
2258if (ac_aggr.$3)
2259return 0;
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$4=yes"
2266else
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$5
2270int
2271main ()
2272{
2273static $2 ac_aggr;
2274if (sizeof ac_aggr.$3)
2275return 0;
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$4=yes"
2282else
2283 eval "$4=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289eval ac_res=\$$4
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2291$as_echo "$ac_res" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002292 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002293
2294} # ac_fn_c_check_member
2295
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002296# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2297# ---------------------------------------------
2298# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2299# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002300ac_fn_c_check_decl ()
2301{
2302 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002303 as_decl_name=`echo $2|sed 's/ *(.*//'`
2304 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2306$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002307if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002308 $as_echo_n "(cached) " >&6
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$4
2313int
2314main ()
2315{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002316#ifndef $as_decl_name
2317#ifdef __cplusplus
2318 (void) $as_decl_use;
2319#else
2320 (void) $as_decl_name;
2321#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002322#endif
2323
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329 eval "$3=yes"
2330else
2331 eval "$3=no"
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334fi
2335eval ac_res=\$$3
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337$as_echo "$ac_res" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002338 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002339
2340} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002341cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002342This file contains any messages produced by compilers while
2343running configure, to aid debugging if configure makes a mistake.
2344
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002345It was created by python $as_me 3.3, which was
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002346generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002347
2348 $ $0 $@
2349
2350_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002352{
2353cat <<_ASUNAME
2354## --------- ##
2355## Platform. ##
2356## --------- ##
2357
2358hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2359uname -m = `(uname -m) 2>/dev/null || echo unknown`
2360uname -r = `(uname -r) 2>/dev/null || echo unknown`
2361uname -s = `(uname -s) 2>/dev/null || echo unknown`
2362uname -v = `(uname -v) 2>/dev/null || echo unknown`
2363
2364/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2365/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2366
2367/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2368/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2369/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002371/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2372/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2373/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2374
2375_ASUNAME
2376
2377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2378for as_dir in $PATH
2379do
2380 IFS=$as_save_IFS
2381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002382 $as_echo "PATH: $as_dir"
2383 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002385
2386} >&5
2387
2388cat >&5 <<_ACEOF
2389
2390
2391## ----------- ##
2392## Core tests. ##
2393## ----------- ##
2394
2395_ACEOF
2396
2397
2398# Keep a trace of the command line.
2399# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002403ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_configure_args0=
2405ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002406ac_must_keep_next=false
2407for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002408do
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 for ac_arg
2410 do
2411 case $ac_arg in
2412 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2413 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2414 | -silent | --silent | --silen | --sile | --sil)
2415 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002416 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 esac
2419 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002426 case $ac_arg in
2427 *=* | --config-cache | -C | -disable-* | --disable-* \
2428 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2429 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2430 | -with-* | --with-* | -without-* | --without-* | --x)
2431 case "$ac_configure_args0 " in
2432 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2433 esac
2434 ;;
2435 -* ) ac_must_keep_next=true ;;
2436 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002438 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 ;;
2440 esac
2441 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002442done
Matthias Kloseb9621712010-04-24 17:59:49 +00002443{ ac_configure_args0=; unset ac_configure_args0;}
2444{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446# When interrupted or exit'd, cleanup temporary files, and complete
2447# config.log. We remove comments because anyway the quotes in there
2448# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449# WARNING: Use '\'' to represent an apostrophe within the trap.
2450# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002451trap 'exit_status=$?
2452 # Save into config.log some information that might help in debugging.
2453 {
2454 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002455
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002457## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002458## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 echo
2460 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461(
2462 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2463 eval ac_val=\$$ac_var
2464 case $ac_val in #(
2465 *${as_nl}*)
2466 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2468$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac
2470 case $ac_var in #(
2471 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2473 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac ;;
2475 esac
2476 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2479 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 "s/'\''/'\''\\\\'\'''\''/g;
2482 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2483 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002486 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 esac |
2488 sort
2489)
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002491
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002493## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 echo
2496 for ac_var in $ac_subst_vars
2497 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 eval ac_val=\$$ac_var
2499 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 done | sort
2504 echo
2505
2506 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002509## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 echo
2511 for ac_var in $ac_subst_files
2512 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 eval ac_val=\$$ac_var
2514 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 done | sort
2519 echo
2520 fi
2521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 fi
2530 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$as_me: caught signal $ac_signal"
2532 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 rm -f core *.core core.conftest.* &&
2535 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002538for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541ac_signal=0
2542
2543# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002545
Matthias Kloseb9621712010-04-24 17:59:49 +00002546$as_echo "/* confdefs.h */" > confdefs.h
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548# Predefined preprocessor variables.
2549
2550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_NAME "$PACKAGE_NAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_VERSION "$PACKAGE_VERSION"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_STRING "$PACKAGE_STRING"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2568_ACEOF
2569
Matthias Kloseb9621712010-04-24 17:59:49 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_URL "$PACKAGE_URL"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574
2575# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002576# Prefer an explicitly selected file to automatically selected ones.
2577ac_site_file1=NONE
2578ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580 # We do not want a PATH search for config.site.
2581 case $CONFIG_SITE in #((
2582 -*) ac_site_file1=./$CONFIG_SITE;;
2583 */*) ac_site_file1=$CONFIG_SITE;;
2584 *) ac_site_file1=./$CONFIG_SITE;;
2585 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$prefix/share/config.site
2588 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589else
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 ac_site_file1=$ac_default_prefix/share/config.site
2591 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002593for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594do
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 test "x$ac_site_file" = xNONE && continue
2596 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2598$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600 . "$ac_site_file" \
2601 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2603as_fn_error $? "failed to load site script $ac_site_file
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002604See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605 fi
2606done
2607
2608if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 # Some versions of bash will fail to source /dev/null (special files
2610 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2611 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2613$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2616 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 esac
2618 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619else
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2621$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 >$cache_file
2623fi
2624
2625# Check that the precious variables saved in the cache have kept the same
2626# value.
2627ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2630 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2632 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 case $ac_old_set,$ac_new_set in
2634 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_cache_corrupted=: ;;
2638 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2640$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 ac_cache_corrupted=: ;;
2642 ,);;
2643 *)
2644 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 # differences in whitespace do not lead to failure.
2646 ac_old_val_w=`echo x $ac_old_val`
2647 ac_new_val_w=`echo x $ac_new_val`
2648 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2650$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2651 ac_cache_corrupted=:
2652 else
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2654$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2655 eval $ac_var=\$ac_old_val
2656 fi
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2658$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2660$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 fi;;
2662 esac
2663 # Pass precious variables to config.status.
2664 if test "$ac_new_set" = set; then
2665 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 *) ac_arg=$ac_var=$ac_new_val ;;
2668 esac
2669 case " $ac_configure_args " in
2670 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 esac
2673 fi
2674done
2675if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2679$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002680 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002682## -------------------- ##
2683## Main body of script. ##
2684## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685
Guido van Rossum7f43da71994-08-01 12:15:30 +00002686ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2690ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691
Guido van Rossum627b2d71993-12-24 10:39:16 +00002692
Michael W. Hudson54241132001-12-07 15:38:26 +00002693
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002694
2695
2696
2697
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002698if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002699then
2700# Extract the first word of "hg", so it can be a program name with args.
2701set dummy hg; ac_word=$2
2702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2703$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02002704if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705 $as_echo_n "(cached) " >&6
2706else
2707 if test -n "$HAS_HG"; then
2708 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2709else
2710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2711for as_dir in $PATH
2712do
2713 IFS=$as_save_IFS
2714 test -z "$as_dir" && as_dir=.
2715 for ac_exec_ext in '' $ac_executable_extensions; do
2716 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2717 ac_cv_prog_HAS_HG="found"
2718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2719 break 2
2720 fi
2721done
2722 done
2723IFS=$as_save_IFS
2724
2725 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2726fi
2727fi
2728HAS_HG=$ac_cv_prog_HAS_HG
2729if test -n "$HAS_HG"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2731$as_echo "$HAS_HG" >&6; }
2732else
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2734$as_echo "no" >&6; }
2735fi
2736
2737
2738else
2739HAS_HG=no-repository
2740fi
2741if test $HAS_HG = found
2742then
2743 HGVERSION="hg id -i \$(srcdir)"
2744 HGTAG="hg id -t \$(srcdir)"
2745 HGBRANCH="hg id -b \$(srcdir)"
2746else
2747 HGVERSION=""
2748 HGTAG=""
2749 HGBRANCH=""
2750fi
2751
2752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002754
2755
Martin v. Löwis11437992002-04-12 09:54:03 +00002756
Benjamin Petersond23f8222009-04-05 19:13:16 +00002757if test "$prefix" != "/"; then
2758 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2759fi
2760
2761
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
2763
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002764# We don't use PACKAGE_ variables, and they cause conflicts
2765# with other autoconf-based packages that include Python.h
2766grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2767rm confdefs.h
2768mv confdefs.h.new confdefs.h
2769
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002770
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002771VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002772
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002773# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002774
2775SOVERSION=1.0
2776
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002777# The later defininition of _XOPEN_SOURCE disables certain features
2778# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2779
Matthias Kloseb9621712010-04-24 17:59:49 +00002780$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002781
2782
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002783# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2784# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2785# them.
2786
Matthias Kloseb9621712010-04-24 17:59:49 +00002787$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002788
2789
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002790# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2791# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2792# them.
2793
Matthias Kloseb9621712010-04-24 17:59:49 +00002794$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002795
2796
Martin v. Löwisd6320502004-08-12 13:45:08 +00002797# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2798# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2799
Matthias Kloseb9621712010-04-24 17:59:49 +00002800$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002801
2802
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002803# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2804# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2805# them.
2806
Matthias Kloseb9621712010-04-24 17:59:49 +00002807$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808
2809
2810
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002811define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002812
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002813# Arguments passed to configure.
2814
2815CONFIG_ARGS="$ac_configure_args"
2816
Matthias Kloseb9621712010-04-24 17:59:49 +00002817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2818$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002819# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002820if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002821 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002822 case $enableval in
2823 yes)
2824 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002825 if test ! -d "${enableval}"
2826 then
2827 enableval=/
2828 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002829 ;;
2830 esac
2831 case $enableval in
2832 no)
2833 UNIVERSALSDK=
2834 enable_universalsdk=
2835 ;;
2836 *)
2837 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002838 if test ! -d "${UNIVERSALSDK}"
2839 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002840 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002841 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002842 ;;
2843 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002844
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002845
Thomas Wouters477c8d52006-05-27 19:21:47 +00002846else
2847
2848 UNIVERSALSDK=
2849 enable_universalsdk=
2850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002852
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002853if test -n "${UNIVERSALSDK}"
2854then
Matthias Kloseb9621712010-04-24 17:59:49 +00002855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2856$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002857else
Matthias Kloseb9621712010-04-24 17:59:49 +00002858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2859$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002860fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002862
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002863
2864
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002865UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002866
Matthias Kloseb9621712010-04-24 17:59:49 +00002867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2868$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002869
2870# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002871if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002872 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2874$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002875 UNIVERSAL_ARCHS="$withval"
2876
2877else
2878
Matthias Kloseb9621712010-04-24 17:59:49 +00002879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2880$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002881
2882fi
2883
2884
2885
2886
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002887
2888# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002889if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002890 withval=$with_framework_name;
2891 PYTHONFRAMEWORK=${withval}
2892 PYTHONFRAMEWORKDIR=${withval}.framework
2893 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2894
2895else
2896
2897 PYTHONFRAMEWORK=Python
2898 PYTHONFRAMEWORKDIR=Python.framework
2899 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2900
2901fi
2902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002903# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002904if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002905 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002906 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002908 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002909 esac
2910 case $enableval in
2911 no)
2912 PYTHONFRAMEWORK=
2913 PYTHONFRAMEWORKDIR=no-framework
2914 PYTHONFRAMEWORKPREFIX=
2915 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916 FRAMEWORKINSTALLFIRST=
2917 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002918 FRAMEWORKALTINSTALLFIRST=
2919 FRAMEWORKALTINSTALLLAST=
2920 if test "x${prefix}" = "xNONE"; then
2921 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2922 else
2923 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2924 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002925 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002926 ;;
2927 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002928 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002929 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002931 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002932 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2933 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002934 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002935
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002936 if test "x${prefix}" = "xNONE" ; then
2937 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002938
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002939 else
2940 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2941 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002942
2943 case "${enableval}" in
2944 /System*)
2945 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2946 if test "${prefix}" = "NONE" ; then
2947 # See below
2948 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2949 fi
2950 ;;
2951
2952 /Library*)
2953 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2954 ;;
2955
2956 */Library/Frameworks)
2957 MDIR="`dirname "${enableval}"`"
2958 MDIR="`dirname "${MDIR}"`"
2959 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2960
2961 if test "${prefix}" = "NONE"; then
2962 # User hasn't specified the
2963 # --prefix option, but wants to install
2964 # the framework in a non-default location,
2965 # ensure that the compatibility links get
2966 # installed relative to that prefix as well
2967 # instead of in /usr/local.
2968 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2969 fi
2970 ;;
2971
2972 *)
2973 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2974 ;;
2975 esac
2976
Jack Jansen127e56e2001-09-11 14:41:54 +00002977 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002978
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002979 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002980 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002981 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002983 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002984
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002985 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2986
2987 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2988
Jack Jansene578a632001-08-15 01:27:14 +00002989 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002990
Guido van Rossum563e7081996-09-10 18:20:48 +00002991else
Martin v. Löwis11437992002-04-12 09:54:03 +00002992
Jack Jansene578a632001-08-15 01:27:14 +00002993 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002994 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002995 PYTHONFRAMEWORKPREFIX=
2996 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002997 FRAMEWORKINSTALLFIRST=
2998 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002999 FRAMEWORKALTINSTALLFIRST=
3000 FRAMEWORKALTINSTALLLAST=
3001 if test "x${prefix}" = "xNONE" ; then
3002 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3003 else
3004 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3005 fi
Jack Jansene578a632001-08-15 01:27:14 +00003006 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003007
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009fi
3010
Thomas Wouters477c8d52006-05-27 19:21:47 +00003011
3012
Michael W. Hudson54241132001-12-07 15:38:26 +00003013
3014
3015
3016
Jack Jansene578a632001-08-15 01:27:14 +00003017
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003018
3019
3020
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003021
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003022
Jack Jansene578a632001-08-15 01:27:14 +00003023##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003024## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003025## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003026##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003027# Set name for machine-dependent library files
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3030$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003031if test -z "$MACHDEP"
3032then
Guido van Rossum563e7081996-09-10 18:20:48 +00003033 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003034 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003035 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003036 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003037 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003038 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003039 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003040 ac_md_system=`echo $ac_sys_system |
3041 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3042 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003043 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003044 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003045
Guido van Rossum07397971997-04-29 21:49:50 +00003046 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003047 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003048 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003049 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003050 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003051 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003052 esac
3053fi
Guido van Rossum91922671997-10-09 20:24:13 +00003054
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003055# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3056# disable features if it is defined, without any means to access these
3057# features as extensions. For these systems, we skip the definition of
3058# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3059# some feature, make sure there is no alternative way to access this
3060# feature. Also, when using wildcards, make sure you have verified the
3061# need for not defining _XOPEN_SOURCE on all systems matching the
3062# wildcard, and that the wildcard does not include future systems
3063# (which may remove their limitations).
3064case $ac_sys_system/$ac_sys_release in
3065 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3066 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003067 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003068 # In addition, Stefan Krah confirms that issue #1244610 exists through
3069 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003070 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003071 define_xopen_source=no
3072 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3073 # also defined. This can be overridden by defining _BSD_SOURCE
3074 # As this has a different meaning on Linux, only define it on OpenBSD
3075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003077
3078 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003079 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003080 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3081 # also defined. This can be overridden by defining _BSD_SOURCE
3082 # As this has a different meaning on Linux, only define it on OpenBSD
3083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003085
3086 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003087 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3088 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3089 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003090 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 +00003091 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003092 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3093 # request to enable features supported by the standard as a request
3094 # to disable features not supported by the standard. The best way
3095 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3096 # entirely and define __EXTENSIONS__ instead.
3097 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003098 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003099 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3100 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003101 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003102 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003103 define_xopen_source=no;;
3104 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003105 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003106 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003107 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003108 # On FreeBSD 4, the math functions C89 does not cover are never defined
3109 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3110 FreeBSD/4.*)
3111 define_xopen_source=no;;
3112 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3113 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3114 # identifies itself as Darwin/7.*
3115 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3116 # disables platform specific features beyond repair.
3117 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3118 # has no effect, don't bother defining them
3119 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003120 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003121 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003122 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003123 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3124 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3125 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003126 AIX/4)
3127 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003128 AIX/5)
3129 if test `uname -r` -eq 1; then
3130 define_xopen_source=no
3131 fi
3132 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003133 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3134 # defining NI_NUMERICHOST.
3135 QNX/6.3.2)
3136 define_xopen_source=no
3137 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003138
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003139esac
3140
3141if test $define_xopen_source = yes
3142then
Victor Stinner14d098d2011-09-07 22:29:43 +02003143 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003144
Victor Stinner14d098d2011-09-07 22:29:43 +02003145$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003146
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003147
3148 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3149 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3150 # several APIs are not declared. Since this is also needed in some
3151 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003152
Matthias Kloseb9621712010-04-24 17:59:49 +00003153$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003154
3155
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003156
Matthias Kloseb9621712010-04-24 17:59:49 +00003157$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003158
3159
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003160fi
3161
Guido van Rossum91922671997-10-09 20:24:13 +00003162#
3163# SGI compilers allow the specification of the both the ABI and the
3164# ISA on the command line. Depending on the values of these switches,
3165# different and often incompatable code will be generated.
3166#
3167# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3168# thus supply support for various ABI/ISA combinations. The MACHDEP
3169# variable is also adjusted.
3170#
3171
3172if test ! -z "$SGI_ABI"
3173then
3174 CC="cc $SGI_ABI"
3175 LDFLAGS="$SGI_ABI $LDFLAGS"
3176 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3179$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003180
Jack Jansen6b08a402004-06-03 12:41:45 +00003181# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3182# it may influence the way we can build extensions, so distutils
3183# needs to check it
3184
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Jack Jansen6b08a402004-06-03 12:41:45 +00003186CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003188
Matthias Kloseb9621712010-04-24 17:59:49 +00003189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3190$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003191ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3193$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003194
Guido van Rossum627b2d71993-12-24 10:39:16 +00003195# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003196
3197# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3198# for debug/optimization stuff. BASECFLAGS is for flags that are required
3199# just to get things to compile and link. Users are free to override OPT
3200# when running configure or make. The build should not break if they do.
3201# BASECFLAGS should generally not be messed with, however.
3202
3203# XXX shouldn't some/most/all of this code be merged with the stuff later
3204# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3206$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003209if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003211 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003212 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003213 without_gcc=yes;;
3214 yes) CC=gcc
3215 without_gcc=no;;
3216 *) CC=$withval
3217 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003218 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003219else
Martin v. Löwis11437992002-04-12 09:54:03 +00003220
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003221 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003222 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003223 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003224 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003225 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226fi
3227
Matthias Kloseb9621712010-04-24 17:59:49 +00003228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3229$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003230
Guido van Rossum8b131c51995-03-09 14:10:13 +00003231# If the user switches compilers, we can't believe the cache
3232if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3233then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003234 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003235(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003236fi
3237
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003238# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3239# when the compiler supports them, but we don't always want -O2, and
3240# we set -g later.
3241if test -z "$CFLAGS"; then
3242 CFLAGS=
3243fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003244ac_ext=c
3245ac_cpp='$CPP $CPPFLAGS'
3246ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3247ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3248ac_compiler_gnu=$ac_cv_c_compiler_gnu
3249if test -n "$ac_tool_prefix"; then
3250 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3251set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3253$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003254if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003255 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003256else
3257 if test -n "$CC"; then
3258 ac_cv_prog_CC="$CC" # Let the user override the test.
3259else
Martin v. Löwis11437992002-04-12 09:54:03 +00003260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3261for as_dir in $PATH
3262do
3263 IFS=$as_save_IFS
3264 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003265 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003266 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 +00003267 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003268 $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 +00003269 break 2
3270 fi
3271done
Matthias Kloseb9621712010-04-24 17:59:49 +00003272 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003274
Jack Jansendd19cf82001-12-06 22:36:17 +00003275fi
3276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003277CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003278if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3280$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003281else
Matthias Kloseb9621712010-04-24 17:59:49 +00003282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3283$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003284fi
3285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286
Martin v. Löwis11437992002-04-12 09:54:03 +00003287fi
3288if test -z "$ac_cv_prog_CC"; then
3289 ac_ct_CC=$CC
3290 # Extract the first word of "gcc", so it can be a program name with args.
3291set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3293$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003294if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003295 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003296else
3297 if test -n "$ac_ct_CC"; then
3298 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3299else
3300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3301for as_dir in $PATH
3302do
3303 IFS=$as_save_IFS
3304 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306 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 +00003307 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003308 $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 +00003309 break 2
3310 fi
3311done
Matthias Kloseb9621712010-04-24 17:59:49 +00003312 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003313IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003314
3315fi
3316fi
3317ac_ct_CC=$ac_cv_prog_ac_ct_CC
3318if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3320$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003321else
Matthias Kloseb9621712010-04-24 17:59:49 +00003322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3323$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003324fi
3325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003326 if test "x$ac_ct_CC" = x; then
3327 CC=""
3328 else
3329 case $cross_compiling:$ac_tool_warned in
3330yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003333ac_tool_warned=yes ;;
3334esac
3335 CC=$ac_ct_CC
3336 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003337else
3338 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003339fi
3340
Jack Jansendd19cf82001-12-06 22:36:17 +00003341if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342 if test -n "$ac_tool_prefix"; then
3343 # 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 +00003344set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3346$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003347if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003348 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003349else
3350 if test -n "$CC"; then
3351 ac_cv_prog_CC="$CC" # Let the user override the test.
3352else
Martin v. Löwis11437992002-04-12 09:54:03 +00003353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3354for as_dir in $PATH
3355do
3356 IFS=$as_save_IFS
3357 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003358 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359 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 +00003360 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 $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 +00003362 break 2
3363 fi
3364done
Matthias Kloseb9621712010-04-24 17:59:49 +00003365 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003366IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003367
3368fi
3369fi
3370CC=$ac_cv_prog_CC
3371if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3373$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003374else
Matthias Kloseb9621712010-04-24 17:59:49 +00003375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3376$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003377fi
3378
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003379
Martin v. Löwis11437992002-04-12 09:54:03 +00003380 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003381fi
3382if test -z "$CC"; then
3383 # Extract the first word of "cc", so it can be a program name with args.
3384set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3386$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003387if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003389else
3390 if test -n "$CC"; then
3391 ac_cv_prog_CC="$CC" # Let the user override the test.
3392else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003393 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3395for as_dir in $PATH
3396do
3397 IFS=$as_save_IFS
3398 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003400 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 +00003401 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3402 ac_prog_rejected=yes
3403 continue
3404 fi
3405 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 $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 +00003407 break 2
3408 fi
3409done
Matthias Kloseb9621712010-04-24 17:59:49 +00003410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003411IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003412
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003413if test $ac_prog_rejected = yes; then
3414 # We found a bogon in the path, so make sure we never use it.
3415 set dummy $ac_cv_prog_CC
3416 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003417 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003418 # We chose a different compiler from the bogus one.
3419 # However, it has the same basename, so the bogon will be chosen
3420 # first if we set CC to just the basename; use the full file name.
3421 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003422 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003423 fi
3424fi
3425fi
3426fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003427CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003428if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3430$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003431else
Matthias Kloseb9621712010-04-24 17:59:49 +00003432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3433$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003434fi
3435
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436
Martin v. Löwis11437992002-04-12 09:54:03 +00003437fi
3438if test -z "$CC"; then
3439 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003440 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 do
3442 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3443set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3445$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003446if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003447 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003448else
3449 if test -n "$CC"; then
3450 ac_cv_prog_CC="$CC" # Let the user override the test.
3451else
Martin v. Löwis11437992002-04-12 09:54:03 +00003452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3453for as_dir in $PATH
3454do
3455 IFS=$as_save_IFS
3456 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003457 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458 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 +00003459 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003460 $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 +00003461 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003462 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003463done
Matthias Kloseb9621712010-04-24 17:59:49 +00003464 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003466
3467fi
3468fi
3469CC=$ac_cv_prog_CC
3470if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3472$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003473else
Matthias Kloseb9621712010-04-24 17:59:49 +00003474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3475$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003476fi
3477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 test -n "$CC" && break
3480 done
3481fi
3482if test -z "$CC"; then
3483 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003485do
3486 # Extract the first word of "$ac_prog", so it can be a program name with args.
3487set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3489$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003490if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003491 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003492else
3493 if test -n "$ac_ct_CC"; then
3494 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3495else
3496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3497for as_dir in $PATH
3498do
3499 IFS=$as_save_IFS
3500 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003501 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502 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 +00003503 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003504 $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 +00003505 break 2
3506 fi
3507done
Matthias Kloseb9621712010-04-24 17:59:49 +00003508 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003510
Martin v. Löwis11437992002-04-12 09:54:03 +00003511fi
3512fi
3513ac_ct_CC=$ac_cv_prog_ac_ct_CC
3514if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3516$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003517else
Matthias Kloseb9621712010-04-24 17:59:49 +00003518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3519$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003520fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003522
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 test -n "$ac_ct_CC" && break
3524done
Michael W. Hudson54241132001-12-07 15:38:26 +00003525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003526 if test "x$ac_ct_CC" = x; then
3527 CC=""
3528 else
3529 case $cross_compiling:$ac_tool_warned in
3530yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003531{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3532$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533ac_tool_warned=yes ;;
3534esac
3535 CC=$ac_ct_CC
3536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003537fi
3538
3539fi
3540
3541
Matthias Kloseb9621712010-04-24 17:59:49 +00003542test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3543$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003544as_fn_error $? "no acceptable C compiler found in \$PATH
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003545See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003546
3547# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003548$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3549set X $ac_compile
3550ac_compiler=$2
3551for ac_option in --version -v -V -qversion; do
3552 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553case "(($ac_try" in
3554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3555 *) ac_try_echo=$ac_try;;
3556esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003557eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3558$as_echo "$ac_try_echo"; } >&5
3559 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 if test -s conftest.err; then
3562 sed '10a\
3563... rest of stderr output deleted ...
3564 10q' conftest.err >conftest.er1
3565 cat conftest.er1 >&5
3566 fi
3567 rm -f conftest.er1 conftest.err
3568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3569 test $ac_status = 0; }
3570done
Martin v. Löwis11437992002-04-12 09:54:03 +00003571
Matthias Kloseb9621712010-04-24 17:59:49 +00003572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003573/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003574
Martin v. Löwis11437992002-04-12 09:54:03 +00003575int
3576main ()
3577{
3578
3579 ;
3580 return 0;
3581}
3582_ACEOF
3583ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003584ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003585# Try to create an executable without -o first, disregard a.out.
3586# It will help us diagnose broken compilers, and finding out an intuition
3587# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3589$as_echo_n "checking whether the C compiler works... " >&6; }
3590ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3591
3592# The possible output files:
3593ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595ac_rmfiles=
3596for ac_file in $ac_files
3597do
3598 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3601 esac
3602done
3603rm -f $ac_rmfiles
3604
Matthias Kloseb9621712010-04-24 17:59:49 +00003605if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606case "(($ac_try" in
3607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3608 *) ac_try_echo=$ac_try;;
3609esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003610eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3611$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3615 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3617# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3618# in a Makefile. We should not override ac_cv_exeext if it was cached,
3619# so that the user can short-circuit this test for compilers unknown to
3620# Autoconf.
3621for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003622do
3623 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003626 ;;
3627 [ab].out )
3628 # We found the default executable, but exeext='' is most
3629 # certainly right.
3630 break;;
3631 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633 then :; else
3634 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3635 fi
3636 # We set ac_cv_exeext here because the later test for it is not
3637 # safe: cross compilers may not add the suffix if given an `-o'
3638 # argument, so we may need to know it at that point already.
3639 # Even if this section looks crufty: it has the advantage of
3640 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003641 break;;
3642 * )
3643 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 esac
3645done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646test "$ac_cv_exeext" = no && ac_cv_exeext=
3647
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003648else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649 ac_file=''
3650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003651if test -z "$ac_file"; then :
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3653$as_echo "no" >&6; }
3654$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003655sed 's/^/| /' conftest.$ac_ext >&5
3656
Matthias Kloseb9621712010-04-24 17:59:49 +00003657{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003659as_fn_error 77 "C compiler cannot create executables
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003660See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003661else
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3663$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3666$as_echo_n "checking for C compiler default output file name... " >&6; }
3667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3668$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003669ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003670
Matthias Kloseb9621712010-04-24 17:59:49 +00003671rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003672ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3674$as_echo_n "checking for suffix of executables... " >&6; }
3675if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676case "(($ac_try" in
3677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3678 *) ac_try_echo=$ac_try;;
3679esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3681$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3685 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003686 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3687# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3688# work properly (i.e., refer to `conftest.exe'), while it won't with
3689# `rm'.
3690for ac_file in conftest.exe conftest conftest.*; do
3691 test -f "$ac_file" || continue
3692 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003694 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3695 break;;
3696 * ) break;;
3697 esac
3698done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003699else
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003702as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003703See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003705rm -f conftest conftest$ac_cv_exeext
3706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3707$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003708
3709rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003710EXEEXT=$ac_cv_exeext
3711ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3713/* end confdefs.h. */
3714#include <stdio.h>
3715int
3716main ()
3717{
3718FILE *f = fopen ("conftest.out", "w");
3719 return ferror (f) || fclose (f) != 0;
3720
3721 ;
3722 return 0;
3723}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003725ac_clean_files="$ac_clean_files conftest.out"
3726# Check that the compiler produces executables we can run. If not, either
3727# the compiler is broken, or we cross compile.
3728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3729$as_echo_n "checking whether we are cross compiling... " >&6; }
3730if test "$cross_compiling" != yes; then
3731 { { ac_try="$ac_link"
3732case "(($ac_try" in
3733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3734 *) ac_try_echo=$ac_try;;
3735esac
3736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3737$as_echo "$ac_try_echo"; } >&5
3738 (eval "$ac_link") 2>&5
3739 ac_status=$?
3740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3741 test $ac_status = 0; }
3742 if { ac_try='./conftest$ac_cv_exeext'
3743 { { case "(($ac_try" in
3744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3745 *) ac_try_echo=$ac_try;;
3746esac
3747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3748$as_echo "$ac_try_echo"; } >&5
3749 (eval "$ac_try") 2>&5
3750 ac_status=$?
3751 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3752 test $ac_status = 0; }; }; then
3753 cross_compiling=no
3754 else
3755 if test "$cross_compiling" = maybe; then
3756 cross_compiling=yes
3757 else
3758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003760as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003761If you meant to cross compile, use \`--host'.
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003762See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 fi
3764 fi
3765fi
3766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3767$as_echo "$cross_compiling" >&6; }
3768
3769rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3770ac_clean_files=$ac_clean_files_save
3771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3772$as_echo_n "checking for suffix of object files... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003773if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 $as_echo_n "(cached) " >&6
3775else
3776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003777/* end confdefs.h. */
3778
3779int
3780main ()
3781{
3782
3783 ;
3784 return 0;
3785}
3786_ACEOF
3787rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003788if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789case "(($ac_try" in
3790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3791 *) ac_try_echo=$ac_try;;
3792esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003793eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3794$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3798 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_file in conftest.o conftest.obj conftest.*; do
3800 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003803 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3804 break;;
3805 esac
3806done
3807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003809sed 's/^/| /' conftest.$ac_ext >&5
3810
Matthias Kloseb9621712010-04-24 17:59:49 +00003811{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003813as_fn_error $? "cannot compute suffix of object files: cannot compile
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003814See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003815fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003816rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3819$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003820OBJEXT=$ac_cv_objext
3821ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3823$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003824if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003826else
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830int
3831main ()
3832{
3833#ifndef __GNUC__
3834 choke me
3835#endif
3836
3837 ;
3838 return 0;
3839}
3840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 ac_compiler_gnu=yes
3843else
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003847ac_cv_c_compiler_gnu=$ac_compiler_gnu
3848
3849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3851$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3852if test $ac_compiler_gnu = yes; then
3853 GCC=yes
3854else
3855 GCC=
3856fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003857ac_test_CFLAGS=${CFLAGS+set}
3858ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3860$as_echo_n "checking whether $CC accepts -g... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003861if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003862 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003863else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864 ac_save_c_werror_flag=$ac_c_werror_flag
3865 ac_c_werror_flag=yes
3866 ac_cv_prog_cc_g=no
3867 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871int
3872main ()
3873{
3874
3875 ;
3876 return 0;
3877}
3878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003879if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003880 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881else
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 CFLAGS=""
3883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884/* end confdefs.h. */
3885
3886int
3887main ()
3888{
3889
3890 ;
3891 return 0;
3892}
3893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003894if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895
Matthias Kloseb9621712010-04-24 17:59:49 +00003896else
3897 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900/* end confdefs.h. */
3901
3902int
3903main ()
3904{
3905
3906 ;
3907 return 0;
3908}
3909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003910if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3918 ac_c_werror_flag=$ac_save_c_werror_flag
3919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3921$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003922if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924elif test $ac_cv_prog_cc_g = yes; then
3925 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003926 CFLAGS="-g -O2"
3927 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003928 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003929 fi
3930else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003931 if test "$GCC" = yes; then
3932 CFLAGS="-O2"
3933 else
3934 CFLAGS=
3935 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3938$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003939if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003941else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003943ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003945/* end confdefs.h. */
3946#include <stdarg.h>
3947#include <stdio.h>
3948#include <sys/types.h>
3949#include <sys/stat.h>
3950/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3951struct buf { int x; };
3952FILE * (*rcsopen) (struct buf *, struct stat *, int);
3953static char *e (p, i)
3954 char **p;
3955 int i;
3956{
3957 return p[i];
3958}
3959static char *f (char * (*g) (char **, int), char **p, ...)
3960{
3961 char *s;
3962 va_list v;
3963 va_start (v,p);
3964 s = g (p, va_arg (v,int));
3965 va_end (v);
3966 return s;
3967}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003968
3969/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3970 function prototypes and stuff, but not '\xHH' hex character constants.
3971 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003973 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3974 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003976int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3979 inside strings and character constants. */
3980#define FOO(x) 'x'
3981int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3982
Skip Montanaro6dead952003-09-25 14:50:04 +00003983int test (int i, double x);
3984struct s1 {int (*f) (int a);};
3985struct s2 {int (*f) (double a);};
3986int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3987int argc;
3988char **argv;
3989int
3990main ()
3991{
3992return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3993 ;
3994 return 0;
3995}
3996_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3998 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003999do
4000 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004rm -f core conftest.err conftest.$ac_objext
4005 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004006done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004007rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004008CC=$ac_save_CC
4009
4010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011# AC_CACHE_VAL
4012case "x$ac_cv_prog_cc_c89" in
4013 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4015$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4018$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004019 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4022$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004023esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004024if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004025
Matthias Kloseb9621712010-04-24 17:59:49 +00004026fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004027
Martin v. Löwis11437992002-04-12 09:54:03 +00004028ac_ext=c
4029ac_cpp='$CPP $CPPFLAGS'
4030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4032ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004034
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004035
4036
Matthias Kloseb9621712010-04-24 17:59:49 +00004037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4038$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004041if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004043
4044 case $withval in
4045 no) with_cxx_main=no
4046 MAINCC='$(CC)';;
4047 yes) with_cxx_main=yes
4048 MAINCC='$(CXX)';;
4049 *) with_cxx_main=yes
4050 MAINCC=$withval
4051 if test -z "$CXX"
4052 then
4053 CXX=$withval
4054 fi;;
4055 esac
4056else
4057
4058 with_cxx_main=no
4059 MAINCC='$(CC)'
4060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061fi
4062
Matthias Kloseb9621712010-04-24 17:59:49 +00004063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4064$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004065
4066preset_cxx="$CXX"
4067if test -z "$CXX"
4068then
4069 case "$CC" in
4070 gcc) # Extract the first word of "g++", so it can be a program name with args.
4071set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4073$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004074if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004076else
4077 case $CXX in
4078 [\\/]* | ?:[\\/]*)
4079 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4080 ;;
4081 *)
4082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4083for as_dir in notfound
4084do
4085 IFS=$as_save_IFS
4086 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 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 +00004089 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004091 break 2
4092 fi
4093done
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004095IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004096
4097 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4098 ;;
4099esac
4100fi
4101CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004102if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4104$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004105else
Matthias Kloseb9621712010-04-24 17:59:49 +00004106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4107$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004110 ;;
4111 cc) # Extract the first word of "c++", so it can be a program name with args.
4112set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4114$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004115if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117else
4118 case $CXX in
4119 [\\/]* | ?:[\\/]*)
4120 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4121 ;;
4122 *)
4123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4124for as_dir in notfound
4125do
4126 IFS=$as_save_IFS
4127 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129 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 +00004130 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004132 break 2
4133 fi
4134done
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137
4138 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4139 ;;
4140esac
4141fi
4142CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004143if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4145$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004146else
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4148$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004151 ;;
4152 esac
4153 if test "$CXX" = "notfound"
4154 then
4155 CXX=""
4156 fi
4157fi
4158if test -z "$CXX"
4159then
4160 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4161do
4162 # Extract the first word of "$ac_prog", so it can be a program name with args.
4163set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4165$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004166if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004168else
4169 if test -n "$CXX"; then
4170 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4171else
4172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4173for as_dir in $PATH
4174do
4175 IFS=$as_save_IFS
4176 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004178 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 +00004179 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004181 break 2
4182 fi
4183done
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004186
4187fi
4188fi
4189CXX=$ac_cv_prog_CXX
4190if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4192$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004193else
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4195$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004196fi
4197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004199 test -n "$CXX" && break
4200done
4201test -n "$CXX" || CXX="notfound"
4202
4203 if test "$CXX" = "notfound"
4204 then
4205 CXX=""
4206 fi
4207fi
4208if test "$preset_cxx" != "$CXX"
4209then
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004211
4212 By default, distutils will build C++ extension modules with \"$CXX\".
4213 If this is not intended, then set CXX on the configure command line.
4214 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004215$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004216
4217 By default, distutils will build C++ extension modules with \"$CXX\".
4218 If this is not intended, then set CXX on the configure command line.
4219 " >&2;}
4220fi
4221
4222
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4224$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4225save_LDFLAGS="$LDFLAGS"
4226LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004227
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4229/* end confdefs.h. */
4230
4231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
4239if ac_fn_c_try_link "$LINENO"; then :
4240 NO_AS_NEEDED="-Wl,--no-as-needed"
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4242$as_echo "yes" >&6; }
4243else
4244 NO_AS_NEEDED=""
4245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4246$as_echo "no" >&6; }
4247fi
4248rm -f core conftest.err conftest.$ac_objext \
4249 conftest$ac_exeext conftest.$ac_ext
4250LDFLAGS="$save_LDFLAGS"
4251
4252
4253
4254# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004255ac_ext=c
4256ac_cpp='$CPP $CPPFLAGS'
4257ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4258ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4259ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4261$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004262# On Suns, sometimes $CPP names a directory.
4263if test -n "$CPP" && test -d "$CPP"; then
4264 CPP=
4265fi
4266if test -z "$CPP"; then
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004267 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004269else
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 # Double quotes because CPP needs to be expanded
4271 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4272 do
4273 ac_preproc_ok=false
4274for ac_c_preproc_warn_flag in '' yes
4275do
4276 # Use a header file that comes with gcc, so configuring glibc
4277 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004278 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4279 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004280 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004283/* end confdefs.h. */
4284#ifdef __STDC__
4285# include <limits.h>
4286#else
4287# include <assert.h>
4288#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004289 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004291if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004292
Matthias Kloseb9621712010-04-24 17:59:49 +00004293else
Martin v. Löwis11437992002-04-12 09:54:03 +00004294 # Broken: fails on valid input.
4295continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004296fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004297rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004303#include <ac_nonexistent.h>
4304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004305if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # Broken: success on invalid input.
4307continue
4308else
Martin v. Löwis11437992002-04-12 09:54:03 +00004309 # Passes both tests.
4310ac_preproc_ok=:
4311break
4312fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004313rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004314
4315done
4316# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004317rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004318if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004319 break
4320fi
4321
4322 done
4323 ac_cv_prog_CPP=$CPP
4324
4325fi
4326 CPP=$ac_cv_prog_CPP
4327else
4328 ac_cv_prog_CPP=$CPP
4329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4331$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004332ac_preproc_ok=false
4333for ac_c_preproc_warn_flag in '' yes
4334do
4335 # Use a header file that comes with gcc, so configuring glibc
4336 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004337 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4338 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004339 # On the NeXT, cc -E runs the code through the compiler's parser,
4340 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004342/* end confdefs.h. */
4343#ifdef __STDC__
4344# include <limits.h>
4345#else
4346# include <assert.h>
4347#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004348 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004350if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352else
Martin v. Löwis11437992002-04-12 09:54:03 +00004353 # Broken: fails on valid input.
4354continue
4355fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004356rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004362#include <ac_nonexistent.h>
4363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004364if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 # Broken: success on invalid input.
4366continue
4367else
Martin v. Löwis11437992002-04-12 09:54:03 +00004368 # Passes both tests.
4369ac_preproc_ok=:
4370break
4371fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004372rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004373
4374done
4375# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004376rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004377if $ac_preproc_ok; then :
4378
Martin v. Löwis11437992002-04-12 09:54:03 +00004379else
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4381$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004382as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004383See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004384fi
4385
4386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
4391
4392
Matthias Kloseb9621712010-04-24 17:59:49 +00004393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4394$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004395if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004396 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004397else
Matthias Kloseb9621712010-04-24 17:59:49 +00004398 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 # Loop through the user's path and test for each of PROGNAME-LIST
4401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4403do
4404 IFS=$as_save_IFS
4405 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 for ac_prog in grep ggrep; do
4407 for ac_exec_ext in '' $ac_executable_extensions; do
4408 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4409 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4410# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 # Check for GNU $ac_path_GREP
4412case `"$ac_path_GREP" --version 2>&1` in
4413*GNU*)
4414 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4415*)
4416 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004417 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 while :
4419 do
4420 cat "conftest.in" "conftest.in" >"conftest.tmp"
4421 mv "conftest.tmp" "conftest.in"
4422 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4425 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004426 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004427 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4428 # Best one so far, save it but keep looking for a better one
4429 ac_cv_path_GREP="$ac_path_GREP"
4430 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004431 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004432 # 10*(2^10) chars as input seems more than enough
4433 test $ac_count -gt 10 && break
4434 done
4435 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4436esac
4437
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 $ac_path_GREP_found && break 3
4439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004442IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004444 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 +00004445 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446else
4447 ac_cv_path_GREP=$GREP
4448fi
4449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4452$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004453 GREP="$ac_cv_path_GREP"
4454
4455
Matthias Kloseb9621712010-04-24 17:59:49 +00004456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4457$as_echo_n "checking for egrep... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004458if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004459 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460else
4461 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4462 then ac_cv_path_EGREP="$GREP -E"
4463 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004465 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004466 # Loop through the user's path and test for each of PROGNAME-LIST
4467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004468for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4469do
4470 IFS=$as_save_IFS
4471 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 for ac_prog in egrep; do
4473 for ac_exec_ext in '' $ac_executable_extensions; do
4474 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4475 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4476# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004477 # Check for GNU $ac_path_EGREP
4478case `"$ac_path_EGREP" --version 2>&1` in
4479*GNU*)
4480 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4481*)
4482 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004483 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004484 while :
4485 do
4486 cat "conftest.in" "conftest.in" >"conftest.tmp"
4487 mv "conftest.tmp" "conftest.in"
4488 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004490 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4491 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004492 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004493 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4494 # Best one so far, save it but keep looking for a better one
4495 ac_cv_path_EGREP="$ac_path_EGREP"
4496 ac_path_EGREP_max=$ac_count
4497 fi
4498 # 10*(2^10) chars as input seems more than enough
4499 test $ac_count -gt 10 && break
4500 done
4501 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4502esac
4503
Matthias Kloseb9621712010-04-24 17:59:49 +00004504 $ac_path_EGREP_found && break 3
4505 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004506 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004507 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004508IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004509 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004510 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 +00004511 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004512else
4513 ac_cv_path_EGREP=$EGREP
4514fi
4515
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004516 fi
4517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4519$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004520 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004521
4522
Matthias Kloseb9621712010-04-24 17:59:49 +00004523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4524$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004525if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004526 $as_echo_n "(cached) " >&6
4527else
4528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004529/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004530#include <stdlib.h>
4531#include <stdarg.h>
4532#include <string.h>
4533#include <float.h>
4534
4535int
4536main ()
4537{
4538
4539 ;
4540 return 0;
4541}
4542_ACEOF
4543if ac_fn_c_try_compile "$LINENO"; then :
4544 ac_cv_header_stdc=yes
4545else
4546 ac_cv_header_stdc=no
4547fi
4548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4549
4550if test $ac_cv_header_stdc = yes; then
4551 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4553/* end confdefs.h. */
4554#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004555
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004556_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004559
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004560else
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004562fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004563rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004564
Matthias Kloseb9621712010-04-24 17:59:49 +00004565fi
4566
4567if test $ac_cv_header_stdc = yes; then
4568 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4570/* end confdefs.h. */
4571#include <stdlib.h>
4572
4573_ACEOF
4574if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4575 $EGREP "free" >/dev/null 2>&1; then :
4576
4577else
4578 ac_cv_header_stdc=no
4579fi
4580rm -f conftest*
4581
4582fi
4583
4584if test $ac_cv_header_stdc = yes; then
4585 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4586 if test "$cross_compiling" = yes; then :
4587 :
4588else
4589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4590/* end confdefs.h. */
4591#include <ctype.h>
4592#include <stdlib.h>
4593#if ((' ' & 0x0FF) == 0x020)
4594# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4595# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4596#else
4597# define ISLOWER(c) \
4598 (('a' <= (c) && (c) <= 'i') \
4599 || ('j' <= (c) && (c) <= 'r') \
4600 || ('s' <= (c) && (c) <= 'z'))
4601# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4602#endif
4603
4604#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4605int
4606main ()
4607{
4608 int i;
4609 for (i = 0; i < 256; i++)
4610 if (XOR (islower (i), ISLOWER (i))
4611 || toupper (i) != TOUPPER (i))
4612 return 2;
4613 return 0;
4614}
4615_ACEOF
4616if ac_fn_c_try_run "$LINENO"; then :
4617
4618else
4619 ac_cv_header_stdc=no
4620fi
4621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4622 conftest.$ac_objext conftest.beam conftest.$ac_ext
4623fi
4624
4625fi
4626fi
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4628$as_echo "$ac_cv_header_stdc" >&6; }
4629if test $ac_cv_header_stdc = yes; then
4630
4631$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4632
4633fi
4634
4635# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4636for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4637 inttypes.h stdint.h unistd.h
4638do :
4639 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4640ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4641"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004642if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004643 cat >>confdefs.h <<_ACEOF
4644#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4645_ACEOF
4646
4647fi
4648
4649done
4650
4651
4652
4653 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004654if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004655 MINIX=yes
4656else
4657 MINIX=
4658fi
4659
4660
4661 if test "$MINIX" = yes; then
4662
4663$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4664
4665
4666$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4667
4668
4669$as_echo "#define _MINIX 1" >>confdefs.h
4670
4671 fi
4672
4673
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4675$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004676if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004677 $as_echo_n "(cached) " >&6
4678else
4679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680/* end confdefs.h. */
4681
4682# define __EXTENSIONS__ 1
4683 $ac_includes_default
4684int
4685main ()
4686{
4687
4688 ;
4689 return 0;
4690}
4691_ACEOF
4692if ac_fn_c_try_compile "$LINENO"; then :
4693 ac_cv_safe_to_define___extensions__=yes
4694else
4695 ac_cv_safe_to_define___extensions__=no
4696fi
4697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4698fi
4699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4700$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4701 test $ac_cv_safe_to_define___extensions__ = yes &&
4702 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4703
4704 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4705
4706 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4707
4708 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4709
4710 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4711
4712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004714# Check for unsupported systems
4715case $ac_sys_system/$ac_sys_release in
4716atheos*|Linux*/1*)
4717 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4718 echo See README for details.
4719 exit 1;;
4720esac
4721
4722
Matthias Kloseb9621712010-04-24 17:59:49 +00004723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4724$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004725
4726# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004727if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004728 withval=$with_suffix;
4729 case $withval in
4730 no) EXEEXT=;;
4731 yes) EXEEXT=.exe;;
4732 *) EXEEXT=$withval;;
4733 esac
4734fi
4735
Matthias Kloseb9621712010-04-24 17:59:49 +00004736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4737$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738
4739# Test whether we're running on a non-case-sensitive system, in which
4740# case we give a warning if no ext is given
4741
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4743$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744if test ! -d CaseSensitiveTestDir; then
4745mkdir CaseSensitiveTestDir
4746fi
4747
4748if test -d casesensitivetestdir
4749then
Matthias Kloseb9621712010-04-24 17:59:49 +00004750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4751$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004752 BUILDEXEEXT=.exe
4753else
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004756 BUILDEXEEXT=$EXEEXT
4757fi
4758rmdir CaseSensitiveTestDir
4759
4760case $MACHDEP in
4761bsdos*)
4762 case $CC in
4763 gcc) CC="$CC -D_HAVE_BSDI";;
4764 esac;;
4765esac
4766
4767case $ac_sys_system in
4768hp*|HP*)
4769 case $CC in
4770 cc|*/cc) CC="$CC -Ae";;
4771 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772esac
4773
4774
4775
Matthias Kloseb9621712010-04-24 17:59:49 +00004776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4777$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778if test -z "$LIBRARY"
4779then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004780 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4783$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784
4785# LDLIBRARY is the name of the library to link against (as opposed to the
4786# name of the library into which to insert object files). BLDLIBRARY is also
4787# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4788# is blank as the main program is not linked directly against LDLIBRARY.
4789# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4790# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4791# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4792# DLLLIBRARY is the shared (i.e., DLL) library.
4793#
4794# RUNSHARED is used to run shared python without installed libraries
4795#
4796# INSTSONAME is the name of the shared library that will be use to install
4797# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004798#
4799# LDVERSION is the shared library version number, normally the Python version
4800# with the ABI build flags appended.
4801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004802
4803
4804
4805
4806
4807
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809LDLIBRARY="$LIBRARY"
4810BLDLIBRARY='$(LDLIBRARY)'
4811INSTSONAME='$(LDLIBRARY)'
4812DLLLIBRARY=''
4813LDLIBRARYDIR=''
4814RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004815LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004816
4817# LINKCC is the command that links the python executable -- default is $(CC).
4818# If CXX is set, and if it is needed to link a main function that was
4819# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4820# python might then depend on the C++ runtime
4821# This is altered for AIX in order to build the export list before
4822# linking.
4823
Matthias Kloseb9621712010-04-24 17:59:49 +00004824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4825$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004826if test -z "$LINKCC"
4827then
4828 LINKCC='$(PURIFY) $(MAINCC)'
4829 case $ac_sys_system in
4830 AIX*)
4831 exp_extra="\"\""
4832 if test $ac_sys_release -ge 5 -o \
4833 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4834 exp_extra="."
4835 fi
4836 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837 QNX*)
4838 # qcc must be used because the other compilers do not
4839 # support -N.
4840 LINKCC=qcc;;
4841 esac
4842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4844$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845
4846# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4847# make sure we default having it set to "no": this is used by
4848# distutils.unixccompiler to know if it should add --enable-new-dtags
4849# to linker command lines, and failing to detect GNU ld simply results
4850# in the same bahaviour as before.
4851
Matthias Kloseb9621712010-04-24 17:59:49 +00004852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4853$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854ac_prog=ld
4855if test "$GCC" = yes; then
4856 ac_prog=`$CC -print-prog-name=ld`
4857fi
4858case `"$ac_prog" -V 2>&1 < /dev/null` in
4859 *GNU*)
4860 GNULD=yes;;
4861 *)
4862 GNULD=no;;
4863esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4865$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004866
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4868$as_echo_n "checking for inline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004869if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004870 $as_echo_n "(cached) " >&6
4871else
4872 ac_cv_c_inline=no
4873for ac_kw in inline __inline__ __inline; do
4874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4875/* end confdefs.h. */
4876#ifndef __cplusplus
4877typedef int foo_t;
4878static $ac_kw foo_t static_foo () {return 0; }
4879$ac_kw foo_t foo () {return 0; }
4880#endif
4881
4882_ACEOF
4883if ac_fn_c_try_compile "$LINENO"; then :
4884 ac_cv_c_inline=$ac_kw
4885fi
4886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4887 test "$ac_cv_c_inline" != no && break
4888done
4889
4890fi
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4892$as_echo "$ac_cv_c_inline" >&6; }
4893
4894case $ac_cv_c_inline in
4895 inline | yes) ;;
4896 *)
4897 case $ac_cv_c_inline in
4898 no) ac_val=;;
4899 *) ac_val=$ac_cv_c_inline;;
4900 esac
4901 cat >>confdefs.h <<_ACEOF
4902#ifndef __cplusplus
4903#define inline $ac_val
4904#endif
4905_ACEOF
4906 ;;
4907esac
4908
4909if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004910
4911$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004912
4913
4914fi
4915
4916
Matthias Kloseb9621712010-04-24 17:59:49 +00004917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4918$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004920if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004921 enableval=$enable_shared;
4922fi
4923
4924
4925if test -z "$enable_shared"
4926then
4927 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004928 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929 enable_shared="yes";;
4930 *)
4931 enable_shared="no";;
4932 esac
4933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4935$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936
Matthias Kloseb9621712010-04-24 17:59:49 +00004937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4938$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004940if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941 enableval=$enable_profiling; ac_save_cc="$CC"
4942 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004943 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944 ac_enable_profiling="no"
4945else
Matthias Kloseb9621712010-04-24 17:59:49 +00004946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947/* end confdefs.h. */
4948int main() { return 0; }
4949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004950if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ac_enable_profiling="yes"
4952else
Matthias Kloseb9621712010-04-24 17:59:49 +00004953 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4956 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957fi
4958
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959 CC="$ac_save_cc"
4960fi
4961
Matthias Kloseb9621712010-04-24 17:59:49 +00004962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4963$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964
4965case "$ac_enable_profiling" in
4966 "yes")
4967 BASECFLAGS="-pg $BASECFLAGS"
4968 LDFLAGS="-pg $LDFLAGS"
4969 ;;
4970esac
4971
Matthias Kloseb9621712010-04-24 17:59:49 +00004972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4973$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004974
4975# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4976# library that we build, but we do not want to link against it (we
4977# will find it with a -framework option). For this reason there is an
4978# extra variable BLDLIBRARY against which Python and the extension
4979# modules are linked, BLDLIBRARY. This is normally the same as
4980# LDLIBRARY, but empty for MacOSX framework builds.
4981if test "$enable_framework"
4982then
4983 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4984 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4985 BLDLIBRARY=''
4986else
4987 BLDLIBRARY='$(LDLIBRARY)'
4988fi
4989
4990# Other platforms follow
4991if test $enable_shared = "yes"; then
4992
Matthias Kloseb9621712010-04-24 17:59:49 +00004993$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994
4995 case $ac_sys_system in
4996 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004997 LDLIBRARY='libpython$(LDVERSION).dll.a'
4998 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999 ;;
5000 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005001 LDLIBRARY='libpython$(LDVERSION).so'
5002 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5004 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005005 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005006 then
5007 PY3LIBRARY=libpython3.so
5008 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005010 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005011 LDLIBRARY='libpython$(LDVERSION).so'
5012 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005013 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5014 case $ac_sys_system in
5015 FreeBSD*)
5016 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5017 ;;
5018 esac
5019 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005020 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005021 then
5022 PY3LIBRARY=libpython3.so
5023 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024 ;;
5025 hp*|HP*)
5026 case `uname -m` in
5027 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005028 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 ;;
5030 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005031 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032 ;;
5033 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005034 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5036 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005038 LDLIBRARY='libpython$(LDVERSION).dylib'
5039 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5041 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005042 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005043 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005044 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5045 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046
5047 esac
5048else # shared is disabled
5049 case $ac_sys_system in
5050 CYGWIN*)
5051 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005052 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053 ;;
5054 esac
5055fi
5056
Matthias Kloseb9621712010-04-24 17:59:49 +00005057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5058$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059
5060if test -n "$ac_tool_prefix"; then
5061 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5062set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5064$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005065if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005066 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005067else
5068 if test -n "$RANLIB"; then
5069 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5070else
5071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5072for as_dir in $PATH
5073do
5074 IFS=$as_save_IFS
5075 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5078 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080 break 2
5081 fi
5082done
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084IFS=$as_save_IFS
5085
5086fi
5087fi
5088RANLIB=$ac_cv_prog_RANLIB
5089if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5091$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005092else
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095fi
5096
5097
5098fi
5099if test -z "$ac_cv_prog_RANLIB"; then
5100 ac_ct_RANLIB=$RANLIB
5101 # Extract the first word of "ranlib", so it can be a program name with args.
5102set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005105if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107else
5108 if test -n "$ac_ct_RANLIB"; then
5109 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5110else
5111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5112for as_dir in $PATH
5113do
5114 IFS=$as_save_IFS
5115 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005117 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5118 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120 break 2
5121 fi
5122done
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124IFS=$as_save_IFS
5125
5126fi
5127fi
5128ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5129if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5131$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132else
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135fi
5136
5137 if test "x$ac_ct_RANLIB" = x; then
5138 RANLIB=":"
5139 else
5140 case $cross_compiling:$ac_tool_warned in
5141yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144ac_tool_warned=yes ;;
5145esac
5146 RANLIB=$ac_ct_RANLIB
5147 fi
5148else
5149 RANLIB="$ac_cv_prog_RANLIB"
5150fi
5151
5152
5153for ac_prog in ar aal
5154do
5155 # Extract the first word of "$ac_prog", so it can be a program name with args.
5156set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5158$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005159if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005160 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161else
5162 if test -n "$AR"; then
5163 ac_cv_prog_AR="$AR" # Let the user override the test.
5164else
5165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168 IFS=$as_save_IFS
5169 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005170 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5172 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005174 break 2
5175 fi
5176done
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178IFS=$as_save_IFS
5179
5180fi
5181fi
5182AR=$ac_cv_prog_AR
5183if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5185$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186else
Matthias Kloseb9621712010-04-24 17:59:49 +00005187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005189fi
5190
5191
5192 test -n "$AR" && break
5193done
5194test -n "$AR" || AR="ar"
5195
5196
5197# tweak ARFLAGS only if the user didn't set it on the command line
5198
5199if test -z "$ARFLAGS"
5200then
5201 ARFLAGS="rc"
5202fi
5203
5204
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005205DISABLE_ASDLGEN=""
5206# Extract the first word of "python", so it can be a program name with args.
5207set dummy python; ac_word=$2
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5209$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005210if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005211 $as_echo_n "(cached) " >&6
5212else
5213 if test -n "$HAS_PYTHON"; then
5214 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5215else
5216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5217for as_dir in $PATH
5218do
5219 IFS=$as_save_IFS
5220 test -z "$as_dir" && as_dir=.
5221 for ac_exec_ext in '' $ac_executable_extensions; do
5222 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5223 ac_cv_prog_HAS_PYTHON="found"
5224 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5225 break 2
5226 fi
5227done
5228 done
5229IFS=$as_save_IFS
5230
5231 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5232fi
5233fi
5234HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5235if test -n "$HAS_PYTHON"; then
5236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5237$as_echo "$HAS_PYTHON" >&6; }
5238else
5239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5240$as_echo "no" >&6; }
5241fi
5242
5243
5244if test $HAS_HG != found -o $HAS_PYTHON != found
5245then
5246 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5247fi
5248
5249
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005250case $MACHDEP in
5251bsdos*|hp*|HP*)
5252 # install -d does not work on BSDI or HP-UX
5253 if test -z "$INSTALL"
5254 then
5255 INSTALL="${srcdir}/install-sh -c"
5256 fi
5257esac
5258ac_aux_dir=
5259for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005260 if test -f "$ac_dir/install-sh"; then
5261 ac_aux_dir=$ac_dir
5262 ac_install_sh="$ac_aux_dir/install-sh -c"
5263 break
5264 elif test -f "$ac_dir/install.sh"; then
5265 ac_aux_dir=$ac_dir
5266 ac_install_sh="$ac_aux_dir/install.sh -c"
5267 break
5268 elif test -f "$ac_dir/shtool"; then
5269 ac_aux_dir=$ac_dir
5270 ac_install_sh="$ac_aux_dir/shtool install -c"
5271 break
5272 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273done
5274if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005275 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276fi
5277
5278# These three variables are undocumented and unsupported,
5279# and are intended to be withdrawn in a future Autoconf release.
5280# They can cause serious problems if a builder's source tree is in a directory
5281# whose full name contains unusual characters.
5282ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5283ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5284ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5285
5286
5287# Find a good install program. We prefer a C program (faster),
5288# so one script is as good as another. But avoid the broken or
5289# incompatible versions:
5290# SysV /etc/install, /usr/sbin/install
5291# SunOS /usr/etc/install
5292# IRIX /sbin/install
5293# AIX /bin/install
5294# AmigaOS /C/install, which installs bootblocks on floppy discs
5295# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5296# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5297# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5298# OS/2's system install, which has a completely different semantic
5299# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005300# Reject install programs that cannot install multiple files.
5301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5302$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303if test -z "$INSTALL"; then
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005304if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005305 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306else
5307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5308for as_dir in $PATH
5309do
5310 IFS=$as_save_IFS
5311 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005312 # Account for people who put trailing slashes in PATH elements.
5313case $as_dir/ in #((
5314 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005316 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317 /usr/ucb/* ) ;;
5318 *)
5319 # OSF1 and SCO ODT 3.0 have their own names for install.
5320 # Don't use installbsd from OSF since it installs stuff as root
5321 # by default.
5322 for ac_prog in ginstall scoinst install; do
5323 for ac_exec_ext in '' $ac_executable_extensions; do
5324 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5325 if test $ac_prog = install &&
5326 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5327 # AIX install. It has an incompatible calling convention.
5328 :
5329 elif test $ac_prog = install &&
5330 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5331 # program-specific install script used by HP pwplus--don't use.
5332 :
5333 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005334 rm -rf conftest.one conftest.two conftest.dir
5335 echo one > conftest.one
5336 echo two > conftest.two
5337 mkdir conftest.dir
5338 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5339 test -s conftest.one && test -s conftest.two &&
5340 test -s conftest.dir/conftest.one &&
5341 test -s conftest.dir/conftest.two
5342 then
5343 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5344 break 3
5345 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005346 fi
5347 fi
5348 done
5349 done
5350 ;;
5351esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005352
5353 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005354IFS=$as_save_IFS
5355
Matthias Kloseb9621712010-04-24 17:59:49 +00005356rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005357
5358fi
5359 if test "${ac_cv_path_install+set}" = set; then
5360 INSTALL=$ac_cv_path_install
5361 else
5362 # As a last resort, use the slow shell script. Don't cache a
5363 # value for INSTALL within a source directory, because that will
5364 # break other packages using the cache if that directory is
5365 # removed, or if the value is a relative name.
5366 INSTALL=$ac_install_sh
5367 fi
5368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5370$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371
5372# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5373# It thinks the first close brace ends the variable substitution.
5374test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5375
5376test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5377
5378test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5379
5380
5381# Not every filesystem supports hard links
5382
5383if test -z "$LN" ; then
5384 case $ac_sys_system in
5385 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386 *) LN=ln;;
5387 esac
5388fi
5389
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005390# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005391
5392ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005393
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5396$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397
5398# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005399if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005400 withval=$with_pydebug;
5401if test "$withval" != no
5402then
5403
Matthias Kloseb9621712010-04-24 17:59:49 +00005404$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5407$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005409 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005410else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412fi
5413else
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005416fi
5417
5418
5419# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5420# merged with this chunk of code?
5421
5422# Optimizer/debugger flags
5423# ------------------------
5424# (The following bit of code is complicated enough - please keep things
5425# indented properly. Just pretend you're editing Python code. ;-)
5426
5427# There are two parallel sets of case statements below, one that checks to
5428# see if OPT was set and one that does BASECFLAGS setting based upon
5429# compiler and platform. BASECFLAGS tweaks need to be made even if the
5430# user set OPT.
5431
5432# tweak OPT based on compiler and platform, only if the user didn't set
5433# it on the command line
5434
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005435if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436then
5437 case $GCC in
5438 yes)
5439 if test "$CC" != 'g++' ; then
5440 STRICT_PROTO="-Wstrict-prototypes"
5441 fi
5442 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5443 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5444 WRAP="-fwrapv"
5445 fi
5446 case $ac_cv_prog_cc_g in
5447 yes)
5448 if test "$Py_DEBUG" = 'true' ; then
5449 # Optimization messes up debuggers, so turn it off for
5450 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005451 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005452 else
5453 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5454 fi
5455 ;;
5456 *)
5457 OPT="-O3 -Wall $STRICT_PROTO"
5458 ;;
5459 esac
5460 case $ac_sys_system in
5461 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5462 ;;
5463 esac
5464 ;;
5465
5466 *)
5467 OPT="-O"
5468 ;;
5469 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470fi
5471
5472
5473
5474# The -arch flags for universal builds on OSX
5475UNIVERSAL_ARCH_FLAGS=
5476
5477
5478# tweak BASECFLAGS based on compiler and platform
5479case $GCC in
5480yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005481 # Python doesn't violate C99 aliasing rules, but older versions of
5482 # GCC produce warnings for legal Python code. Enable
5483 # -fno-strict-aliasing on versions of GCC that support but produce
5484 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5486$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487 ac_save_cc="$CC"
5488 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005489 save_CFLAGS="$CFLAGS"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005490 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005492else
Matthias Kloseb9621712010-04-24 17:59:49 +00005493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005495
Matthias Kloseb159a552010-04-25 21:00:44 +00005496
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005497int
5498main ()
5499{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005500
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005501 ;
5502 return 0;
5503}
Matthias Kloseb159a552010-04-25 21:00:44 +00005504
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005506if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005507
5508 CC="$ac_save_cc -fstrict-aliasing"
5509 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005511/* end confdefs.h. */
5512
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005513 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005514int
5515main ()
5516{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005517double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005518 ;
5519 return 0;
5520}
Matthias Kloseb159a552010-04-25 21:00:44 +00005521
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005523if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005524
5525 ac_cv_no_strict_aliasing=no
5526
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527else
Matthias Kloseb159a552010-04-25 21:00:44 +00005528
5529 ac_cv_no_strict_aliasing=yes
5530
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005531fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005533
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005534else
Matthias Kloseb159a552010-04-25 21:00:44 +00005535
5536 ac_cv_no_strict_aliasing=no
5537
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005540fi
5541
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005542 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5545$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005546 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547 then
5548 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5549 fi
5550
5551 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5552 # support. Without this, treatment of subnormals doesn't follow
5553 # the standard.
5554 case $ac_sys_machine in
5555 alpha*)
5556 BASECFLAGS="$BASECFLAGS -mieee"
5557 ;;
5558 esac
5559
5560 case $ac_sys_system in
5561 SCO_SV*)
5562 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5563 ;;
5564 # is there any other compiler on Darwin besides gcc?
5565 Darwin*)
5566 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5567 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005568 if test "${CC}" = gcc
5569 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5571$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005572 case "${UNIVERSALSDK}" in
5573 */MacOSX10.4u.sdk)
5574 # Build using 10.4 SDK, force usage of gcc when the
5575 # compiler is gcc, otherwise the user will get very
5576 # confusing error messages when building on OSX 10.6
5577 CC=gcc-4.0
5578 CPP=cpp-4.0
5579 ;;
5580 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5582$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005583 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005584
5585
5586 if test "${enable_universalsdk}"; then
5587 UNIVERSAL_ARCH_FLAGS=""
5588 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5589 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5590 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005591 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5593 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005594 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005595 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596
5597 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5598 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005599 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005600 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005602 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5603 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005604 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005605 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005606
5607 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5608 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005609 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005610 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005613 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 +00005614
5615 fi
5616
5617
Ronald Oussoren666028b2010-04-18 19:07:43 +00005618 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5619 if test "${UNIVERSALSDK}" != "/"
5620 then
5621 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5622 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005623 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 fi
5625 fi
5626
5627 # Calculate the right deployment target for this build.
5628 #
5629 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5630 if test ${cur_target} '>' 10.2; then
5631 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005632 if test ${enable_universalsdk}; then
5633 if test "${UNIVERSAL_ARCHS}" = "all"; then
5634 # Ensure that the default platform for a
5635 # 4-way universal build is OSX 10.5,
5636 # that's the first OS release where
5637 # 4-way builds make sense.
5638 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005639
5640 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5641 cur_target='10.5'
5642
5643 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5644 cur_target='10.5'
5645
5646 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5647 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005648 fi
5649 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005650 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005651 # On Intel macs default to a deployment
5652 # target of 10.4, that's the first OSX
5653 # release with Intel support.
5654 cur_target="10.4"
5655 fi
5656 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657 fi
5658 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5659
5660 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5661 # environment with a value that is the same as what we'll use
5662 # in the Makefile to ensure that we'll get the same compiler
5663 # environment during configure and build time.
5664 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5665 export MACOSX_DEPLOYMENT_TARGET
5666 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5667
5668 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 esac
5670 ;;
5671
5672*)
5673 case $ac_sys_system in
5674 OpenUNIX*|UnixWare*)
5675 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5676 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677 SCO_SV*)
5678 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5679 ;;
5680 esac
5681 ;;
5682esac
5683
5684if test "$Py_DEBUG" = 'true'; then
5685 :
5686else
5687 OPT="-DNDEBUG $OPT"
5688fi
5689
5690if test "$ac_arch_flags"
5691then
5692 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5693fi
5694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695# Check whether GCC supports PyArg_ParseTuple format
5696if test "$GCC" = "yes"
5697then
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5699$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 save_CFLAGS=$CFLAGS
5701 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703/* end confdefs.h. */
5704
5705 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706int
5707main ()
5708{
5709
5710 ;
5711 return 0;
5712}
Matthias Kloseb159a552010-04-25 21:00:44 +00005713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005715if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
Matthias Kloseb159a552010-04-25 21:00:44 +00005717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719
Matthias Kloseb159a552010-04-25 21:00:44 +00005720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005721$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723else
Matthias Kloseb159a552010-04-25 21:00:44 +00005724
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005726$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5730 CFLAGS=$save_CFLAGS
5731fi
5732
5733# On some compilers, pthreads are available without further options
5734# (e.g. MacOS X). On some of these systems, the compiler will not
5735# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5736# So we have to see first whether pthreads are available without
5737# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5739$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005740if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742else
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744 ac_cv_pthread_is_default=no
5745else
Matthias Kloseb9621712010-04-24 17:59:49 +00005746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747/* end confdefs.h. */
5748
5749#include <pthread.h>
5750
5751void* routine(void* p){return NULL;}
5752
5753int main(){
5754 pthread_t p;
5755 if(pthread_create(&p,NULL,routine,NULL)!=0)
5756 return 1;
5757 (void)pthread_detach(p);
5758 return 0;
5759}
5760
5761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005762if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763
5764 ac_cv_pthread_is_default=yes
5765 ac_cv_kthread=no
5766 ac_cv_pthread=no
5767
5768else
Matthias Kloseb9621712010-04-24 17:59:49 +00005769 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773fi
5774
5775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776fi
5777
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5779$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
5781
5782if test $ac_cv_pthread_is_default = yes
5783then
5784 ac_cv_kpthread=no
5785else
5786# -Kpthread, if available, provides the right #defines
5787# and linker options to make pthread_create available
5788# Some compilers won't report that they do not support -Kpthread,
5789# so we need to run a program to see whether it really made the
5790# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5792$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005793if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795else
5796 ac_save_cc="$CC"
5797CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005798if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 ac_cv_kpthread=no
5800else
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802/* end confdefs.h. */
5803
5804#include <pthread.h>
5805
5806void* routine(void* p){return NULL;}
5807
5808int main(){
5809 pthread_t p;
5810 if(pthread_create(&p,NULL,routine,NULL)!=0)
5811 return 1;
5812 (void)pthread_detach(p);
5813 return 0;
5814}
5815
5816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005817if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 ac_cv_kpthread=yes
5819else
Matthias Kloseb9621712010-04-24 17:59:49 +00005820 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824fi
5825
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826CC="$ac_save_cc"
5827fi
5828
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5830$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831fi
5832
5833if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5834then
5835# -Kthread, if available, provides the right #defines
5836# and linker options to make pthread_create available
5837# Some compilers won't report that they do not support -Kthread,
5838# so we need to run a program to see whether it really made the
5839# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5841$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005842if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005843 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844else
5845 ac_save_cc="$CC"
5846CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005847if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848 ac_cv_kthread=no
5849else
Matthias Kloseb9621712010-04-24 17:59:49 +00005850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851/* end confdefs.h. */
5852
5853#include <pthread.h>
5854
5855void* routine(void* p){return NULL;}
5856
5857int main(){
5858 pthread_t p;
5859 if(pthread_create(&p,NULL,routine,NULL)!=0)
5860 return 1;
5861 (void)pthread_detach(p);
5862 return 0;
5863}
5864
5865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005866if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867 ac_cv_kthread=yes
5868else
Matthias Kloseb9621712010-04-24 17:59:49 +00005869 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873fi
5874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875CC="$ac_save_cc"
5876fi
5877
Matthias Kloseb9621712010-04-24 17:59:49 +00005878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5879$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
5881
5882if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5883then
5884# -pthread, if available, provides the right #defines
5885# and linker options to make pthread_create available
5886# Some compilers won't report that they do not support -pthread,
5887# so we need to run a program to see whether it really made the
5888# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5890$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005891if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005892 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893else
5894 ac_save_cc="$CC"
5895CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005896if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ac_cv_pthread=no
5898else
Matthias Kloseb9621712010-04-24 17:59:49 +00005899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900/* end confdefs.h. */
5901
5902#include <pthread.h>
5903
5904void* routine(void* p){return NULL;}
5905
5906int main(){
5907 pthread_t p;
5908 if(pthread_create(&p,NULL,routine,NULL)!=0)
5909 return 1;
5910 (void)pthread_detach(p);
5911 return 0;
5912}
5913
5914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005915if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ac_cv_pthread=yes
5917else
Matthias Kloseb9621712010-04-24 17:59:49 +00005918 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922fi
5923
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924CC="$ac_save_cc"
5925fi
5926
Matthias Kloseb9621712010-04-24 17:59:49 +00005927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5928$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929fi
5930
5931# If we have set a CC compiler flag for thread support then
5932# check if it works for CXX, too.
5933ac_cv_cxx_thread=no
5934if test ! -z "$CXX"
5935then
Matthias Kloseb9621712010-04-24 17:59:49 +00005936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5937$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938ac_save_cxx="$CXX"
5939
5940if test "$ac_cv_kpthread" = "yes"
5941then
5942 CXX="$CXX -Kpthread"
5943 ac_cv_cxx_thread=yes
5944elif test "$ac_cv_kthread" = "yes"
5945then
5946 CXX="$CXX -Kthread"
5947 ac_cv_cxx_thread=yes
5948elif test "$ac_cv_pthread" = "yes"
5949then
5950 CXX="$CXX -pthread"
5951 ac_cv_cxx_thread=yes
5952fi
5953
5954if test $ac_cv_cxx_thread = yes
5955then
5956 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5957 $CXX -c conftest.$ac_ext 2>&5
5958 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5959 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5960 then
5961 ac_cv_cxx_thread=yes
5962 else
5963 ac_cv_cxx_thread=no
5964 fi
5965 rm -fr conftest*
5966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5968$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969fi
5970CXX="$ac_save_cxx"
5971
5972
5973# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5975$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005976if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978else
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980/* end confdefs.h. */
5981#include <stdlib.h>
5982#include <stdarg.h>
5983#include <string.h>
5984#include <float.h>
5985
5986int
5987main ()
5988{
5989
5990 ;
5991 return 0;
5992}
5993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005994if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995 ac_cv_header_stdc=yes
5996else
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6000
6001if test $ac_cv_header_stdc = yes; then
6002 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004/* end confdefs.h. */
6005#include <string.h>
6006
6007_ACEOF
6008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 $EGREP "memchr" >/dev/null 2>&1; then :
6010
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011else
6012 ac_cv_header_stdc=no
6013fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006014rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015
6016fi
6017
6018if test $ac_cv_header_stdc = yes; then
6019 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021/* end confdefs.h. */
6022#include <stdlib.h>
6023
6024_ACEOF
6025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 $EGREP "free" >/dev/null 2>&1; then :
6027
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028else
6029 ac_cv_header_stdc=no
6030fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006031rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032
6033fi
6034
6035if test $ac_cv_header_stdc = yes; then
6036 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038 :
6039else
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041/* end confdefs.h. */
6042#include <ctype.h>
6043#include <stdlib.h>
6044#if ((' ' & 0x0FF) == 0x020)
6045# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6046# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6047#else
6048# define ISLOWER(c) \
6049 (('a' <= (c) && (c) <= 'i') \
6050 || ('j' <= (c) && (c) <= 'r') \
6051 || ('s' <= (c) && (c) <= 'z'))
6052# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6053#endif
6054
6055#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6056int
6057main ()
6058{
6059 int i;
6060 for (i = 0; i < 256; i++)
6061 if (XOR (islower (i), ISLOWER (i))
6062 || toupper (i) != TOUPPER (i))
6063 return 2;
6064 return 0;
6065}
6066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006067if ac_fn_c_try_run "$LINENO"; then :
6068
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069else
Matthias Kloseb9621712010-04-24 17:59:49 +00006070 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6073 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074fi
6075
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076fi
6077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6079$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080if test $ac_cv_header_stdc = yes; then
6081
Matthias Kloseb9621712010-04-24 17:59:49 +00006082$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083
6084fi
6085
Benjamin Peterson799bd802011-08-31 22:15:17 -04006086for ac_header in asm/types.h attr/xattr.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006087fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006088ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006089sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006090unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006091sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6092sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006093sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6094sys/stat.h sys/termio.h sys/time.h \
6095sys/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 -07006096libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006097bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006098do :
6099 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6100ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006101if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006102 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006103#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006104_ACEOF
6105
6106fi
6107
Guido van Rossum627b2d71993-12-24 10:39:16 +00006108done
6109
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006110ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006111for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006112 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6114$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006115if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006117else
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006119/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006120#include <sys/types.h>
6121#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006122
Martin v. Löwis11437992002-04-12 09:54:03 +00006123int
6124main ()
6125{
6126if ((DIR *) 0)
6127return 0;
6128 ;
6129 return 0;
6130}
6131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006132if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006133 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006134else
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006139eval ac_res=\$$as_ac_Header
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6141$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006142if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006143 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006144#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006145_ACEOF
6146
6147ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006148fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006150done
6151# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6152if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6154$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006155if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006157else
Martin v. Löwis11437992002-04-12 09:54:03 +00006158 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162/* Override any GCC internal prototype to avoid an error.
6163 Use char because int might match the return type of a GCC
6164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006165#ifdef __cplusplus
6166extern "C"
6167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006168char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006169int
6170main ()
6171{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006173 ;
6174 return 0;
6175}
6176_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177for ac_lib in '' dir; do
6178 if test -z "$ac_lib"; then
6179 ac_res="none required"
6180 else
6181 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006182 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006185 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006187rm -f core conftest.err conftest.$ac_objext \
6188 conftest$ac_exeext
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006189 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192done
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006193if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195else
6196 ac_cv_search_opendir=no
6197fi
6198rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006199LIBS=$ac_func_search_save_LIBS
6200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6202$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006204if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006206
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006208
Michael W. Hudson54241132001-12-07 15:38:26 +00006209else
Matthias Kloseb9621712010-04-24 17:59:49 +00006210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6211$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006212if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006214else
6215 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006219/* Override any GCC internal prototype to avoid an error.
6220 Use char because int might match the return type of a GCC
6221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006222#ifdef __cplusplus
6223extern "C"
6224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006225char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006226int
6227main ()
6228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006229return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006230 ;
6231 return 0;
6232}
6233_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234for ac_lib in '' x; do
6235 if test -z "$ac_lib"; then
6236 ac_res="none required"
6237 else
6238 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006239 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006241 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006242 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006244rm -f core conftest.err conftest.$ac_objext \
6245 conftest$ac_exeext
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006246 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006247 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249done
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006250if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006252else
6253 ac_cv_search_opendir=no
6254fi
6255rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006256LIBS=$ac_func_search_save_LIBS
6257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6259$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006261if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006262 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006263
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006264fi
6265
6266fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006267
Matthias Kloseb9621712010-04-24 17:59:49 +00006268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6269$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006270if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006271 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272else
Matthias Kloseb9621712010-04-24 17:59:49 +00006273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006274/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276int
6277main ()
6278{
6279return makedev(0, 0);
6280 ;
6281 return 0;
6282}
6283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285 ac_cv_header_sys_types_h_makedev=yes
6286else
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006289rm -f core conftest.err conftest.$ac_objext \
6290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291
6292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6294$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295
6296if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006297ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006298if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006299
Matthias Kloseb9621712010-04-24 17:59:49 +00006300$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301
6302fi
6303
6304
6305
6306 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006307 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006308if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006309
Matthias Kloseb9621712010-04-24 17:59:49 +00006310$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006311
6312fi
6313
6314
6315 fi
6316fi
6317
Michael W. Hudson54241132001-12-07 15:38:26 +00006318
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006319# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6320for ac_header in net/if.h
6321do :
6322 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6323#ifdef STDC_HEADERS
6324# include <stdlib.h>
6325# include <stddef.h>
6326#else
6327# ifdef HAVE_STDLIB_H
6328# include <stdlib.h>
6329# endif
6330#endif
6331#ifdef HAVE_SYS_SOCKET_H
6332# include <sys/socket.h>
6333#endif
6334
6335"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006336if test "x$ac_cv_header_net_if_h" = x""yes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006337 cat >>confdefs.h <<_ACEOF
6338#define HAVE_NET_IF_H 1
6339_ACEOF
6340
6341fi
6342
6343done
6344
6345
6346
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006347# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006348for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006349do :
6350 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006351#ifdef HAVE_CURSES_H
6352#include <curses.h>
6353#endif
6354
Matthias Kloseb9621712010-04-24 17:59:49 +00006355"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006356if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006357 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006358#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006359_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006361fi
6362
6363done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006364
6365
Martin v. Löwis11017b12006-01-14 18:12:57 +00006366# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006367for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006368do :
6369 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 +00006370#ifdef HAVE_ASM_TYPES_H
6371#include <asm/types.h>
6372#endif
6373#ifdef HAVE_SYS_SOCKET_H
6374#include <sys/socket.h>
6375#endif
6376
Matthias Kloseb9621712010-04-24 17:59:49 +00006377"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006378if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006379 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006380#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006381_ACEOF
6382
6383fi
6384
6385done
6386
6387
Guido van Rossum627b2d71993-12-24 10:39:16 +00006388# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006389was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6391$as_echo_n "checking for clock_t in time.h... " >&6; }
6392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006393/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006394#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006395
6396_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006397if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006398 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006399 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006400else
Martin v. Löwis11437992002-04-12 09:54:03 +00006401
6402
Matthias Kloseb9621712010-04-24 17:59:49 +00006403$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006404
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006405
Guido van Rossum627b2d71993-12-24 10:39:16 +00006406fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006407rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006408
Matthias Kloseb9621712010-04-24 17:59:49 +00006409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6410$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006411
Matthias Kloseb9621712010-04-24 17:59:49 +00006412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6413$as_echo_n "checking for makedev... " >&6; }
6414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006415/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006416
Jesus Cea740f53a2010-04-28 11:35:30 +00006417#if defined(MAJOR_IN_MKDEV)
6418#include <sys/mkdev.h>
6419#elif defined(MAJOR_IN_SYSMACROS)
6420#include <sys/sysmacros.h>
6421#else
6422#include <sys/types.h>
6423#endif
6424
Neal Norwitz11690112002-07-30 01:08:28 +00006425int
6426main ()
6427{
Jesus Cea740f53a2010-04-28 11:35:30 +00006428
6429 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006430 ;
6431 return 0;
6432}
Matthias Kloseb159a552010-04-25 21:00:44 +00006433
Neal Norwitz11690112002-07-30 01:08:28 +00006434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006435if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006436 ac_cv_has_makedev=yes
6437else
Matthias Kloseb9621712010-04-24 17:59:49 +00006438 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006440rm -f core conftest.err conftest.$ac_objext \
6441 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6443$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006444if test "$ac_cv_has_makedev" = "yes"; then
6445
Matthias Kloseb9621712010-04-24 17:59:49 +00006446$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006447
6448fi
6449
Martin v. Löwis399a6892002-10-04 10:22:02 +00006450# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6451# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6452# defined, but the compiler does not support pragma redefine_extname,
6453# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6454# structures (such as rlimit64) without declaring them. As a
6455# work-around, disable LFS on such configurations
6456
6457use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6459$as_echo_n "checking Solaris LFS bug... " >&6; }
6460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006461/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006462
6463#define _LARGEFILE_SOURCE 1
6464#define _FILE_OFFSET_BITS 64
6465#include <sys/resource.h>
6466
Martin v. Löwis399a6892002-10-04 10:22:02 +00006467int
6468main ()
6469{
6470struct rlimit foo;
6471 ;
6472 return 0;
6473}
6474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006476 sol_lfs_bug=no
6477else
Matthias Kloseb9621712010-04-24 17:59:49 +00006478 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6482$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006483if test "$sol_lfs_bug" = "yes"; then
6484 use_lfs=no
6485fi
6486
6487if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006488# Two defines needed to enable largefile support on various platforms
6489# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006490case $ac_sys_system/$ac_sys_release in
6491AIX*)
6492
6493$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6494
6495 ;;
6496esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006497
Matthias Kloseb9621712010-04-24 17:59:49 +00006498$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006499
6500
Matthias Kloseb9621712010-04-24 17:59:49 +00006501$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006502
Martin v. Löwis399a6892002-10-04 10:22:02 +00006503fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006504
Guido van Rossum84e7b241996-08-19 21:59:00 +00006505# Add some code to confdefs.h so that the test for off_t works on SCO
6506cat >> confdefs.h <<\EOF
6507#if defined(SCO_DS)
6508#undef _OFF_T
6509#endif
6510EOF
6511
Guido van Rossumef2255b2000-03-10 22:30:29 +00006512# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006513ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006514if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006515
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516else
Martin v. Löwis11437992002-04-12 09:54:03 +00006517
6518cat >>confdefs.h <<_ACEOF
6519#define mode_t int
6520_ACEOF
6521
6522fi
6523
Matthias Kloseb9621712010-04-24 17:59:49 +00006524ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006525if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006526
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006527else
Martin v. Löwis11437992002-04-12 09:54:03 +00006528
6529cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006530#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006531_ACEOF
6532
6533fi
6534
Matthias Kloseb9621712010-04-24 17:59:49 +00006535ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006536if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006537
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006538else
Martin v. Löwis11437992002-04-12 09:54:03 +00006539
6540cat >>confdefs.h <<_ACEOF
6541#define pid_t int
6542_ACEOF
6543
6544fi
6545
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006546
Martin v. Löwis11437992002-04-12 09:54:03 +00006547cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006548#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006550
Matthias Kloseb9621712010-04-24 17:59:49 +00006551ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006552if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006553
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006554else
Martin v. Löwis11437992002-04-12 09:54:03 +00006555
6556cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006557#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006558_ACEOF
6559
6560fi
6561
Matthias Kloseb9621712010-04-24 17:59:49 +00006562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6563$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006564if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006565 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006566else
Matthias Kloseb9621712010-04-24 17:59:49 +00006567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006568/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006569#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006570
6571_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006574 ac_cv_type_uid_t=yes
6575else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006576 ac_cv_type_uid_t=no
6577fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006578rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006579
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6582$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006583if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006584
Matthias Kloseb9621712010-04-24 17:59:49 +00006585$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006586
6587
Matthias Kloseb9621712010-04-24 17:59:49 +00006588$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006589
6590fi
6591
Matthias Kloseb9621712010-04-24 17:59:49 +00006592ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6593case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006594 no|yes) ;; #(
6595 *)
6596
Matthias Kloseb9621712010-04-24 17:59:49 +00006597$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006598
6599
6600cat >>confdefs.h <<_ACEOF
6601#define uint32_t $ac_cv_c_uint32_t
6602_ACEOF
6603;;
6604 esac
6605
Matthias Kloseb9621712010-04-24 17:59:49 +00006606ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6607case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006608 no|yes) ;; #(
6609 *)
6610
Matthias Kloseb9621712010-04-24 17:59:49 +00006611$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006612
6613
6614cat >>confdefs.h <<_ACEOF
6615#define uint64_t $ac_cv_c_uint64_t
6616_ACEOF
6617;;
6618 esac
6619
Matthias Kloseb9621712010-04-24 17:59:49 +00006620ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6621case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006622 no|yes) ;; #(
6623 *)
6624
6625cat >>confdefs.h <<_ACEOF
6626#define int32_t $ac_cv_c_int32_t
6627_ACEOF
6628;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006629esac
6630
Matthias Kloseb9621712010-04-24 17:59:49 +00006631ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6632case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006633 no|yes) ;; #(
6634 *)
6635
6636cat >>confdefs.h <<_ACEOF
6637#define int64_t $ac_cv_c_int64_t
6638_ACEOF
6639;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006640esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006641
Matthias Kloseb9621712010-04-24 17:59:49 +00006642ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006643if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006644
Matthias Kloseb9621712010-04-24 17:59:49 +00006645$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006646
6647fi
6648
Jack Jansendd19cf82001-12-06 22:36:17 +00006649
Michael W. Hudson54241132001-12-07 15:38:26 +00006650# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006651# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006652# The cast to long int works around a bug in the HP C Compiler
6653# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6654# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6655# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6657$as_echo_n "checking size of int... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006658if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006659 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006660else
Matthias Kloseb9621712010-04-24 17:59:49 +00006661 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 +00006662
Martin v. Löwis11437992002-04-12 09:54:03 +00006663else
Matthias Kloseb9621712010-04-24 17:59:49 +00006664 if test "$ac_cv_type_int" = yes; then
6665 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006667as_fn_error 77 "cannot compute sizeof (int)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006668See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006669 else
6670 ac_cv_sizeof_int=0
6671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006673
Martin v. Löwis11437992002-04-12 09:54:03 +00006674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6676$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006677
6678
6679
Martin v. Löwis11437992002-04-12 09:54:03 +00006680cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006681#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006682_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006683
6684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006685# The cast to long int works around a bug in the HP C Compiler
6686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6688# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6690$as_echo_n "checking size of long... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006691if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006693else
Matthias Kloseb9621712010-04-24 17:59:49 +00006694 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 +00006695
Martin v. Löwis11437992002-04-12 09:54:03 +00006696else
Matthias Kloseb9621712010-04-24 17:59:49 +00006697 if test "$ac_cv_type_long" = yes; then
6698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006700as_fn_error 77 "cannot compute sizeof (long)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006701See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006702 else
6703 ac_cv_sizeof_long=0
6704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006706
Martin v. Löwis11437992002-04-12 09:54:03 +00006707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6709$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006710
6711
6712
Martin v. Löwis11437992002-04-12 09:54:03 +00006713cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006714#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006715_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006716
6717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006718# The cast to long int works around a bug in the HP C Compiler
6719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6721# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6723$as_echo_n "checking size of void *... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006724if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006726else
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 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 +00006728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729else
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 if test "$ac_cv_type_void_p" = yes; then
6731 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006733as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006734See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006735 else
6736 ac_cv_sizeof_void_p=0
6737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6742$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006743
6744
6745
Martin v. Löwis11437992002-04-12 09:54:03 +00006746cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006747#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006748_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006749
6750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006751# The cast to long int works around a bug in the HP C Compiler
6752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6754# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6756$as_echo_n "checking size of short... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006757if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006759else
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 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 +00006761
Martin v. Löwis11437992002-04-12 09:54:03 +00006762else
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 if test "$ac_cv_type_short" = yes; then
6764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006766as_fn_error 77 "cannot compute sizeof (short)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006767See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006768 else
6769 ac_cv_sizeof_short=0
6770 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6775$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006776
6777
6778
Martin v. Löwis11437992002-04-12 09:54:03 +00006779cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006780#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006781_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006782
6783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006784# The cast to long int works around a bug in the HP C Compiler
6785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6787# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6789$as_echo_n "checking size of float... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006790if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006792else
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 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 +00006794
Martin v. Löwis11437992002-04-12 09:54:03 +00006795else
Matthias Kloseb9621712010-04-24 17:59:49 +00006796 if test "$ac_cv_type_float" = yes; then
6797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006799as_fn_error 77 "cannot compute sizeof (float)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006800See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006801 else
6802 ac_cv_sizeof_float=0
6803 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006805
Martin v. Löwis11437992002-04-12 09:54:03 +00006806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6808$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006809
6810
6811
Martin v. Löwis11437992002-04-12 09:54:03 +00006812cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006813#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006814_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006815
6816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006817# The cast to long int works around a bug in the HP C Compiler
6818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6822$as_echo_n "checking size of double... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006823if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006824 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006825else
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 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 +00006827
Martin v. Löwis11437992002-04-12 09:54:03 +00006828else
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 if test "$ac_cv_type_double" = yes; then
6830 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006832as_fn_error 77 "cannot compute sizeof (double)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006833See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006834 else
6835 ac_cv_sizeof_double=0
6836 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006838
Martin v. Löwis11437992002-04-12 09:54:03 +00006839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6841$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006842
6843
6844
Martin v. Löwis11437992002-04-12 09:54:03 +00006845cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006846#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006847_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006848
6849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006850# The cast to long int works around a bug in the HP C Compiler
6851# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6852# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6853# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6855$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006856if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006858else
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 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 +00006860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861else
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 if test "$ac_cv_type_fpos_t" = yes; then
6863 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6864$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006865as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006866See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867 else
6868 ac_cv_sizeof_fpos_t=0
6869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006871
Martin v. Löwis11437992002-04-12 09:54:03 +00006872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6874$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875
6876
6877
Martin v. Löwis11437992002-04-12 09:54:03 +00006878cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006879#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006880_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006881
Michael W. Hudson54241132001-12-07 15:38:26 +00006882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883# The cast to long int works around a bug in the HP C Compiler
6884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6886# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6888$as_echo_n "checking size of size_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006889if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006891else
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 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 +00006893
Martin v. Löwis18e16552006-02-15 17:27:45 +00006894else
Matthias Kloseb9621712010-04-24 17:59:49 +00006895 if test "$ac_cv_type_size_t" = yes; then
6896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006898as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006899See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006900 else
6901 ac_cv_sizeof_size_t=0
6902 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006904
Martin v. Löwis18e16552006-02-15 17:27:45 +00006905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6907$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908
6909
6910
Martin v. Löwis18e16552006-02-15 17:27:45 +00006911cat >>confdefs.h <<_ACEOF
6912#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6913_ACEOF
6914
6915
Christian Heimes400adb02008-02-01 08:12:03 +00006916# The cast to long int works around a bug in the HP C Compiler
6917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6919# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6921$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006922if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006924else
Matthias Kloseb9621712010-04-24 17:59:49 +00006925 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 +00006926
Christian Heimes400adb02008-02-01 08:12:03 +00006927else
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 if test "$ac_cv_type_pid_t" = yes; then
6929 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006931as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006932See \`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; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006982if 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;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006991as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006992See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006993 else
6994 ac_cv_sizeof_long_long=0
6995 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006997
Martin v. Löwis11437992002-04-12 09:54:03 +00006998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7000$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007001
7002
7003
Martin v. Löwis11437992002-04-12 09:54:03 +00007004cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007005#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007006_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007007
Michael W. Hudson54241132001-12-07 15:38:26 +00007008
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007009fi
7010
Matthias Kloseb9621712010-04-24 17:59:49 +00007011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7012$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007013have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007015/* end confdefs.h. */
7016
7017int
7018main ()
7019{
7020long double x; x = (long double)0;
7021 ;
7022 return 0;
7023}
7024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007025if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007026
7027
Matthias Kloseb9621712010-04-24 17:59:49 +00007028$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007029
7030 have_long_double=yes
7031
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007032fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7035$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007036if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007037# The cast to long int works around a bug in the HP C Compiler
7038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7040# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7042$as_echo_n "checking size of long double... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007043if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007045else
Matthias Kloseb9621712010-04-24 17:59:49 +00007046 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 +00007047
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007048else
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 if test "$ac_cv_type_long_double" = yes; then
7050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007052as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007053See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007054 else
7055 ac_cv_sizeof_long_double=0
7056 fi
7057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007058
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7061$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007062
7063
7064
7065cat >>confdefs.h <<_ACEOF
7066#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7067_ACEOF
7068
7069
7070fi
7071
7072
Matthias Kloseb9621712010-04-24 17:59:49 +00007073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7074$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007075have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007077/* end confdefs.h. */
7078
7079int
7080main ()
7081{
7082_Bool x; x = (_Bool)0;
7083 ;
7084 return 0;
7085}
7086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007087if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007088
7089
Matthias Kloseb9621712010-04-24 17:59:49 +00007090$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007091
7092 have_c99_bool=yes
7093
Thomas Woutersb2137042007-02-01 18:02:27 +00007094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7097$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007098if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099# The cast to long int works around a bug in the HP C Compiler
7100# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7101# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7102# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7104$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007105if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007106 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007107else
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 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 +00007109
Thomas Woutersb2137042007-02-01 18:02:27 +00007110else
Matthias Kloseb9621712010-04-24 17:59:49 +00007111 if test "$ac_cv_type__Bool" = yes; then
7112 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7113$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007114as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007115See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007116 else
7117 ac_cv_sizeof__Bool=0
7118 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007120
Thomas Woutersb2137042007-02-01 18:02:27 +00007121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7123$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007124
7125
7126
Thomas Woutersb2137042007-02-01 18:02:27 +00007127cat >>confdefs.h <<_ACEOF
7128#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7129_ACEOF
7130
7131
7132fi
7133
Matthias Kloseb9621712010-04-24 17:59:49 +00007134ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007135 #include <stdint.h>
7136 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007137 #ifdef HAVE_INTTYPES_H
7138 #include <inttypes.h>
7139 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007140"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007141if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007142
7143cat >>confdefs.h <<_ACEOF
7144#define HAVE_UINTPTR_T 1
7145_ACEOF
7146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007147# The cast to long int works around a bug in the HP C Compiler
7148# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7149# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7150# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7152$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007153if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007155else
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 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 +00007157
Martin v. Löwis11437992002-04-12 09:54:03 +00007158else
Matthias Kloseb9621712010-04-24 17:59:49 +00007159 if test "$ac_cv_type_uintptr_t" = yes; then
7160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007162as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007163See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007164 else
7165 ac_cv_sizeof_uintptr_t=0
7166 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007168
Martin v. Löwis11437992002-04-12 09:54:03 +00007169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7171$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007172
7173
7174
Martin v. Löwis11437992002-04-12 09:54:03 +00007175cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007176#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007177_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007178
Michael W. Hudson54241132001-12-07 15:38:26 +00007179
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007180fi
7181
Thomas Wouters89f507f2006-12-13 04:49:30 +00007182
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007183# The cast to long int works around a bug in the HP C Compiler
7184# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7185# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7186# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7188$as_echo_n "checking size of off_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007189if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007191else
Matthias Kloseb9621712010-04-24 17:59:49 +00007192 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007193#ifdef HAVE_SYS_TYPES_H
7194#include <sys/types.h>
7195#endif
7196
Matthias Kloseb9621712010-04-24 17:59:49 +00007197"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007199else
Matthias Kloseb9621712010-04-24 17:59:49 +00007200 if test "$ac_cv_type_off_t" = yes; then
7201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7202$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007203as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007204See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007205 else
7206 ac_cv_sizeof_off_t=0
7207 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007209
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7212$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007213
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007214
7215
Martin v. Löwis11437992002-04-12 09:54:03 +00007216cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007217#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007218_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007219
Michael W. Hudson54241132001-12-07 15:38:26 +00007220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007221
Matthias Kloseb9621712010-04-24 17:59:49 +00007222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7223$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007224if test "$have_long_long" = yes
7225then
7226if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007227 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007228
Matthias Kloseb9621712010-04-24 17:59:49 +00007229$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007230
Matthias Kloseb9621712010-04-24 17:59:49 +00007231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7232$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007233else
Matthias Kloseb9621712010-04-24 17:59:49 +00007234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007236fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007237else
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7239$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007240fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007241
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242# The cast to long int works around a bug in the HP C Compiler
7243# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7244# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7245# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7247$as_echo_n "checking size of time_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007248if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007249 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250else
Matthias Kloseb9621712010-04-24 17:59:49 +00007251 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252#ifdef HAVE_SYS_TYPES_H
7253#include <sys/types.h>
7254#endif
7255#ifdef HAVE_TIME_H
7256#include <time.h>
7257#endif
7258
Matthias Kloseb9621712010-04-24 17:59:49 +00007259"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007261else
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 if test "$ac_cv_type_time_t" = yes; then
7263 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007265as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007266See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267 else
7268 ac_cv_sizeof_time_t=0
7269 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007271
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7274$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007275
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007276
7277
Martin v. Löwis11437992002-04-12 09:54:03 +00007278cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007279#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007280_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007281
Michael W. Hudson54241132001-12-07 15:38:26 +00007282
7283
Trent Mick635f6fb2000-08-23 21:33:05 +00007284# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007285ac_save_cc="$CC"
7286if test "$ac_cv_kpthread" = "yes"
7287then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007288elif test "$ac_cv_kthread" = "yes"
7289then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007290elif test "$ac_cv_pthread" = "yes"
7291then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007292fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007293
Matthias Kloseb9621712010-04-24 17:59:49 +00007294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7295$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007296have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007299
7300 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007301int
7302main ()
7303{
Guido van Rossum12580492000-09-24 16:47:19 +00007304pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007305 ;
7306 return 0;
7307}
Matthias Kloseb159a552010-04-25 21:00:44 +00007308
Martin v. Löwis11437992002-04-12 09:54:03 +00007309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007310if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007311 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7315$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007316if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7320# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7322$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007323if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007325else
Matthias Kloseb9621712010-04-24 17:59:49 +00007326 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007327#ifdef HAVE_PTHREAD_H
7328#include <pthread.h>
7329#endif
7330
Matthias Kloseb9621712010-04-24 17:59:49 +00007331"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007332
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007333else
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 if test "$ac_cv_type_pthread_t" = yes; then
7335 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7336$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007337as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007338See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007339 else
7340 ac_cv_sizeof_pthread_t=0
7341 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007343
Trent Mick635f6fb2000-08-23 21:33:05 +00007344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7346$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007347
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007348
7349
Martin v. Löwis11437992002-04-12 09:54:03 +00007350cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007351#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007352_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007353
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007354
Trent Mick635f6fb2000-08-23 21:33:05 +00007355fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007356CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007357
Michael W. Hudson54241132001-12-07 15:38:26 +00007358
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007359case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007360 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007361 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7362 ;;
7363 Darwin/*)
7364 OTHER_LIBTOOL_OPT=""
7365 ;;
7366esac
7367
7368
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007369ARCH_RUN_32BIT=""
7370
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007371case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007372 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007373 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7374 if test "${enable_universalsdk}"; then
7375 :
7376 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007377 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007378 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007379 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007380 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007381 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007382 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007383 if test ${gcc_version} '<' 4.0
7384 then
7385 LIBTOOL_CRUFT="-lcc_dynamic"
7386 else
7387 LIBTOOL_CRUFT=""
7388 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007389 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007390 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007393/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007394
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007395 #include <unistd.h>
7396 int main(int argc, char*argv[])
7397 {
7398 if (sizeof(long) == 4) {
7399 return 0;
7400 } else {
7401 return 1;
7402 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007403 }
7404
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007406if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007407 ac_osx_32bit=yes
7408else
Matthias Kloseb9621712010-04-24 17:59:49 +00007409 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7412 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007413fi
7414
7415
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007416 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007417 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007418 i386)
7419 MACOSX_DEFAULT_ARCH="i386"
7420 ;;
7421 ppc)
7422 MACOSX_DEFAULT_ARCH="ppc"
7423 ;;
7424 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007425 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007426 ;;
7427 esac
7428 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007429 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007430 i386)
7431 MACOSX_DEFAULT_ARCH="x86_64"
7432 ;;
7433 ppc)
7434 MACOSX_DEFAULT_ARCH="ppc64"
7435 ;;
7436 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007437 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007438 ;;
7439 esac
7440
7441 #ARCH_RUN_32BIT="true"
7442 fi
7443
7444 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007445 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007446 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007447esac
7448
Matthias Kloseb9621712010-04-24 17:59:49 +00007449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7450$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007451if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007452then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007453 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007454 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007455 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007458
Matthias Kloseb9621712010-04-24 17:59:49 +00007459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7460$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007461 if test $enable_shared = "yes"
7462 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007463 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 +00007464 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007465else
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7467$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007468fi
7469
Matthias Kloseb9621712010-04-24 17:59:49 +00007470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7471$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007472case $ac_sys_system/$ac_sys_release in
7473 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007476
Matthias Kloseb9621712010-04-24 17:59:49 +00007477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7478$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007479 ;;
7480 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7482$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007483 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007484esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007485
Guido van Rossum0a516c91994-09-12 10:58:40 +00007486# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007487
Michael W. Hudson54241132001-12-07 15:38:26 +00007488
7489
7490
7491
Benjamin Peterson99f03762010-04-11 22:15:28 +00007492
Thomas Wouters477c8d52006-05-27 19:21:47 +00007493
Georg Brandlb1441c72009-01-03 22:33:39 +00007494
Thomas Wouters477c8d52006-05-27 19:21:47 +00007495cat >>confdefs.h <<_ACEOF
7496#define SHLIB_EXT "$SO"
7497_ACEOF
7498
Guido van Rossum0a516c91994-09-12 10:58:40 +00007499# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007500# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007501# (Shared libraries in this instance are shared modules to be loaded into
7502# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7504$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007505if test -z "$LDSHARED"
7506then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007507 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007508 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007509 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007510 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007511 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007512 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007513 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007515 if test "$GCC" = "yes" ; then
7516 LDSHARED='$(CC) -shared'
7517 LDCXXSHARED='$(CXX) -shared'
7518 else
7519 LDSHARED='$(CC) -G'
7520 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007521 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007522 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007523 if test "$GCC" = "yes" ; then
7524 LDSHARED='$(CC) -shared'
7525 LDCXXSHARED='$(CXX) -shared'
7526 else
7527 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007528 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007529 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007530 LDSHARED='$(CC) -bundle'
7531 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007532 if test "$enable_framework" ; then
7533 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007534 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7535 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007536 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007537 else
7538 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007539 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007540 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007541 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007542 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007543 LDSHARED='$(CC) -bundle'
7544 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007545 if test "$enable_framework" ; then
7546 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007547 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7548 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007549 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007550 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007551 # No framework, use the Python app as bundle-loader
7552 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007553 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007554 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007555 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007556 Darwin/*)
7557 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7558 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007559
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007560 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007561 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007562 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007563 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007564 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007565 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7566 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007567 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007568 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007569 LDSHARED='$(CC) -bundle'
7570 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007571 if test "$enable_framework" ; then
7572 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007573 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7574 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007575 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007576 else
7577 # No framework, use the Python app as bundle-loader
7578 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7579 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007580 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007581 fi
7582 fi
7583 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007584 Linux*|GNU*|QNX*)
7585 LDSHARED='$(CC) -shared'
7586 LDCXXSHARED='$(CXX) -shared';;
7587 BSD/OS*/4*)
7588 LDSHARED="gcc -shared"
7589 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007590 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007591 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007592 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007593 LDSHARED='$(CC) -shared'
7594 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007595 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007596 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007597 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007598 OpenBSD*)
7599 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7600 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007601 LDSHARED='$(CC) -shared $(CCSHARED)'
7602 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007603 else
7604 case `uname -r` in
7605 [01].* | 2.[0-7] | 2.[0-7].*)
7606 LDSHARED="ld -Bshareable ${LDFLAGS}"
7607 ;;
7608 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007609 LDSHARED='$(CC) -shared $(CCSHARED)'
7610 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007611 ;;
7612 esac
7613 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007614 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007615 LDSHARED='$(CC) -shared'
7616 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007617 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007618 if test "$GCC" = "yes" ; then
7619 LDSHARED='$(CC) -shared'
7620 LDCXXSHARED='$(CXX) -shared'
7621 else
7622 LDSHARED='$(CC) -G'
7623 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007624 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007625 SCO_SV*)
7626 LDSHARED='$(CC) -Wl,-G,-Bexport'
7627 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7628 CYGWIN*)
7629 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7630 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007631 *) LDSHARED="ld";;
7632 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7635$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007636LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007637BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007638# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007639# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7641$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007642if test -z "$CCSHARED"
7643then
Guido van Rossum07397971997-04-29 21:49:50 +00007644 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007645 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007646 then CCSHARED="-fPIC";
7647 elif test `uname -p` = sparc;
7648 then CCSHARED="-xcode=pic32";
7649 else CCSHARED="-Kpic";
7650 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007651 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007652 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007653 else CCSHARED="+z";
7654 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007655 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007656 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007657 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007658 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007659 if test "$GCC" = "yes"
7660 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007661 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007662 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007663 SCO_SV*)
7664 if test "$GCC" = "yes"
7665 then CCSHARED="-fPIC"
7666 else CCSHARED="-Kpic -belf"
7667 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007668 IRIX*/6*) case $CC in
7669 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007670 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007671 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007672 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7675$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007676# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007677# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7679$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007680if test -z "$LINKFORSHARED"
7681then
Guido van Rossum07397971997-04-29 21:49:50 +00007682 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007683 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007684 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007685 LINKFORSHARED="-Wl,-E -Wl,+s";;
7686# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007687 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007688 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007689 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007691 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007692 if test "$enable_framework"
7693 then
Jack Jansenda49e192005-01-07 13:08:22 +00007694 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007695 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007696 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007697 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007698 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007699 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007700 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007701 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7702 then
7703 LINKFORSHARED="-Wl,--export-dynamic"
7704 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007705 SunOS/5*) case $CC in
7706 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007707 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007708 then
7709 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007710 fi;;
7711 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007712 CYGWIN*)
7713 if test $enable_shared = "no"
7714 then
7715 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7716 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007717 QNX*)
7718 # -Wl,-E causes the symbols to be added to the dynamic
7719 # symbol table so that they can be found when a module
7720 # is loaded. -N 2048K causes the stack size to be set
7721 # to 2048 kilobytes so that the stack doesn't overflow
7722 # when running test_compile.py.
7723 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007724 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7727$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007728
Michael W. Hudson54241132001-12-07 15:38:26 +00007729
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007730
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7732$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007733if test ! "$LIBRARY" = "$LDLIBRARY"
7734then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007735 case $ac_sys_system in
7736 CYGWIN*)
7737 # Cygwin needs CCSHARED when building extension DLLs
7738 # but not when building the interpreter DLL.
7739 CFLAGSFORSHARED='';;
7740 *)
7741 CFLAGSFORSHARED='$(CCSHARED)'
7742 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7745$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007746
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007747# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7748# library (with --enable-shared).
7749# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007750# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7751# if it is not required, since it creates a dependency of the shared library
7752# to LIBS. This, in turn, means that applications linking the shared libpython
7753# don't need to link LIBS explicitly. The default should be only changed
7754# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007755
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7757$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007758case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007759 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007760 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007761esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7763$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007764
7765
Guido van Rossum627b2d71993-12-24 10:39:16 +00007766# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7768$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007769if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007770 $as_echo_n "(cached) " >&6
7771else
7772 ac_check_lib_save_LIBS=$LIBS
7773LIBS="-lsendfile $LIBS"
7774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7775/* end confdefs.h. */
7776
7777/* Override any GCC internal prototype to avoid an error.
7778 Use char because int might match the return type of a GCC
7779 builtin and then its argument prototype would still apply. */
7780#ifdef __cplusplus
7781extern "C"
7782#endif
7783char sendfile ();
7784int
7785main ()
7786{
7787return sendfile ();
7788 ;
7789 return 0;
7790}
7791_ACEOF
7792if ac_fn_c_try_link "$LINENO"; then :
7793 ac_cv_lib_sendfile_sendfile=yes
7794else
7795 ac_cv_lib_sendfile_sendfile=no
7796fi
7797rm -f core conftest.err conftest.$ac_objext \
7798 conftest$ac_exeext conftest.$ac_ext
7799LIBS=$ac_check_lib_save_LIBS
7800fi
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7802$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007803if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007804 cat >>confdefs.h <<_ACEOF
7805#define HAVE_LIBSENDFILE 1
7806_ACEOF
7807
7808 LIBS="-lsendfile $LIBS"
7809
7810fi
7811
Matthias Kloseb9621712010-04-24 17:59:49 +00007812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7813$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007814if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007815 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007816else
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007818LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822/* Override any GCC internal prototype to avoid an error.
7823 Use char because int might match the return type of a GCC
7824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007825#ifdef __cplusplus
7826extern "C"
7827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007828char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007829int
7830main ()
7831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 ;
7834 return 0;
7835}
7836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007837if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007838 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842rm -f core conftest.err conftest.$ac_objext \
7843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007844LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7847$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007848if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 cat >>confdefs.h <<_ACEOF
7850#define HAVE_LIBDL 1
7851_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007852
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007853 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007854
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007855fi
7856 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7858$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007859if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007860 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861else
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007863LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867/* Override any GCC internal prototype to avoid an error.
7868 Use char because int might match the return type of a GCC
7869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007870#ifdef __cplusplus
7871extern "C"
7872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007873char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007874int
7875main ()
7876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 ;
7879 return 0;
7880}
7881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007884else
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007887rm -f core conftest.err conftest.$ac_objext \
7888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007889LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7892$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007893if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007894 cat >>confdefs.h <<_ACEOF
7895#define HAVE_LIBDLD 1
7896_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007897
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007898 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007899
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007900fi
7901 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007902
Georg Brandlb1441c72009-01-03 22:33:39 +00007903# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007904if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7906$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007907if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007909else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007910 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914/* Override any GCC internal prototype to avoid an error.
7915 Use char because int might match the return type of a GCC
7916 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007917#ifdef __cplusplus
7918extern "C"
7919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007920char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007921int
7922main ()
7923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 ;
7926 return 0;
7927}
7928_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007929for ac_lib in '' pthread rt posix4; do
7930 if test -z "$ac_lib"; then
7931 ac_res="none required"
7932 else
7933 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007934 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939rm -f core conftest.err conftest.$ac_objext \
7940 conftest$ac_exeext
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007941 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944done
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007945if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947else
7948 ac_cv_search_sem_init=no
7949fi
7950rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007951LIBS=$ac_func_search_save_LIBS
7952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7954$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007956if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007958
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007959fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007960 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007961 # posix4 on Solaris 2.6
7962 # pthread (first!) on Linux
7963fi
7964
Martin v. Löwis19d17342003-06-14 21:03:05 +00007965# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7967$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007968if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007970else
7971 ac_check_lib_save_LIBS=$LIBS
7972LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007974/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976/* Override any GCC internal prototype to avoid an error.
7977 Use char because int might match the return type of a GCC
7978 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007979#ifdef __cplusplus
7980extern "C"
7981#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007982char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007983int
7984main ()
7985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007987 ;
7988 return 0;
7989}
7990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007991if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007992 ac_cv_lib_intl_textdomain=yes
7993else
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007996rm -f core conftest.err conftest.$ac_objext \
7997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007998LIBS=$ac_check_lib_save_LIBS
7999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8001$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008002if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008003
Matthias Kloseb9621712010-04-24 17:59:49 +00008004$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005
Brett Cannonc6d936e2009-06-07 20:09:53 +00008006 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008007fi
8008
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008009
8010# checks for system dependent C++ extensions support
8011case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8013$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008015/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008016
Georg Brandl59e87bd2011-02-15 19:48:59 +00008017 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008018int
8019main ()
8020{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008021loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 ;
8023 return 0;
8024}
Matthias Kloseb159a552010-04-25 21:00:44 +00008025
Martin v. Löwis11437992002-04-12 09:54:03 +00008026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008027if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008028
Matthias Kloseb159a552010-04-25 21:00:44 +00008029
Matthias Kloseb9621712010-04-24 17:59:49 +00008030$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008031
Matthias Kloseb159a552010-04-25 21:00:44 +00008032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008033$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008034
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008035else
Matthias Kloseb159a552010-04-25 21:00:44 +00008036
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008038$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008039
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041rm -f core conftest.err conftest.$ac_objext \
8042 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008043 *) ;;
8044esac
8045
Guido van Rossum70c7f481998-03-26 18:44:10 +00008046# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8048$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008049if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008051else
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008053LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057/* Override any GCC internal prototype to avoid an error.
8058 Use char because int might match the return type of a GCC
8059 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008060#ifdef __cplusplus
8061extern "C"
8062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008063char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008064int
8065main ()
8066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008068 ;
8069 return 0;
8070}
8071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008072if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008074else
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008077rm -f core conftest.err conftest.$ac_objext \
8078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008079LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8082$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008083if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008084 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008085fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008086 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8088$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008089if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008091else
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008093LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097/* Override any GCC internal prototype to avoid an error.
8098 Use char because int might match the return type of a GCC
8099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008100#ifdef __cplusplus
8101extern "C"
8102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008103char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008104int
8105main ()
8106{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 ;
8109 return 0;
8110}
8111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008112if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008114else
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008117rm -f core conftest.err conftest.$ac_objext \
8118 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008119LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8122$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008123if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008124 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008125fi
8126 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8129$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008132if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8135$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008136LIBS="$withval $LIBS"
8137
8138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8140$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141fi
8142
Guido van Rossum7f43da71994-08-01 12:15:30 +00008143
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008144if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008145 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8146set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8148$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008149if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008151else
8152 case $PKG_CONFIG in
8153 [\\/]* | ?:[\\/]*)
8154 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8155 ;;
8156 *)
8157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8158for as_dir in $PATH
8159do
8160 IFS=$as_save_IFS
8161 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008162 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008163 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8164 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008166 break 2
8167 fi
8168done
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008170IFS=$as_save_IFS
8171
8172 ;;
8173esac
8174fi
8175PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8176if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8178$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008179else
Matthias Kloseb9621712010-04-24 17:59:49 +00008180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8181$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008182fi
8183
8184
8185fi
8186if test -z "$ac_cv_path_PKG_CONFIG"; then
8187 ac_pt_PKG_CONFIG=$PKG_CONFIG
8188 # Extract the first word of "pkg-config", so it can be a program name with args.
8189set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8191$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008192if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008194else
8195 case $ac_pt_PKG_CONFIG in
8196 [\\/]* | ?:[\\/]*)
8197 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8198 ;;
8199 *)
8200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8201for as_dir in $PATH
8202do
8203 IFS=$as_save_IFS
8204 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008205 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008206 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8207 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008208 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008209 break 2
8210 fi
8211done
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008213IFS=$as_save_IFS
8214
8215 ;;
8216esac
8217fi
8218ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8219if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8221$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008222else
Matthias Kloseb9621712010-04-24 17:59:49 +00008223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8224$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008225fi
8226
8227 if test "x$ac_pt_PKG_CONFIG" = x; then
8228 PKG_CONFIG=""
8229 else
8230 case $cross_compiling:$ac_tool_warned in
8231yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8233$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008234ac_tool_warned=yes ;;
8235esac
8236 PKG_CONFIG=$ac_pt_PKG_CONFIG
8237 fi
8238else
8239 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8240fi
8241
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008242
8243# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8245$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008246
8247# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008248if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008249 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008250else
8251 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008252fi
8253
8254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8256$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008257
8258# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8260$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008261
8262# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008263if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008264 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008265else
8266 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008267fi
8268
8269
8270if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008271 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8272else
8273 LIBFFI_INCLUDEDIR=""
8274fi
8275
8276
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8278$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008279
Benjamin Peterson076ed002010-10-31 17:11:02 +00008280# Check for support for loadable sqlite extensions
8281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8282$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8283# Check whether --enable-loadable-sqlite-extensions was given.
8284if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8285 enableval=$enable_loadable_sqlite_extensions;
8286else
8287 enable_loadable_sqlite_extensions="no"
8288fi
8289
8290
8291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8292$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8293
Matthias Klose55708cc2009-04-30 08:06:49 +00008294# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8296$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008297
8298# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008299if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008300 withval=$with_dbmliborder;
8301if test x$with_dbmliborder = xyes
8302then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008303as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008304else
8305 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8306 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8307 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008308 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008309 fi
8310 done
8311fi
8312fi
8313
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8315$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008316
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008317# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008318
8319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8321$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008323# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008324if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325 withval=$with_signal_module;
8326fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008327
8328
8329if test -z "$with_signal_module"
8330then with_signal_module="yes"
8331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8333$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008334
8335if test "${with_signal_module}" = "yes"; then
8336 USE_SIGNAL_MODULE=""
8337 SIGNAL_OBJS=""
8338else
8339 USE_SIGNAL_MODULE="#"
8340 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8341fi
8342
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008343# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008344
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008345USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
8349# Templates for things AC_DEFINEd more than once.
8350# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008351
8352
Martin v. Löwis11437992002-04-12 09:54:03 +00008353
Matthias Kloseb9621712010-04-24 17:59:49 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8355$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008358if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359 withval=$with_threads;
8360fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008361
8362
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008363# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008366if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367 withval=$with_thread; with_threads=$with_thread
8368fi
8369
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008370
8371if test -z "$with_threads"
8372then with_threads="yes"
8373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8375$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008376
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008377
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008378if test "$with_threads" = "no"
8379then
8380 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008381elif test "$ac_cv_pthread_is_default" = yes
8382then
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008384
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008385 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008387
8388 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008389 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008390elif test "$ac_cv_kpthread" = "yes"
8391then
8392 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008393 if test "$ac_cv_cxx_thread" = "yes"; then
8394 CXX="$CXX -Kpthread"
8395 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008397
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008398 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008399 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008400elif test "$ac_cv_kthread" = "yes"
8401then
8402 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008403 if test "$ac_cv_cxx_thread" = "yes"; then
8404 CXX="$CXX -Kthread"
8405 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008407
8408 posix_threads=yes
8409 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008410elif test "$ac_cv_pthread" = "yes"
8411then
8412 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008413 if test "$ac_cv_cxx_thread" = "yes"; then
8414 CXX="$CXX -pthread"
8415 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008417
8418 posix_threads=yes
8419 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008420else
8421 if test ! -z "$with_threads" -a -d "$with_threads"
8422 then LDFLAGS="$LDFLAGS -L$with_threads"
8423 fi
8424 if test ! -z "$withval" -a -d "$withval"
8425 then LDFLAGS="$LDFLAGS -L$withval"
8426 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008427
8428 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008429 # define _POSIX_THREADS in unistd.h. Some apparently don't
8430 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8432$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008434/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008435
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008436#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008437#ifdef _POSIX_THREADS
8438yes
8439#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008440
8441_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008444 unistd_defines_pthreads=yes
8445else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008446 unistd_defines_pthreads=no
8447fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008448rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8451$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008452
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008454
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008455 # Just looking for pthread_create in libpthread is not enough:
8456 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8457 # So we really have to include pthread.h, and then link.
8458 _libs=$LIBS
8459 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8461$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008463/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008464#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008465
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008466void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008467int
8468main ()
8469{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008470
8471pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 ;
8473 return 0;
8474}
8475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008477
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8479$as_echo "yes" >&6; }
8480 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008481
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008482 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008483 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008484else
Martin v. Löwis11437992002-04-12 09:54:03 +00008485
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008486 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008488if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008490
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008491 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008492 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008493else
Guido van Rossumad678af1998-10-02 14:42:15 +00008494
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8496$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008497if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008499else
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008501LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505/* Override any GCC internal prototype to avoid an error.
8506 Use char because int might match the return type of a GCC
8507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008508#ifdef __cplusplus
8509extern "C"
8510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008511char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008512int
8513main ()
8514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 ;
8517 return 0;
8518}
8519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008525rm -f core conftest.err conftest.$ac_objext \
8526 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008527LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8530$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008531if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008533
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008534 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008535 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008536 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008537else
Greg Steinadf63d62000-07-05 10:38:09 +00008538
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8540$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008541if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008543else
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008545LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549/* Override any GCC internal prototype to avoid an error.
8550 Use char because int might match the return type of a GCC
8551 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008552#ifdef __cplusplus
8553extern "C"
8554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008555char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008556int
8557main ()
8558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ;
8561 return 0;
8562}
8563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008564if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008566else
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569rm -f core conftest.err conftest.$ac_objext \
8570 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008571LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8574$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008575if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008577
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008578 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008579 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008580 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008581else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008582
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8584$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008585if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008587else
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008589LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593/* Override any GCC internal prototype to avoid an error.
8594 Use char because int might match the return type of a GCC
8595 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008596#ifdef __cplusplus
8597extern "C"
8598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008599char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008600int
8601main ()
8602{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ;
8605 return 0;
8606}
8607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008608if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008610else
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008613rm -f core conftest.err conftest.$ac_objext \
8614 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008615LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8618$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008619if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008621
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008622 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008623 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008624 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008625else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008626
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8628$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008629if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008631else
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008633LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637/* Override any GCC internal prototype to avoid an error.
8638 Use char because int might match the return type of a GCC
8639 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008640#ifdef __cplusplus
8641extern "C"
8642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008643char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008644int
8645main ()
8646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 ;
8649 return 0;
8650}
8651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008652if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008654else
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008657rm -f core conftest.err conftest.$ac_objext \
8658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008659LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8662$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008663if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008665
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008666 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008667 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008668 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008669else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008670
Martin v. Löwis130fb172001-07-19 11:00:41 +00008671 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008672fi
8673
Guido van Rossum627b2d71993-12-24 10:39:16 +00008674
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008675fi
8676
Guido van Rossum0be3e491997-05-22 20:33:33 +00008677fi
8678
Guido van Rossum49545951997-12-02 19:28:29 +00008679fi
8680
Guido van Rossumb93a8621998-05-07 13:27:32 +00008681fi
8682
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684rm -f core conftest.err conftest.$ac_objext \
8685 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008686
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8688$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008689if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008691else
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008693LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008695/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008697/* Override any GCC internal prototype to avoid an error.
8698 Use char because int might match the return type of a GCC
8699 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008700#ifdef __cplusplus
8701extern "C"
8702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008703char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008704int
8705main ()
8706{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ;
8709 return 0;
8710}
8711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008712if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008714else
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008717rm -f core conftest.err conftest.$ac_objext \
8718 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008719LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8722$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008723if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008725
Martin v. Löwis130fb172001-07-19 11:00:41 +00008726 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008727 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008728 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008729fi
8730
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008731
Neal Norwitza978ab02002-11-02 16:58:05 +00008732 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8734$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008735if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008737else
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008739LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008743/* Override any GCC internal prototype to avoid an error.
8744 Use char because int might match the return type of a GCC
8745 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008746#ifdef __cplusplus
8747extern "C"
8748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008749char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008750int
8751main ()
8752{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ;
8755 return 0;
8756}
8757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008760else
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008763rm -f core conftest.err conftest.$ac_objext \
8764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008765LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8768$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008769if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008771
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008772 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008773 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008774 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008775fi
8776
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008777 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008779
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008780if test "$posix_threads" = "yes"; then
8781 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008782
Matthias Kloseb9621712010-04-24 17:59:49 +00008783$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008784
8785 fi
8786
8787 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8788 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008789 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008790$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008791
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008792 ;;
8793 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008794$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008795
8796 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008797 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008798$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008799
8800 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008801 esac
8802
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8804$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008805 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008807else
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008809 ac_cv_pthread_system_supported=no
8810else
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008812/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008813#include <pthread.h>
8814 void *foo(void *parm) {
8815 return NULL;
8816 }
8817 main() {
8818 pthread_attr_t attr;
8819 pthread_t id;
8820 if (pthread_attr_init(&attr)) exit(-1);
8821 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8822 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8823 exit(0);
8824 }
8825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008826if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008827 ac_cv_pthread_system_supported=yes
8828else
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008833fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835
Guido van Rossum627b2d71993-12-24 10:39:16 +00008836fi
8837
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8839$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008840 if test "$ac_cv_pthread_system_supported" = "yes"; then
8841
Matthias Kloseb9621712010-04-24 17:59:49 +00008842$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008843
8844 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 for ac_func in pthread_sigmask
8846do :
8847 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008848if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008849 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008850#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008851_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008852 case $ac_sys_system in
8853 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008854
Matthias Kloseb9621712010-04-24 17:59:49 +00008855$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008856
8857 ;;
8858 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008859fi
8860done
8861
8862fi
8863
8864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008865# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008866
Matthias Kloseb9621712010-04-24 17:59:49 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8868$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008869# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008870if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008872 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8874$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008875 ipv6=no
8876 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8878$as_echo "yes" >&6; }
8879 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008880
8881 ipv6=yes
8882 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008884else
Martin v. Löwis11437992002-04-12 09:54:03 +00008885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008887
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8889$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008890 ipv6=no
8891
8892else
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008895 /* AF_INET6 available check */
8896#include <sys/types.h>
8897#include <sys/socket.h>
8898main()
8899{
8900 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8901 exit(1);
8902 else
8903 exit(0);
8904}
8905
Martin v. Löwis11437992002-04-12 09:54:03 +00008906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008907if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008908
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8910$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008911 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008912
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008913else
Matthias Kloseb159a552010-04-25 21:00:44 +00008914
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8916$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008917 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008922fi
8923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008925if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8927$as_echo_n "checking if RFC2553 API is available... " >&6; }
8928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008929/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
8931 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008932#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
8935{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008936struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008937 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ;
8939 return 0;
8940}
Matthias Kloseb159a552010-04-25 21:00:44 +00008941
Martin v. Löwis11437992002-04-12 09:54:03 +00008942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008943if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008944
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008946$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008947 ipv6=yes
8948
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008949else
Matthias Kloseb159a552010-04-25 21:00:44 +00008950
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008952$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008953 ipv6=no
8954
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008957fi
8958
8959if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008961
8962fi
8963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964fi
8965
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966
8967ipv6type=unknown
8968ipv6lib=none
8969ipv6trylibc=no
8970
8971if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8973$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008974 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8975 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976 case $i in
8977 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008979/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008980
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981#include <netinet/in.h>
8982#ifdef IPV6_INRIA_VERSION
8983yes
8984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008985_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008988 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008990rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008991
8992 ;;
8993 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008996
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008997#include <netinet/in.h>
8998#ifdef __KAME__
8999yes
9000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009001_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004 ipv6type=$i;
9005 ipv6lib=inet6
9006 ipv6libdir=/usr/local/v6/lib
9007 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009009rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010
9011 ;;
9012 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009014/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009015
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016#include <features.h>
9017#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9018yes
9019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009020_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023 ipv6type=$i;
9024 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009026rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027
9028 ;;
9029 linux-inet6)
9030 if test -d /usr/inet6; then
9031 ipv6type=$i
9032 ipv6lib=inet6
9033 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009034 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009035 fi
9036 ;;
9037 solaris)
9038 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009039 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040 ipv6type=$i
9041 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042 fi
9043 fi
9044 ;;
9045 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009047/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009048
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009049#include <sys/param.h>
9050#ifdef _TOSHIBA_INET6
9051yes
9052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009053_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056 ipv6type=$i;
9057 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009058 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009060rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061
9062 ;;
9063 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067#include </usr/local/v6/include/sys/v6config.h>
9068#ifdef __V6D__
9069yes
9070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074 ipv6type=$i;
9075 ipv6lib=v6;
9076 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009077 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009079rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080
9081 ;;
9082 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009084/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009085
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009086#include <sys/param.h>
9087#ifdef _ZETA_MINAMI_INET6
9088yes
9089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009090_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093 ipv6type=$i;
9094 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009095 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009097rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009098
9099 ;;
9100 esac
9101 if test "$ipv6type" != "unknown"; then
9102 break
9103 fi
9104 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9106$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009107fi
9108
9109if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9110 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9111 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9112 echo "using lib$ipv6lib"
9113 else
9114 if test $ipv6trylibc = "yes"; then
9115 echo "using libc"
9116 else
9117 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9118 echo "You need to fetch lib$ipv6lib.a from appropriate"
9119 echo 'ipv6 kit and compile beforehand.'
9120 exit 1
9121 fi
9122 fi
9123fi
9124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9126$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009128/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009129
9130 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009131int
9132main ()
9133{
9134FSIORefNum fRef = 0
9135 ;
9136 return 0;
9137}
Matthias Kloseb159a552010-04-25 21:00:44 +00009138
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009140if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009141
Matthias Kloseb159a552010-04-25 21:00:44 +00009142
Matthias Kloseb9621712010-04-24 17:59:49 +00009143$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009144
Matthias Kloseb9621712010-04-24 17:59:49 +00009145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9146$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009147
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009148else
Matthias Kloseb159a552010-04-25 21:00:44 +00009149
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9151$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009152
9153fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9155
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009156# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9158$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009161if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162 withval=$with_doc_strings;
9163fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009164
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009165
9166if test -z "$with_doc_strings"
9167then with_doc_strings="yes"
9168fi
9169if test "$with_doc_strings" != "no"
9170then
9171
Matthias Kloseb9621712010-04-24 17:59:49 +00009172$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009173
9174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9176$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009177
Antoine Pitrou042b1282010-08-13 21:15:58 +00009178# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9180$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009181
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009182# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009183if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009184 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009185if test "$withval" != no
9186then
9187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009189
Matthias Kloseb9621712010-04-24 17:59:49 +00009190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9191$as_echo "yes" >&6; }
9192else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9193$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009194fi
9195else
Matthias Kloseb9621712010-04-24 17:59:49 +00009196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9197$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198fi
9199
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009200
9201# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9203$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009206if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009207 withval=$with_pymalloc;
9208fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009209
Neil Schemenauera35c6882001-02-27 04:45:05 +00009210
Neil Schemenauer16c22972002-03-22 15:34:49 +00009211if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009212then
9213 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009214 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009215fi
9216if test "$with_pymalloc" != "no"
9217then
Martin v. Löwis11437992002-04-12 09:54:03 +00009218
Matthias Kloseb9621712010-04-24 17:59:49 +00009219$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009220
9221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9223$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009224
Benjamin Peterson05159c42009-12-03 03:01:27 +00009225# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9227$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009228
9229# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009230if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009231 withval=$with_valgrind;
9232else
9233 with_valgrind=no
9234fi
9235
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9237$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009238if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009240if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009241
Matthias Kloseb9621712010-04-24 17:59:49 +00009242$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009243
9244else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009245 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009246
9247fi
9248
9249
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009250 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009251fi
9252
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009253# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009254
Guido van Rossum98935bf2001-09-05 19:13:16 +00009255DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009256
Guido van Rossume97ee181999-12-20 21:27:22 +00009257# the dlopen() function means we might want to use dynload_shlib.o. some
9258# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009259for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009260do :
9261 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009262if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009264#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009265_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009266
Guido van Rossume97ee181999-12-20 21:27:22 +00009267fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009268done
Guido van Rossume97ee181999-12-20 21:27:22 +00009269
Michael W. Hudson54241132001-12-07 15:38:26 +00009270
Guido van Rossume97ee181999-12-20 21:27:22 +00009271# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9272# loading of modules.
9273
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9275$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009276if test -z "$DYNLOADFILE"
9277then
9278 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009279 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9280 if test "$ac_cv_func_dlopen" = yes
9281 then DYNLOADFILE="dynload_shlib.o"
9282 else DYNLOADFILE="dynload_aix.o"
9283 fi
9284 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009285 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009286 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9287 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009288 *)
9289 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9290 # out any dynamic loading
9291 if test "$ac_cv_func_dlopen" = yes
9292 then DYNLOADFILE="dynload_shlib.o"
9293 else DYNLOADFILE="dynload_stub.o"
9294 fi
9295 ;;
9296 esac
9297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9299$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009300if test "$DYNLOADFILE" != "dynload_stub.o"
9301then
Martin v. Löwis11437992002-04-12 09:54:03 +00009302
Matthias Kloseb9621712010-04-24 17:59:49 +00009303$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009304
9305fi
9306
Neil Schemenauer4e425612001-06-19 15:44:15 +00009307# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9308
Michael W. Hudson54241132001-12-07 15:38:26 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9311$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009312if test -z "$MACHDEP_OBJS"
9313then
Jack Jansene578a632001-08-15 01:27:14 +00009314 MACHDEP_OBJS=$extra_machdep_objs
9315else
9316 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9319$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009320
Guido van Rossum627b2d71993-12-24 10:39:16 +00009321# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009322for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009323 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009324 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009325 futimens futimes gai_strerror \
9326 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009327 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009328 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009329 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009330 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009331 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009332 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009333 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009334 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009335 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009336 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9337 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009338 sigaction sigaltstack siginterrupt sigpending sigrelse \
9339 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009340 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009341 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9342 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009343do :
9344 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9345ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009346if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009348#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009349_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009350
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009351fi
9352done
9353
Michael W. Hudson54241132001-12-07 15:38:26 +00009354
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009355# For some functions, having a definition is not sufficient, since
9356# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9358$as_echo_n "checking for chroot... " >&6; }
9359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009360/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009362int
9363main ()
9364{
9365void *x=chroot
9366 ;
9367 return 0;
9368}
9369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009371
Matthias Kloseb9621712010-04-24 17:59:49 +00009372$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009373
Matthias Kloseb159a552010-04-25 21:00:44 +00009374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009375$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009376else
Matthias Kloseb9621712010-04-24 17:59:49 +00009377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9378$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009379
9380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9383$as_echo_n "checking for link... " >&6; }
9384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009385/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009386#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387int
9388main ()
9389{
9390void *x=link
9391 ;
9392 return 0;
9393}
9394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009396
Matthias Kloseb9621712010-04-24 17:59:49 +00009397$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009398
Matthias Kloseb159a552010-04-25 21:00:44 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009400$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009401else
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404
9405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9408$as_echo_n "checking for symlink... " >&6; }
9409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009411#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009412int
9413main ()
9414{
9415void *x=symlink
9416 ;
9417 return 0;
9418}
9419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009421
Matthias Kloseb9621712010-04-24 17:59:49 +00009422$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009423
Matthias Kloseb159a552010-04-25 21:00:44 +00009424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009425$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009426else
Matthias Kloseb9621712010-04-24 17:59:49 +00009427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009429
9430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9433$as_echo_n "checking for fchdir... " >&6; }
9434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009435/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009436#include <unistd.h>
9437int
9438main ()
9439{
9440void *x=fchdir
9441 ;
9442 return 0;
9443}
9444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009448
Matthias Kloseb159a552010-04-25 21:00:44 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009450$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009451else
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9453$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009454
9455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9458$as_echo_n "checking for fsync... " >&6; }
9459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009460/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009461#include <unistd.h>
9462int
9463main ()
9464{
9465void *x=fsync
9466 ;
9467 return 0;
9468}
9469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009473
Matthias Kloseb159a552010-04-25 21:00:44 +00009474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009476else
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009479
9480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9483$as_echo_n "checking for fdatasync... " >&6; }
9484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009485/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009486#include <unistd.h>
9487int
9488main ()
9489{
9490void *x=fdatasync
9491 ;
9492 return 0;
9493}
9494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009496
Matthias Kloseb9621712010-04-24 17:59:49 +00009497$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009498
Matthias Kloseb159a552010-04-25 21:00:44 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009500$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009501else
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009504
9505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9508$as_echo_n "checking for epoll... " >&6; }
9509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009510/* end confdefs.h. */
9511#include <sys/epoll.h>
9512int
9513main ()
9514{
9515void *x=epoll_create
9516 ;
9517 return 0;
9518}
9519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009520if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009521
Matthias Kloseb9621712010-04-24 17:59:49 +00009522$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009523
Matthias Kloseb159a552010-04-25 21:00:44 +00009524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009525$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009526else
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9528$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009529
9530fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9533$as_echo_n "checking for kqueue... " >&6; }
9534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009535/* end confdefs.h. */
9536
9537#include <sys/types.h>
9538#include <sys/event.h>
9539
9540int
9541main ()
9542{
9543int x=kqueue()
9544 ;
9545 return 0;
9546}
9547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009548if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009549
Matthias Kloseb9621712010-04-24 17:59:49 +00009550$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009551
Matthias Kloseb159a552010-04-25 21:00:44 +00009552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009553$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009554else
Matthias Kloseb9621712010-04-24 17:59:49 +00009555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009557
9558fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009560# On some systems (eg. FreeBSD 5), we would find a definition of the
9561# functions ctermid_r, setgroups in the library, but no prototype
9562# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9563# address to avoid compiler warnings and potential miscompilations
9564# because of the missing prototypes.
9565
Matthias Kloseb9621712010-04-24 17:59:49 +00009566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9567$as_echo_n "checking for ctermid_r... " >&6; }
9568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009569/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009570
Martin v. Löwisd5843682002-11-21 20:41:28 +00009571#include <stdio.h>
9572
Martin v. Löwisd5843682002-11-21 20:41:28 +00009573int
9574main ()
9575{
9576void* p = ctermid_r
9577 ;
9578 return 0;
9579}
9580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009581if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009582
Matthias Kloseb9621712010-04-24 17:59:49 +00009583$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009584
Matthias Kloseb159a552010-04-25 21:00:44 +00009585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009586$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009587else
Matthias Kloseb9621712010-04-24 17:59:49 +00009588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9589$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009590
9591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9593
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9595$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009596if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009597 $as_echo_n "(cached) " >&6
9598else
9599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009600/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009601#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009602int
9603main ()
9604{
9605void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009606
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009607 ;
9608 return 0;
9609}
9610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009611if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009612 ac_cv_flock_decl=yes
9613else
9614 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009615
9616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009618
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009619fi
9620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9621$as_echo "$ac_cv_flock_decl" >&6; }
9622if test "x${ac_cv_flock_decl}" = xyes; then
9623 for ac_func in flock
9624do :
9625 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009626if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009627 cat >>confdefs.h <<_ACEOF
9628#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009629_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009630
Antoine Pitroua3000072010-09-07 14:52:42 +00009631else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009633$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009634if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009635 $as_echo_n "(cached) " >&6
9636else
9637 ac_check_lib_save_LIBS=$LIBS
9638LIBS="-lbsd $LIBS"
9639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9640/* end confdefs.h. */
9641
9642/* Override any GCC internal prototype to avoid an error.
9643 Use char because int might match the return type of a GCC
9644 builtin and then its argument prototype would still apply. */
9645#ifdef __cplusplus
9646extern "C"
9647#endif
9648char flock ();
9649int
9650main ()
9651{
9652return flock ();
9653 ;
9654 return 0;
9655}
9656_ACEOF
9657if ac_fn_c_try_link "$LINENO"; then :
9658 ac_cv_lib_bsd_flock=yes
9659else
9660 ac_cv_lib_bsd_flock=no
9661fi
9662rm -f core conftest.err conftest.$ac_objext \
9663 conftest$ac_exeext conftest.$ac_ext
9664LIBS=$ac_check_lib_save_LIBS
9665fi
9666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9667$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009668if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009669 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009670
9671
9672$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9673
9674
9675fi
9676
9677
9678fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009679done
9680
Antoine Pitroua3000072010-09-07 14:52:42 +00009681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009682
Matthias Kloseb9621712010-04-24 17:59:49 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9684$as_echo_n "checking for getpagesize... " >&6; }
9685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009686/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009687
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009688#include <unistd.h>
9689
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009690int
9691main ()
9692{
9693void* p = getpagesize
9694 ;
9695 return 0;
9696}
9697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009699
Matthias Kloseb9621712010-04-24 17:59:49 +00009700$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009701
Matthias Kloseb159a552010-04-25 21:00:44 +00009702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009703$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009704else
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009707
9708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009710
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9712$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9714/* end confdefs.h. */
9715
9716#include <malloc.h>
9717
9718int
9719main ()
9720{
9721mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726if ac_fn_c_try_compile "$LINENO"; then :
9727
9728$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9729
9730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9731$as_echo "yes" >&6; }
9732else
9733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734$as_echo "no" >&6; }
9735
9736fi
9737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9738
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009739for ac_prog in true
9740do
9741 # Extract the first word of "$ac_prog", so it can be a program name with args.
9742set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9744$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009745if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009747else
9748 if test -n "$TRUE"; then
9749 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9750else
9751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9752for as_dir in $PATH
9753do
9754 IFS=$as_save_IFS
9755 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757 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 +00009758 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009759 $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 +00009760 break 2
9761 fi
9762done
Matthias Kloseb9621712010-04-24 17:59:49 +00009763 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009765
9766fi
9767fi
9768TRUE=$ac_cv_prog_TRUE
9769if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9771$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009772else
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9774$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009775fi
9776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009778 test -n "$TRUE" && break
9779done
9780test -n "$TRUE" || TRUE="/bin/true"
9781
9782
Matthias Kloseb9621712010-04-24 17:59:49 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9784$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009785if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009787else
9788 ac_check_lib_save_LIBS=$LIBS
9789LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009791/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793/* Override any GCC internal prototype to avoid an error.
9794 Use char because int might match the return type of a GCC
9795 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009796#ifdef __cplusplus
9797extern "C"
9798#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009799char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800int
9801main ()
9802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009803return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009804 ;
9805 return 0;
9806}
9807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009808if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009809 ac_cv_lib_c_inet_aton=yes
9810else
Matthias Kloseb9621712010-04-24 17:59:49 +00009811 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009813rm -f core conftest.err conftest.$ac_objext \
9814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009815LIBS=$ac_check_lib_save_LIBS
9816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9818$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009819if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009820 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009821else
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9823$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009824if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009826else
9827 ac_check_lib_save_LIBS=$LIBS
9828LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009830/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832/* Override any GCC internal prototype to avoid an error.
9833 Use char because int might match the return type of a GCC
9834 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009835#ifdef __cplusplus
9836extern "C"
9837#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009838char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009839int
9840main ()
9841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843 ;
9844 return 0;
9845}
9846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009848 ac_cv_lib_resolv_inet_aton=yes
9849else
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009852rm -f core conftest.err conftest.$ac_objext \
9853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009854LIBS=$ac_check_lib_save_LIBS
9855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9857$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009858if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009859 cat >>confdefs.h <<_ACEOF
9860#define HAVE_LIBRESOLV 1
9861_ACEOF
9862
9863 LIBS="-lresolv $LIBS"
9864
9865fi
9866
9867
9868fi
9869
9870
Christian Heimesd0764e22007-12-04 15:00:33 +00009871# On Tru64, chflags seems to be present, but calling it will
9872# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9874$as_echo_n "checking for chflags... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009875if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009877else
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009879 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009880else
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009882/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009883
Christian Heimesd0764e22007-12-04 15:00:33 +00009884#include <sys/stat.h>
9885#include <unistd.h>
9886int main(int argc, char*argv[])
9887{
9888 if(chflags(argv[0], 0) != 0)
9889 return 1;
9890 return 0;
9891}
Ned Deily3eb67d52011-06-28 00:00:28 -07009892
Christian Heimesd0764e22007-12-04 15:00:33 +00009893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009894if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009895 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009896else
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9900 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009901fi
9902
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9906$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009907if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009908 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009909if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009910 ac_cv_have_chflags="yes"
9911else
9912 ac_cv_have_chflags="no"
9913fi
9914
9915fi
9916if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009917
Matthias Kloseb9621712010-04-24 17:59:49 +00009918$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009919
9920fi
9921
Matthias Kloseb9621712010-04-24 17:59:49 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9923$as_echo_n "checking for lchflags... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009924if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009926else
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009928 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009929else
Matthias Kloseb9621712010-04-24 17:59:49 +00009930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009931/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009932
Christian Heimesd0764e22007-12-04 15:00:33 +00009933#include <sys/stat.h>
9934#include <unistd.h>
9935int main(int argc, char*argv[])
9936{
9937 if(lchflags(argv[0], 0) != 0)
9938 return 1;
9939 return 0;
9940}
Ned Deily3eb67d52011-06-28 00:00:28 -07009941
Christian Heimesd0764e22007-12-04 15:00:33 +00009942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009943if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009944 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009945else
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9949 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009950fi
9951
9952
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9955$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009956if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009958if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009959 ac_cv_have_lchflags="yes"
9960else
9961 ac_cv_have_lchflags="no"
9962fi
9963
9964fi
9965if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009966
Matthias Kloseb9621712010-04-24 17:59:49 +00009967$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009968
9969fi
9970
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009971case $ac_sys_system/$ac_sys_release in
9972Darwin/*)
9973 _CUR_CFLAGS="${CFLAGS}"
9974 _CUR_LDFLAGS="${LDFLAGS}"
9975 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9976 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9977 ;;
9978esac
9979
Matthias Kloseb9621712010-04-24 17:59:49 +00009980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9981$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009982if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009984else
9985 ac_check_lib_save_LIBS=$LIBS
9986LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009988/* end confdefs.h. */
9989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990/* Override any GCC internal prototype to avoid an error.
9991 Use char because int might match the return type of a GCC
9992 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009993#ifdef __cplusplus
9994extern "C"
9995#endif
9996char inflateCopy ();
9997int
9998main ()
9999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010001 ;
10002 return 0;
10003}
10004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010005if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010006 ac_cv_lib_z_inflateCopy=yes
10007else
Matthias Kloseb9621712010-04-24 17:59:49 +000010008 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010010rm -f core conftest.err conftest.$ac_objext \
10011 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010012LIBS=$ac_check_lib_save_LIBS
10013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10015$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010016if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010019
10020fi
10021
10022
10023case $ac_sys_system/$ac_sys_release in
10024Darwin/*)
10025 CFLAGS="${_CUR_CFLAGS}"
10026 LDFLAGS="${_CUR_LDFLAGS}"
10027 ;;
10028esac
10029
Matthias Kloseb9621712010-04-24 17:59:49 +000010030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10031$as_echo_n "checking for hstrerror... " >&6; }
10032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010033/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010034
Martin v. Löwise9416172003-05-03 10:12:45 +000010035#include <netdb.h>
10036
Martin v. Löwise9416172003-05-03 10:12:45 +000010037int
10038main ()
10039{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010040void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010041 ;
10042 return 0;
10043}
10044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010048
Matthias Kloseb159a552010-04-25 21:00:44 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010050$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010051else
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010054
10055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010056rm -f core conftest.err conftest.$ac_objext \
10057 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058
Matthias Kloseb9621712010-04-24 17:59:49 +000010059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10060$as_echo_n "checking for inet_aton... " >&6; }
10061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010062/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010063
Martin v. Löwis86d66262006-02-17 08:40:11 +000010064#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010065#include <sys/socket.h>
10066#include <netinet/in.h>
10067#include <arpa/inet.h>
10068
Martin v. Löwise9416172003-05-03 10:12:45 +000010069int
10070main ()
10071{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010072void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010073 ;
10074 return 0;
10075}
10076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010078
Matthias Kloseb9621712010-04-24 17:59:49 +000010079$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010080
Matthias Kloseb159a552010-04-25 21:00:44 +000010081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010082$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010083else
Matthias Kloseb9621712010-04-24 17:59:49 +000010084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010086
10087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010088rm -f core conftest.err conftest.$ac_objext \
10089 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090
Matthias Kloseb9621712010-04-24 17:59:49 +000010091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10092$as_echo_n "checking for inet_pton... " >&6; }
10093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010094/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010095
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010096#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010097#include <sys/socket.h>
10098#include <netinet/in.h>
10099#include <arpa/inet.h>
10100
Martin v. Löwise9416172003-05-03 10:12:45 +000010101int
10102main ()
10103{
10104void* p = inet_pton
10105 ;
10106 return 0;
10107}
10108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010110
Matthias Kloseb9621712010-04-24 17:59:49 +000010111$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010112
Matthias Kloseb159a552010-04-25 21:00:44 +000010113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010114$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010115else
Matthias Kloseb9621712010-04-24 17:59:49 +000010116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010118
10119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010121
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010122# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10124$as_echo_n "checking for setgroups... " >&6; }
10125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010126/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010127
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010128#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010129#ifdef HAVE_GRP_H
10130#include <grp.h>
10131#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010132
Martin v. Löwisd5843682002-11-21 20:41:28 +000010133int
10134main ()
10135{
10136void* p = setgroups
10137 ;
10138 return 0;
10139}
10140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010141if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010142
Matthias Kloseb9621712010-04-24 17:59:49 +000010143$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010144
Matthias Kloseb159a552010-04-25 21:00:44 +000010145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010146$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010147else
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010150
10151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010154# check for openpty and forkpty
10155
10156for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010157do :
10158 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010159if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010161#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010162_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010163
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010164else
Matthias Kloseb9621712010-04-24 17:59:49 +000010165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10166$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010167if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010169else
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010171LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175/* Override any GCC internal prototype to avoid an error.
10176 Use char because int might match the return type of a GCC
10177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010178#ifdef __cplusplus
10179extern "C"
10180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010181char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010182int
10183main ()
10184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ;
10187 return 0;
10188}
10189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010192else
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010195rm -f core conftest.err conftest.$ac_objext \
10196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010197LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10200$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010201if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010203 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010204else
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10206$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010207if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010209else
10210 ac_check_lib_save_LIBS=$LIBS
10211LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213/* end confdefs.h. */
10214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215/* Override any GCC internal prototype to avoid an error.
10216 Use char because int might match the return type of a GCC
10217 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010218#ifdef __cplusplus
10219extern "C"
10220#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010221char openpty ();
10222int
10223main ()
10224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010226 ;
10227 return 0;
10228}
10229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010231 ac_cv_lib_bsd_openpty=yes
10232else
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010235rm -f core conftest.err conftest.$ac_objext \
10236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010237LIBS=$ac_check_lib_save_LIBS
10238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10240$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010241if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010243 LIBS="$LIBS -lbsd"
10244fi
10245
10246
10247fi
10248
Fred Drake8cef4cf2000-06-28 16:40:38 +000010249
10250fi
10251done
10252
10253for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010254do :
10255 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010256if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010258#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010259_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010260
Fred Drake8cef4cf2000-06-28 16:40:38 +000010261else
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10263$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010264if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010266else
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010268LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272/* Override any GCC internal prototype to avoid an error.
10273 Use char because int might match the return type of a GCC
10274 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010275#ifdef __cplusplus
10276extern "C"
10277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010278char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010279int
10280main ()
10281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010283 ;
10284 return 0;
10285}
10286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010287if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010289else
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010292rm -f core conftest.err conftest.$ac_objext \
10293 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010294LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10297$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010298if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010300 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010301else
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10303$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010304if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010306else
10307 ac_check_lib_save_LIBS=$LIBS
10308LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010310/* end confdefs.h. */
10311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010312/* Override any GCC internal prototype to avoid an error.
10313 Use char because int might match the return type of a GCC
10314 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010315#ifdef __cplusplus
10316extern "C"
10317#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010318char forkpty ();
10319int
10320main ()
10321{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010323 ;
10324 return 0;
10325}
10326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010327if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010328 ac_cv_lib_bsd_forkpty=yes
10329else
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010332rm -f core conftest.err conftest.$ac_objext \
10333 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010334LIBS=$ac_check_lib_save_LIBS
10335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10337$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010338if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010339 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010340 LIBS="$LIBS -lbsd"
10341fi
10342
10343
10344fi
10345
Fred Drake8cef4cf2000-06-28 16:40:38 +000010346
10347fi
10348done
10349
Jack Jansendd19cf82001-12-06 22:36:17 +000010350
Christian Heimesb186d002008-03-18 15:15:01 +000010351# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010352for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010353do :
10354 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010355if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010356 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010357#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010358_ACEOF
10359
10360fi
10361done
10362
10363
Michael W. Hudson54241132001-12-07 15:38:26 +000010364# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010365for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010366do :
10367 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10368ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010369if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010371#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010372_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010373
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010374fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010375done
10376
Michael W. Hudson54241132001-12-07 15:38:26 +000010377
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010378ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010379if test "x$ac_cv_func_dup2" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010380 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010381
Martin v. Löwis1142de32002-03-29 16:28:31 +000010382else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010384 *" dup2.$ac_objext "* ) ;;
10385 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010386 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010387esac
10388
Martin v. Löwis1142de32002-03-29 16:28:31 +000010389fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010390
10391ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010392if test "x$ac_cv_func_getcwd" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010393 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10394
10395else
10396 case " $LIBOBJS " in
10397 *" getcwd.$ac_objext "* ) ;;
10398 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10399 ;;
10400esac
10401
10402fi
10403
10404ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010405if test "x$ac_cv_func_strdup" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010406 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10407
10408else
10409 case " $LIBOBJS " in
10410 *" strdup.$ac_objext "* ) ;;
10411 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10412 ;;
10413esac
10414
10415fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010416
10417
10418for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010419do :
10420 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010421if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010426/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010427#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010428int
10429main ()
10430{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010431getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010432 ;
10433 return 0;
10434}
10435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010437
Matthias Kloseb9621712010-04-24 17:59:49 +000010438$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010439
Guido van Rossum627b2d71993-12-24 10:39:16 +000010440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010442
Guido van Rossum627b2d71993-12-24 10:39:16 +000010443fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010444done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010445
Jack Jansen150753c2003-03-29 22:07:47 +000010446for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010447do :
10448 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010449if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010450 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010451#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010454/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010455#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010456int
10457main ()
10458{
10459setpgrp(0,0);
10460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010465
Matthias Kloseb9621712010-04-24 17:59:49 +000010466$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010467
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010470
10471fi
10472done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010473
Thomas Wouters3a584202000-08-05 23:28:51 +000010474for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010475do :
10476 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010477if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010478 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010479#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010482/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010483#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010484int
10485main ()
10486{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010487gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 ;
10489 return 0;
10490}
10491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010492if ac_fn_c_try_compile "$LINENO"; then :
10493
Guido van Rossum627b2d71993-12-24 10:39:16 +000010494else
Skip Montanaro6dead952003-09-25 14:50:04 +000010495
Matthias Kloseb9621712010-04-24 17:59:49 +000010496$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010497
Martin v. Löwis11437992002-04-12 09:54:03 +000010498
Guido van Rossum627b2d71993-12-24 10:39:16 +000010499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010501
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010502fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010503done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010504
Michael W. Hudson54241132001-12-07 15:38:26 +000010505
Matthias Kloseb9621712010-04-24 17:59:49 +000010506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10507$as_echo_n "checking for major... " >&6; }
10508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010509/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010510
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010511#if defined(MAJOR_IN_MKDEV)
10512#include <sys/mkdev.h>
10513#elif defined(MAJOR_IN_SYSMACROS)
10514#include <sys/sysmacros.h>
10515#else
10516#include <sys/types.h>
10517#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010518
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010519int
10520main ()
10521{
10522
10523 makedev(major(0),minor(0));
10524
10525 ;
10526 return 0;
10527}
10528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010530
10531
Matthias Kloseb9621712010-04-24 17:59:49 +000010532$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010533
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10535$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010536
10537else
Skip Montanaro6dead952003-09-25 14:50:04 +000010538
Matthias Kloseb9621712010-04-24 17:59:49 +000010539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10540$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010541
10542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010543rm -f core conftest.err conftest.$ac_objext \
10544 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010545
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010546# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010547# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10549$as_echo_n "checking for getaddrinfo... " >&6; }
10550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010551/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010552
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010553#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010554#include <sys/socket.h>
10555#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010556#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010557
Martin v. Löwis11437992002-04-12 09:54:03 +000010558int
10559main ()
10560{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010561getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010562 ;
10563 return 0;
10564}
10565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010566if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010567 have_getaddrinfo=yes
10568else
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010571rm -f core conftest.err conftest.$ac_objext \
10572 conftest$ac_exeext conftest.$ac_ext
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10574$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010575if test $have_getaddrinfo = yes
10576then
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10578$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010579 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010581else
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010583 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010584else
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010586/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010587
10588#include <sys/types.h>
10589#include <netdb.h>
10590#include <string.h>
10591#include <sys/socket.h>
10592#include <netinet/in.h>
10593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010594int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010595{
10596 int passive, gaierr, inet4 = 0, inet6 = 0;
10597 struct addrinfo hints, *ai, *aitop;
10598 char straddr[INET6_ADDRSTRLEN], strport[16];
10599
10600 for (passive = 0; passive <= 1; passive++) {
10601 memset(&hints, 0, sizeof(hints));
10602 hints.ai_family = AF_UNSPEC;
10603 hints.ai_flags = passive ? AI_PASSIVE : 0;
10604 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010605 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010606 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10607 (void)gai_strerror(gaierr);
10608 goto bad;
10609 }
10610 for (ai = aitop; ai; ai = ai->ai_next) {
10611 if (ai->ai_addr == NULL ||
10612 ai->ai_addrlen == 0 ||
10613 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10614 straddr, sizeof(straddr), strport, sizeof(strport),
10615 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10616 goto bad;
10617 }
10618 switch (ai->ai_family) {
10619 case AF_INET:
10620 if (strcmp(strport, "54321") != 0) {
10621 goto bad;
10622 }
10623 if (passive) {
10624 if (strcmp(straddr, "0.0.0.0") != 0) {
10625 goto bad;
10626 }
10627 } else {
10628 if (strcmp(straddr, "127.0.0.1") != 0) {
10629 goto bad;
10630 }
10631 }
10632 inet4++;
10633 break;
10634 case AF_INET6:
10635 if (strcmp(strport, "54321") != 0) {
10636 goto bad;
10637 }
10638 if (passive) {
10639 if (strcmp(straddr, "::") != 0) {
10640 goto bad;
10641 }
10642 } else {
10643 if (strcmp(straddr, "::1") != 0) {
10644 goto bad;
10645 }
10646 }
10647 inet6++;
10648 break;
10649 case AF_UNSPEC:
10650 goto bad;
10651 break;
10652 default:
10653 /* another family support? */
10654 break;
10655 }
10656 }
10657 }
10658
10659 if (!(inet4 == 0 || inet4 == 2))
10660 goto bad;
10661 if (!(inet6 == 0 || inet6 == 2))
10662 goto bad;
10663
10664 if (aitop)
10665 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010666 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010667
10668 bad:
10669 if (aitop)
10670 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010671 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010672}
10673
Martin v. Löwis11437992002-04-12 09:54:03 +000010674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010675if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010676 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010677else
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010684fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010685
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10689$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10690
Mark Dickinson2df5d282009-12-31 21:22:50 +000010691if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010692then
10693 if test $ipv6 = yes
10694 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010695 echo 'Fatal: You must get working getaddrinfo() function.'
10696 echo ' or you can specify "--disable-ipv6"'.
10697 exit 1
10698 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010699else
Martin v. Löwis11437992002-04-12 09:54:03 +000010700
Matthias Kloseb9621712010-04-24 17:59:49 +000010701$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010702
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010703fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010704
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010705for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010706do :
10707 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010708if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010710#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010711_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010712
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010713fi
10714done
10715
Michael W. Hudson54241132001-12-07 15:38:26 +000010716
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010717# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10719$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010720if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010722else
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010724/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010725#include <sys/types.h>
10726#include <sys/time.h>
10727#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010728
Martin v. Löwis11437992002-04-12 09:54:03 +000010729int
10730main ()
10731{
10732if ((struct tm *) 0)
10733return 0;
10734 ;
10735 return 0;
10736}
10737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010738if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010739 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010740else
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10746$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010747if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010750
10751fi
10752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10754$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010755if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010757else
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010759/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010760#include <sys/types.h>
10761#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010762
Martin v. Löwis11437992002-04-12 09:54:03 +000010763int
10764main ()
10765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010766struct tm tm;
10767 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 ;
10770 return 0;
10771}
10772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010773if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010774 ac_cv_struct_tm=time.h
10775else
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10781$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010782if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010785
10786fi
10787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788ac_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 +000010789#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010790
Matthias Kloseb9621712010-04-24 17:59:49 +000010791"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010792if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010793
10794cat >>confdefs.h <<_ACEOF
10795#define HAVE_STRUCT_TM_TM_ZONE 1
10796_ACEOF
10797
10798
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010799fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010800
Martin v. Löwis11437992002-04-12 09:54:03 +000010801if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10802
Matthias Kloseb9621712010-04-24 17:59:49 +000010803$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010804
10805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10807"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010808if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010810else
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812fi
10813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010814cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010815#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816_ACEOF
10817
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10819$as_echo_n "checking for tzname... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010820if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010822else
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010824/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010825#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010826#if !HAVE_DECL_TZNAME
10827extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010829
Martin v. Löwis11437992002-04-12 09:54:03 +000010830int
10831main ()
10832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010833return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010834 ;
10835 return 0;
10836}
10837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010838if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010839 ac_cv_var_tzname=yes
10840else
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010843rm -f core conftest.err conftest.$ac_objext \
10844 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10847$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010848 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010852 fi
10853fi
10854
Matthias Kloseb9621712010-04-24 17:59:49 +000010855ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010856if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010857
10858cat >>confdefs.h <<_ACEOF
10859#define HAVE_STRUCT_STAT_ST_RDEV 1
10860_ACEOF
10861
10862
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010863fi
10864
Matthias Kloseb9621712010-04-24 17:59:49 +000010865ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010866if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010867
Martin v. Löwis11437992002-04-12 09:54:03 +000010868cat >>confdefs.h <<_ACEOF
10869#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10870_ACEOF
10871
10872
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010873fi
10874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010876if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010877
10878cat >>confdefs.h <<_ACEOF
10879#define HAVE_STRUCT_STAT_ST_FLAGS 1
10880_ACEOF
10881
10882
10883fi
10884
Matthias Kloseb9621712010-04-24 17:59:49 +000010885ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010886if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010887
10888cat >>confdefs.h <<_ACEOF
10889#define HAVE_STRUCT_STAT_ST_GEN 1
10890_ACEOF
10891
10892
10893fi
10894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010896if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010897
10898cat >>confdefs.h <<_ACEOF
10899#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10900_ACEOF
10901
10902
10903fi
10904
Matthias Kloseb9621712010-04-24 17:59:49 +000010905ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010906if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010907
Martin v. Löwis11437992002-04-12 09:54:03 +000010908cat >>confdefs.h <<_ACEOF
10909#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10910_ACEOF
10911
10912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010914
10915else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010917 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010918 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10919 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010920esac
10921
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010922fi
10923
Michael W. Hudson54241132001-12-07 15:38:26 +000010924
Martin v. Löwis11437992002-04-12 09:54:03 +000010925
Matthias Kloseb9621712010-04-24 17:59:49 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10927$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010928if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010930else
Matthias Kloseb159a552010-04-25 21:00:44 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010933/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010934#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010935int
10936main ()
10937{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010938return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010939 ;
10940 return 0;
10941}
10942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010943if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010944 ac_cv_header_time_altzone=yes
10945else
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950fi
10951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10953$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010954if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957
10958fi
10959
Guido van Rossumda88dad1995-01-26 00:46:29 +000010960was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10962$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010964/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010965
10966#include <sys/types.h>
10967#include <sys/select.h>
10968#include <sys/time.h>
10969
Martin v. Löwis11437992002-04-12 09:54:03 +000010970int
10971main ()
10972{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010973;
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 ;
10975 return 0;
10976}
10977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
10980
Matthias Kloseb9621712010-04-24 17:59:49 +000010981$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010982
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010983 was_it_defined=yes
10984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10988$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10991$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010992if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010994else
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010996/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010997#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010998int
10999main ()
11000{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011001struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 ;
11003 return 0;
11004}
11005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011006if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011007 ac_cv_struct_addrinfo=yes
11008else
Matthias Kloseb9621712010-04-24 17:59:49 +000011009 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11012fi
11013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11015$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011016if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011019
11020fi
11021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11023$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011024if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011026else
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011028/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011029
11030# include <sys/types.h>
11031# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011032int
11033main ()
11034{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011035struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 ;
11037 return 0;
11038}
11039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011040if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011041 ac_cv_struct_sockaddr_storage=yes
11042else
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11046fi
11047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11049$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011050if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011051
Matthias Kloseb9621712010-04-24 17:59:49 +000011052$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011053
11054fi
11055
Guido van Rossum627b2d71993-12-24 10:39:16 +000011056# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011057
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11059$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011060if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011062else
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011065$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011066int
11067main ()
11068{
11069static int test_array [1 - 2 * !(((char) -1) < 0)];
11070test_array [0] = 0
11071
11072 ;
11073 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011074}
Martin v. Löwis11437992002-04-12 09:54:03 +000011075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011076if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011077 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011078else
Matthias Kloseb9621712010-04-24 17:59:49 +000011079 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11084$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011085if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011087
11088fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11091$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011092if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011094else
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011096/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011097
Martin v. Löwis11437992002-04-12 09:54:03 +000011098int
11099main ()
11100{
11101/* FIXME: Include the comments suggested by Paul. */
11102#ifndef __cplusplus
11103 /* Ultrix mips cc rejects this. */
11104 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011107 char const *const *pcpcc;
11108 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 /* NEC SVR4.0.2 mips cc rejects this. */
11110 struct point {int x, y;};
11111 static struct point const zero = {0,0};
11112 /* AIX XL C 1.02.0.0 rejects this.
11113 It does not let you subtract one const X* pointer from another in
11114 an arm of an if-expression whose if-part is not a constant
11115 expression */
11116 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011119 ++pcpcc;
11120 ppc = (char**) pcpcc;
11121 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 { /* SCO 3.2v4 cc rejects this. */
11123 char *t;
11124 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011127 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 }
11129 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11130 int x[] = {25, 17};
11131 const int *foo = &x[0];
11132 ++foo;
11133 }
11134 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11135 typedef const int *iptr;
11136 iptr p = 0;
11137 ++p;
11138 }
11139 { /* AIX XL C 1.02.0.0 rejects this saying
11140 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11141 struct s { int j; const int *ap[3]; };
11142 struct s *b; b->j = 5;
11143 }
11144 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11145 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011149#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 ;
11152 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011153}
Martin v. Löwis11437992002-04-12 09:54:03 +000011154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011155if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011156 ac_cv_c_const=yes
11157else
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11163$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011164if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011165
Matthias Kloseb9621712010-04-24 17:59:49 +000011166$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011167
11168fi
11169
Michael W. Hudson54241132001-12-07 15:38:26 +000011170
Guido van Rossumda88dad1995-01-26 00:46:29 +000011171works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11173$as_echo_n "checking for working volatile... " >&6; }
11174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011175/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011176
Martin v. Löwis11437992002-04-12 09:54:03 +000011177int
11178main ()
11179{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 ;
11182 return 0;
11183}
11184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011185if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011186 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011187else
Skip Montanaro6dead952003-09-25 14:50:04 +000011188
Matthias Kloseb9621712010-04-24 17:59:49 +000011189$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011190
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011191
Guido van Rossum627b2d71993-12-24 10:39:16 +000011192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11195$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011196
Guido van Rossumda88dad1995-01-26 00:46:29 +000011197works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11199$as_echo_n "checking for working signed char... " >&6; }
11200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011201/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011202
Martin v. Löwis11437992002-04-12 09:54:03 +000011203int
11204main ()
11205{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 ;
11208 return 0;
11209}
11210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011211if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011212 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011213else
Skip Montanaro6dead952003-09-25 14:50:04 +000011214
Matthias Kloseb9621712010-04-24 17:59:49 +000011215$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011216
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011217
Guido van Rossum7f43da71994-08-01 12:15:30 +000011218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11221$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011222
Guido van Rossumda88dad1995-01-26 00:46:29 +000011223have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11225$as_echo_n "checking for prototypes... " >&6; }
11226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011227/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011228int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011229int
11230main ()
11231{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011232return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ;
11234 return 0;
11235}
11236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Matthias Kloseb159a552010-04-25 21:00:44 +000011241 have_prototypes=yes
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: $have_prototypes" >&5
11245$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011246
Guido van Rossumda88dad1995-01-26 00:46:29 +000011247works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11249$as_echo_n "checking for variable length prototypes and stdarg.h... " >&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 +000011252
11253#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011254int foo(int x, ...) {
11255 va_list va;
11256 va_start(va, x);
11257 va_arg(va, int);
11258 va_arg(va, char *);
11259 va_arg(va, double);
11260 return 0;
11261}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011262
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Guido van Rossum90eea071996-08-30 20:58:57 +000011266return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 ;
11268 return 0;
11269}
11270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
11273
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011276 works=yes
11277
Guido van Rossum627b2d71993-12-24 10:39:16 +000011278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11281$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011282
Martin v. Löwisd6320502004-08-12 13:45:08 +000011283# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11285$as_echo_n "checking for socketpair... " >&6; }
11286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011287/* end confdefs.h. */
11288
11289#include <sys/types.h>
11290#include <sys/socket.h>
11291
11292int
11293main ()
11294{
11295void *x=socketpair
11296 ;
11297 return 0;
11298}
11299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011301
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011303
Matthias Kloseb159a552010-04-25 21:00:44 +000011304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011306else
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11308$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011309
11310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011312
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011313# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11315$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011318#include <sys/types.h>
11319#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011320int
11321main ()
11322{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011323struct sockaddr x;
11324x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 ;
11326 return 0;
11327}
11328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011329if ac_fn_c_try_compile "$LINENO"; then :
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11331$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011334
11335else
Matthias Kloseb9621712010-04-24 17:59:49 +000011336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11337$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011338
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011341
Guido van Rossumda88dad1995-01-26 00:46:29 +000011342va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11344$as_echo_n "checking whether va_list is an array... " >&6; }
11345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011347
11348#ifdef HAVE_STDARG_PROTOTYPES
11349#include <stdarg.h>
11350#else
11351#include <varargs.h>
11352#endif
11353
Martin v. Löwis11437992002-04-12 09:54:03 +000011354int
11355main ()
11356{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011357va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011358 ;
11359 return 0;
11360}
11361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011362if ac_fn_c_try_compile "$LINENO"; then :
11363
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011364else
Skip Montanaro6dead952003-09-25 14:50:04 +000011365
Martin v. Löwis11437992002-04-12 09:54:03 +000011366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Guido van Rossumda88dad1995-01-26 00:46:29 +000011369 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011370
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11374$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011375
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011376# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011377
11378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011380if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011381
Matthias Kloseb9621712010-04-24 17:59:49 +000011382 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11385$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011386 OLD_CFLAGS=$CFLAGS
11387 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011390
11391# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011396
11397 char *name;
11398 struct hostent *he, *res;
11399 char buffer[2048];
11400 int buflen = 2048;
11401 int h_errnop;
11402
11403 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011404
11405 ;
11406 return 0;
11407}
11408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011412
Martin v. Löwis11437992002-04-12 09:54:03 +000011413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011415
Matthias Kloseb9621712010-04-24 17:59:49 +000011416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11417$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011418
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011419else
Skip Montanaro6dead952003-09-25 14:50:04 +000011420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422$as_echo "no" >&6; }
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11424$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011426/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011427
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011428# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011429
Martin v. Löwis11437992002-04-12 09:54:03 +000011430int
11431main ()
11432{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011433
11434 char *name;
11435 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011436 char buffer[2048];
11437 int buflen = 2048;
11438 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011439
Matthias Kloseb159a552010-04-25 21:00:44 +000011440 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011441
11442 ;
11443 return 0;
11444}
11445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011449
Martin v. Löwis11437992002-04-12 09:54:03 +000011450
Matthias Kloseb159a552010-04-25 21:00:44 +000011451$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11454$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011456else
Skip Montanaro6dead952003-09-25 14:50:04 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11459$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11461$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11463/* end confdefs.h. */
11464
11465# include <netdb.h>
11466
11467int
11468main ()
11469{
11470
11471 char *name;
11472 struct hostent *he;
11473 struct hostent_data data;
11474
11475 (void) gethostbyname_r(name, he, &data);
11476
11477 ;
11478 return 0;
11479}
11480_ACEOF
11481if ac_fn_c_try_compile "$LINENO"; then :
11482
11483 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11484
11485
11486$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11487
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11489$as_echo "yes" >&6; }
11490
11491else
11492
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011498
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011504 CFLAGS=$OLD_CFLAGS
11505
11506else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011507
Matthias Kloseb9621712010-04-24 17:59:49 +000011508 for ac_func in gethostbyname
11509do :
11510 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011511if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011513#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011514_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011515
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011516fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011517done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011518
Michael W. Hudson54241132001-12-07 15:38:26 +000011519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011520fi
11521
Michael W. Hudson54241132001-12-07 15:38:26 +000011522
11523
11524
11525
11526
11527
Guido van Rossum627b2d71993-12-24 10:39:16 +000011528# checks for system services
11529# (none yet)
11530
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011531# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011532ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011533if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011534
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011535else
Matthias Kloseb9621712010-04-24 17:59:49 +000011536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11537$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011538if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011539 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011540else
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011542LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546/* Override any GCC internal prototype to avoid an error.
11547 Use char because int might match the return type of a GCC
11548 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011549#ifdef __cplusplus
11550extern "C"
11551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011552char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011553int
11554main ()
11555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ;
11558 return 0;
11559}
11560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011561if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011563else
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011566rm -f core conftest.err conftest.$ac_objext \
11567 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011568LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11571$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011572if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 cat >>confdefs.h <<_ACEOF
11574#define HAVE_LIBIEEE 1
11575_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011576
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011577 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011578
Guido van Rossum627b2d71993-12-24 10:39:16 +000011579fi
11580
Michael W. Hudson54241132001-12-07 15:38:26 +000011581
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011582fi
11583
Michael W. Hudson54241132001-12-07 15:38:26 +000011584
Guido van Rossum7f253911997-05-09 02:42:48 +000011585# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11587$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011590if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011592if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011593then
11594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11598$as_echo "yes" >&6; }
11599else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011601fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011602else
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11604$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605fi
11606
Guido van Rossum7f253911997-05-09 02:42:48 +000011607
Guido van Rossum7f43da71994-08-01 12:15:30 +000011608# check for --with-libm=...
11609
Guido van Rossum563e7081996-09-10 18:20:48 +000011610case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011611Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011612*) LIBM=-lm
11613esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11615$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011618if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011620if test "$withval" = no
11621then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11623$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011624elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011625then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11627$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011628else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011629fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011630else
Matthias Kloseb9621712010-04-24 17:59:49 +000011631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11632$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011633fi
11634
Guido van Rossum7f43da71994-08-01 12:15:30 +000011635
11636# check for --with-libc=...
11637
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11639$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011641# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011642if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011644if test "$withval" = no
11645then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11647$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011648elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011649then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11651$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011652else as_fn_error $? "proper usage is --with-libc=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 LIBC=\"$LIBC\"" >&5
11656$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657fi
11658
Guido van Rossum7f43da71994-08-01 12:15:30 +000011659
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011660# **************************************************
11661# * Check for various properties of floating point *
11662# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11665$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011666if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668else
11669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011671 ac_cv_little_endian_double=no
11672else
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011674/* end confdefs.h. */
11675
11676#include <string.h>
11677int main() {
11678 double x = 9006104071832581.0;
11679 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11680 return 0;
11681 else
11682 return 1;
11683}
11684
11685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011686if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687 ac_cv_little_endian_double=yes
11688else
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011693fi
11694
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695fi
11696
Matthias Kloseb9621712010-04-24 17:59:49 +000011697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11698$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699if test "$ac_cv_little_endian_double" = yes
11700then
11701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703
11704fi
11705
Matthias Kloseb9621712010-04-24 17:59:49 +000011706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11707$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011708if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710else
11711
Matthias Kloseb9621712010-04-24 17:59:49 +000011712if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713 ac_cv_big_endian_double=no
11714else
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716/* end confdefs.h. */
11717
11718#include <string.h>
11719int main() {
11720 double x = 9006104071832581.0;
11721 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11722 return 0;
11723 else
11724 return 1;
11725}
11726
11727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011728if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011729 ac_cv_big_endian_double=yes
11730else
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011735fi
11736
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737fi
11738
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11740$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741if test "$ac_cv_big_endian_double" = yes
11742then
11743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011745
11746fi
11747
11748# Some ARM platforms use a mixed-endian representation for doubles.
11749# While Python doesn't currently have full support for these platforms
11750# (see e.g., issue 1762561), we can at least make sure that float <-> string
11751# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11753$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011754if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011756else
11757
Matthias Kloseb9621712010-04-24 17:59:49 +000011758if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011759 ac_cv_mixed_endian_double=no
11760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011762/* end confdefs.h. */
11763
11764#include <string.h>
11765int main() {
11766 double x = 9006104071832581.0;
11767 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11768 return 0;
11769 else
11770 return 1;
11771}
11772
11773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011774if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011775 ac_cv_mixed_endian_double=yes
11776else
Matthias Kloseb9621712010-04-24 17:59:49 +000011777 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011781fi
11782
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783fi
11784
Matthias Kloseb9621712010-04-24 17:59:49 +000011785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11786$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787if test "$ac_cv_mixed_endian_double" = yes
11788then
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791
11792fi
11793
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011794# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011795# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011796# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011797# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011798# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011799# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011800
11801# This inline assembler syntax may also work for suncc and icc,
11802# so we try it on all platforms.
11803
Matthias Kloseb9621712010-04-24 17:59:49 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11805$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807/* end confdefs.h. */
11808
11809int
11810main ()
11811{
11812
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011813 unsigned short cw;
11814 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11815 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011816
11817 ;
11818 return 0;
11819}
11820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011821if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011822 have_gcc_asm_for_x87=yes
11823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011825fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11828$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011829if test "$have_gcc_asm_for_x87" = yes
11830then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011833
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011835
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011836# Detect whether system arithmetic is subject to x87-style double
11837# rounding issues. The result of this test has little meaning on non
11838# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11839# mode is round-to-nearest and double rounding issues are present, and
11840# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11842$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011843# $BASECFLAGS may affect the result
11844ac_save_cc="$CC"
11845CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011846if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011847 ac_cv_x87_double_rounding=no
11848else
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011850/* end confdefs.h. */
11851
11852#include <stdlib.h>
11853#include <math.h>
11854int main() {
11855 volatile double x, y, z;
11856 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11857 x = 0.99999999999999989; /* 1-2**-53 */
11858 y = 1./x;
11859 if (y != 1.)
11860 exit(0);
11861 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11862 x = 1e16;
11863 y = 2.99999;
11864 z = x + y;
11865 if (z != 1e16+4.)
11866 exit(0);
11867 /* both tests show evidence of double rounding */
11868 exit(1);
11869}
11870
11871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011872if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011873 ac_cv_x87_double_rounding=no
11874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011879fi
11880
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011881CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11883$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011884if test "$ac_cv_x87_double_rounding" = yes
11885then
11886
Matthias Kloseb9621712010-04-24 17:59:49 +000011887$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011888
11889fi
11890
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011891# ************************************
11892# * Check for mathematical functions *
11893# ************************************
11894
11895LIBS_SAVE=$LIBS
11896LIBS="$LIBS $LIBM"
11897
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011898for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11899do :
11900 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11901ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011902if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011903 cat >>confdefs.h <<_ACEOF
11904#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11905_ACEOF
11906
11907fi
11908done
11909
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011910for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011911do :
11912 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11913ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011914if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011915 cat >>confdefs.h <<_ACEOF
11916#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11917_ACEOF
11918
11919fi
11920done
11921
11922ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11923"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011924if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011925 ac_have_decl=1
11926else
11927 ac_have_decl=0
11928fi
11929
11930cat >>confdefs.h <<_ACEOF
11931#define HAVE_DECL_ISINF $ac_have_decl
11932_ACEOF
11933ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11934"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011935if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011936 ac_have_decl=1
11937else
11938 ac_have_decl=0
11939fi
11940
11941cat >>confdefs.h <<_ACEOF
11942#define HAVE_DECL_ISNAN $ac_have_decl
11943_ACEOF
11944ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11945"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011946if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011947 ac_have_decl=1
11948else
11949 ac_have_decl=0
11950fi
11951
11952cat >>confdefs.h <<_ACEOF
11953#define HAVE_DECL_ISFINITE $ac_have_decl
11954_ACEOF
11955
11956
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011957# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11958# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11960$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011961if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011963else
11964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011966 ac_cv_tanh_preserves_zero_sign=no
11967else
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011969/* end confdefs.h. */
11970
11971#include <math.h>
11972#include <stdlib.h>
11973int main() {
11974 /* return 0 if either negative zeros don't exist
11975 on this platform or if negative zeros exist
11976 and tanh(-0.) == -0. */
11977 if (atan2(0., -1.) == atan2(-0., -1.) ||
11978 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11979 else exit(1);
11980}
11981
11982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011983if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011984 ac_cv_tanh_preserves_zero_sign=yes
11985else
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11989 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011990fi
11991
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011992fi
11993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11995$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011996if test "$ac_cv_tanh_preserves_zero_sign" = yes
11997then
11998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012000
12001fi
12002
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012003if test "$ac_cv_func_log1p" = yes
12004then
12005 # On some versions of AIX, log1p(-0.) returns 0. instead of
12006 # -0. See issue #9920.
12007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12008$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012009 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012010 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012011else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012012
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012013 if test "$cross_compiling" = yes; then :
12014 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012015else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12017/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012018
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012019 #include <math.h>
12020 #include <stdlib.h>
12021 int main() {
12022 /* Fail if the signs of log1p(-0.) and -0. can be
12023 distinguished. */
12024 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12025 return 0;
12026 else
12027 return 1;
12028 }
12029
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012030_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012031if ac_fn_c_try_run "$LINENO"; then :
12032 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012033else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012034 ac_cv_log1p_drops_zero_sign=yes
12035fi
12036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012038fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012039
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012040fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012041
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12043$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12044fi
12045if test "$ac_cv_log1p_drops_zero_sign" = yes
12046then
12047
12048$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12049
12050fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012051
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012052LIBS=$LIBS_SAVE
12053
Mark Dickinsona614f042009-11-28 12:48:43 +000012054# For multiprocessing module, check that sem_open
12055# actually works. For FreeBSD versions <= 7.2,
12056# the kernel module that provides POSIX semaphores
12057# isn't loaded by default, so an attempt to call
12058# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12060$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012061if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012063else
Matthias Kloseb9621712010-04-24 17:59:49 +000012064 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012065 ac_cv_posix_semaphores_enabled=yes
12066else
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012068/* end confdefs.h. */
12069
12070#include <unistd.h>
12071#include <fcntl.h>
12072#include <stdio.h>
12073#include <semaphore.h>
12074#include <sys/stat.h>
12075
12076int main(void) {
12077 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12078 if (a == SEM_FAILED) {
12079 perror("sem_open");
12080 return 1;
12081 }
12082 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012083 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012084 return 0;
12085}
12086
12087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012088if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012089 ac_cv_posix_semaphores_enabled=yes
12090else
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12094 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012095fi
12096
12097
Mark Dickinsona614f042009-11-28 12:48:43 +000012098fi
12099
Matthias Kloseb9621712010-04-24 17:59:49 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12101$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012102if test $ac_cv_posix_semaphores_enabled = no
12103then
12104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012106
12107fi
12108
Mark Dickinson10683072009-04-18 21:18:19 +000012109# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12111$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012112if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012116 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012119/* end confdefs.h. */
12120
12121#include <unistd.h>
12122#include <fcntl.h>
12123#include <stdio.h>
12124#include <semaphore.h>
12125#include <sys/stat.h>
12126
12127int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012128 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012129 int count;
12130 int res;
12131 if(a==SEM_FAILED){
12132 perror("sem_open");
12133 return 1;
12134
12135 }
12136 res = sem_getvalue(a, &count);
12137 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012138 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012139 return res==-1 ? 1 : 0;
12140}
12141
Mark Dickinson10683072009-04-18 21:18:19 +000012142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012143if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012144 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12149 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012150fi
12151
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012152
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012153fi
12154
Matthias Kloseb9621712010-04-24 17:59:49 +000012155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12156$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012157if test $ac_cv_broken_sem_getvalue = yes
12158then
12159
Matthias Kloseb9621712010-04-24 17:59:49 +000012160$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012161
12162fi
12163
Mark Dickinsonbd792642009-03-18 20:06:12 +000012164# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12166$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012167# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012168if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012169 enableval=$enable_big_digits; case $enable_big_digits in
12170yes)
12171 enable_big_digits=30 ;;
12172no)
12173 enable_big_digits=15 ;;
1217415|30)
12175 ;;
12176*)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012177 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 +000012178esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12180$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012181
12182cat >>confdefs.h <<_ACEOF
12183#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12184_ACEOF
12185
12186
12187else
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12189$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012190fi
12191
12192
Guido van Rossumef2255b2000-03-10 22:30:29 +000012193# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012194ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012195if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012196
12197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012199
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012200 wchar_h="yes"
12201
Guido van Rossumef2255b2000-03-10 22:30:29 +000012202else
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012204
12205fi
12206
Michael W. Hudson54241132001-12-07 15:38:26 +000012207
Martin v. Löwis11437992002-04-12 09:54:03 +000012208
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012209# determine wchar_t size
12210if test "$wchar_h" = yes
12211then
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12215# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12217$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012218if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012220else
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12222"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012223
Martin v. Löwis11437992002-04-12 09:54:03 +000012224else
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 if test "$ac_cv_type_wchar_t" = yes; then
12226 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12227$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012228as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012229See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230 else
12231 ac_cv_sizeof_wchar_t=0
12232 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012234
Martin v. Löwis11437992002-04-12 09:54:03 +000012235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12237$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012238
12239
12240
Martin v. Löwis11437992002-04-12 09:54:03 +000012241cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012242#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012243_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012244
Michael W. Hudson54241132001-12-07 15:38:26 +000012245
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012246fi
12247
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12249$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012250have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012252/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012253
12254#include <tcl.h>
12255#if TCL_UTF_MAX != 6
12256# error "NOT UCS4_TCL"
12257#endif
12258int
12259main ()
12260{
12261
12262 ;
12263 return 0;
12264}
12265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012267
12268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012270
12271 have_ucs4_tcl=yes
12272
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12276$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012277
Skip Montanaro6dead952003-09-25 14:50:04 +000012278# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012279if test "$wchar_h" = yes
12280then
12281 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12283$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012284 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012286else
12287
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012289 ac_cv_wchar_t_signed=yes
12290else
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012292/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012293
12294 #include <wchar.h>
12295 int main()
12296 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012297 /* Success: exit code 0 */
12298 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012299 }
12300
12301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012302if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012303 ac_cv_wchar_t_signed=yes
12304else
Matthias Kloseb9621712010-04-24 17:59:49 +000012305 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12308 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012309fi
12310
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012311fi
12312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12314$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315fi
12316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12318$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012319
12320# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012321if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012322 withval=$with_wide_unicode;
12323if test "$withval" != no
12324then unicode_size="4"
12325else unicode_size="2"
12326fi
12327
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012328else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012329
Georg Brandl52d168a2008-01-07 18:10:24 +000012330case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012331 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012332 *) unicode_size="2" ;;
12333esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012334
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012335fi
12336
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012337
12338
Georg Brandl52d168a2008-01-07 18:10:24 +000012339case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012340 4)
12341 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12342
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012343 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012344 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012346 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012347esac
12348
Michael W. Hudson54241132001-12-07 15:38:26 +000012349
Martin v. Löwis11437992002-04-12 09:54:03 +000012350
Georg Brandl52d168a2008-01-07 18:10:24 +000012351# wchar_t is only usable if it maps to an unsigned type
12352if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012353 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012354then
12355 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012358
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012360
Georg Brandl52d168a2008-01-07 18:10:24 +000012361elif test "$ac_cv_sizeof_short" = "$unicode_size"
12362then
12363 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012365
Georg Brandl52d168a2008-01-07 18:10:24 +000012366elif test "$ac_cv_sizeof_long" = "$unicode_size"
12367then
12368 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012370
Georg Brandl52d168a2008-01-07 18:10:24 +000012371else
12372 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12375$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012376
12377# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12379$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012380if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012382else
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 ac_cv_c_bigendian=unknown
12384 # See if we're dealing with a universal compiler.
12385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12386/* end confdefs.h. */
12387#ifndef __APPLE_CC__
12388 not a universal capable compiler
12389 #endif
12390 typedef int dummy;
12391
Skip Montanaro6dead952003-09-25 14:50:04 +000012392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393if ac_fn_c_try_compile "$LINENO"; then :
12394
12395 # Check for potential -arch flags. It is not universal unless
12396 # there are at least two -arch flags with different values.
12397 ac_arch=
12398 ac_prev=
12399 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12400 if test -n "$ac_prev"; then
12401 case $ac_word in
12402 i?86 | x86_64 | ppc | ppc64)
12403 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12404 ac_arch=$ac_word
12405 else
12406 ac_cv_c_bigendian=universal
12407 break
12408 fi
12409 ;;
12410 esac
12411 ac_prev=
12412 elif test "x$ac_word" = "x-arch"; then
12413 ac_prev=arch
12414 fi
12415 done
12416fi
12417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12418 if test $ac_cv_c_bigendian = unknown; then
12419 # See if sys/param.h defines the BYTE_ORDER macro.
12420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012421/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012422#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012424
Martin v. Löwis11437992002-04-12 09:54:03 +000012425int
12426main ()
12427{
Matthias Kloseb9621712010-04-24 17:59:49 +000012428#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12429 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12430 && LITTLE_ENDIAN)
12431 bogus endian macros
12432 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
12434 ;
12435 return 0;
12436}
12437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012438if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012439 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012441/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012442#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012444
Martin v. Löwis11437992002-04-12 09:54:03 +000012445int
12446main ()
12447{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012448#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 not big endian
12450 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
12452 ;
12453 return 0;
12454}
12455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012457 ac_cv_c_bigendian=yes
12458else
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012462fi
12463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12464 fi
12465 if test $ac_cv_c_bigendian = unknown; then
12466 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012468/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012469#include <limits.h>
12470
Martin v. Löwis11437992002-04-12 09:54:03 +000012471int
12472main ()
12473{
Matthias Kloseb9621712010-04-24 17:59:49 +000012474#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12475 bogus endian macros
12476 #endif
12477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 ;
12479 return 0;
12480}
12481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012482if ac_fn_c_try_compile "$LINENO"; then :
12483 # It does; now see whether it defined to _BIG_ENDIAN or not.
12484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12485/* end confdefs.h. */
12486#include <limits.h>
12487
12488int
12489main ()
12490{
12491#ifndef _BIG_ENDIAN
12492 not big endian
12493 #endif
12494
12495 ;
12496 return 0;
12497}
12498_ACEOF
12499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012500 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012501else
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12505fi
12506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12507 fi
12508 if test $ac_cv_c_bigendian = unknown; then
12509 # Compile a test program.
12510 if test "$cross_compiling" = yes; then :
12511 # Try to guess by grepping values from an object file.
12512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12513/* end confdefs.h. */
12514short int ascii_mm[] =
12515 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12516 short int ascii_ii[] =
12517 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12518 int use_ascii (int i) {
12519 return ascii_mm[i] + ascii_ii[i];
12520 }
12521 short int ebcdic_ii[] =
12522 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12523 short int ebcdic_mm[] =
12524 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12525 int use_ebcdic (int i) {
12526 return ebcdic_mm[i] + ebcdic_ii[i];
12527 }
12528 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529
Matthias Kloseb9621712010-04-24 17:59:49 +000012530int
12531main ()
12532{
12533return use_ascii (foo) == use_ebcdic (foo);
12534 ;
12535 return 0;
12536}
12537_ACEOF
12538if ac_fn_c_try_compile "$LINENO"; then :
12539 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12540 ac_cv_c_bigendian=yes
12541 fi
12542 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12543 if test "$ac_cv_c_bigendian" = unknown; then
12544 ac_cv_c_bigendian=no
12545 else
12546 # finding both strings is unlikely to happen, but who knows?
12547 ac_cv_c_bigendian=unknown
12548 fi
12549 fi
12550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012552else
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012554/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012556int
12557main ()
12558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 /* Are we little or big endian? From Harbison&Steele. */
12561 union
12562 {
12563 long int l;
12564 char c[sizeof (long int)];
12565 } u;
12566 u.l = 1;
12567 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568
12569 ;
12570 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012571}
Martin v. Löwis11437992002-04-12 09:54:03 +000012572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012573if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012574 ac_cv_c_bigendian=no
12575else
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12585$as_echo "$ac_cv_c_bigendian" >&6; }
12586 case $ac_cv_c_bigendian in #(
12587 yes)
12588 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12589;; #(
12590 no)
12591 ;; #(
12592 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012595
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 ;; #(
12597 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012598 as_fn_error $? "unknown endianness
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012599 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012601
Michael W. Hudson54241132001-12-07 15:38:26 +000012602
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012603# ABI version string for Python extension modules. This appears between the
12604# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12605# from the following attributes which affect the ABI of this Python build (in
12606# this order):
12607#
12608# * The Python implementation (always 'cpython-' for us)
12609# * The major and minor version numbers
12610# * --with-pydebug (adds a 'd')
12611# * --with-pymalloc (adds a 'm')
12612# * --with-wide-unicode (adds a 'u')
12613#
12614# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012615# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12616# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012617
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12619$as_echo_n "checking ABIFLAGS... " >&6; }
12620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12621$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12623$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012624SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12626$as_echo "$SOABI" >&6; }
12627
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12629$as_echo_n "checking LDVERSION... " >&6; }
12630LDVERSION='$(VERSION)$(ABIFLAGS)'
12631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12632$as_echo "$LDVERSION" >&6; }
12633
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012634# SO is the extension of shared libraries `(including the dot!)
12635# -- usually .so, .sl on HP-UX, .dll on Cygwin
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12637$as_echo_n "checking SO... " >&6; }
12638if test -z "$SO"
12639then
12640 case $ac_sys_system in
12641 hp*|HP*)
12642 case `uname -m` in
12643 ia64) SO=.so;;
12644 *) SO=.sl;;
12645 esac
12646 ;;
12647 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012648 Linux*|GNU*)
12649 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012650 *) SO=.so;;
12651 esac
12652else
12653 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012654 echo
12655 echo '====================================================================='
12656 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012657 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012658 echo '+ Do you really mean to change the extension for shared libraries? +'
12659 echo '+ Continuing in 10 seconds to let you to ponder. +'
12660 echo '+ +'
12661 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012662 sleep 10
12663fi
12664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12665$as_echo "$SO" >&6; }
12666
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012667# Check whether right shifting a negative integer extends the sign bit
12668# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12670$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012671if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012673else
Martin v. Löwis11437992002-04-12 09:54:03 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012676 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012677else
Matthias Kloseb9621712010-04-24 17:59:49 +000012678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012679/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012680
12681int main()
12682{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012683 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012684}
12685
Martin v. Löwis11437992002-04-12 09:54:03 +000012686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012687if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012688 ac_cv_rshift_extends_sign=yes
12689else
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12693 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012694fi
12695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696fi
12697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12699$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012700if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012701then
Martin v. Löwis11437992002-04-12 09:54:03 +000012702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012704
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012705fi
12706
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012707# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12709$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012710if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012712else
Martin v. Löwis11437992002-04-12 09:54:03 +000012713
Matthias Kloseb9621712010-04-24 17:59:49 +000012714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012715/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012716#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012717int
12718main ()
12719{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012720
12721 FILE *f = fopen("/dev/null", "r");
12722 flockfile(f);
12723 getc_unlocked(f);
12724 funlockfile(f);
12725
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 ;
12727 return 0;
12728}
12729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012730if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012731 ac_cv_have_getc_unlocked=yes
12732else
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 ac_cv_have_getc_unlocked=no
12734fi
12735rm -f core conftest.err conftest.$ac_objext \
12736 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738
Matthias Kloseb9621712010-04-24 17:59:49 +000012739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12740$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012741if test "$ac_cv_have_getc_unlocked" = yes
12742then
Martin v. Löwis11437992002-04-12 09:54:03 +000012743
Matthias Kloseb9621712010-04-24 17:59:49 +000012744$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012745
12746fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012747
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012748# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012749# save the value of LIBS so we don't actually link Python with readline
12750LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012751
Gregory P. Smith18820942008-09-07 06:24:49 +000012752# On some systems we need to link readline to a termcap compatible
12753# library. NOTE: Keep the precedence of listed libraries synchronised
12754# with setup.py.
12755py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12757$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012758for py_libtermcap in "" ncursesw ncurses curses termcap; do
12759 if test -z "$py_libtermcap"; then
12760 READLINE_LIBS="-lreadline"
12761 else
12762 READLINE_LIBS="-lreadline -l$py_libtermcap"
12763 fi
12764 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012766/* end confdefs.h. */
12767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768/* Override any GCC internal prototype to avoid an error.
12769 Use char because int might match the return type of a GCC
12770 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012771#ifdef __cplusplus
12772extern "C"
12773#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012774char readline ();
12775int
12776main ()
12777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012779 ;
12780 return 0;
12781}
12782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012783if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012784 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012786rm -f core conftest.err conftest.$ac_objext \
12787 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012788 if test $py_cv_lib_readline = yes; then
12789 break
12790 fi
12791done
12792# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12793#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012794if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12796$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012797else
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12799$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012802
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012803fi
12804
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012805# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12807$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012808if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012810else
12811 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012812LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012814/* end confdefs.h. */
12815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012816/* Override any GCC internal prototype to avoid an error.
12817 Use char because int might match the return type of a GCC
12818 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012819#ifdef __cplusplus
12820extern "C"
12821#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012822char rl_callback_handler_install ();
12823int
12824main ()
12825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012827 ;
12828 return 0;
12829}
12830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012832 ac_cv_lib_readline_rl_callback_handler_install=yes
12833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836rm -f core conftest.err conftest.$ac_objext \
12837 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012838LIBS=$ac_check_lib_save_LIBS
12839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12841$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012842if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012843
Matthias Kloseb9621712010-04-24 17:59:49 +000012844$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012845
12846fi
12847
12848
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012849# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012851/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012852#include <readline/readline.h>
12853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012854if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012855 have_readline=yes
12856else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012857 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012858
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012859fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012860rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012861if test $have_readline = yes
12862then
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012865#include <readline/readline.h>
12866
12867_ACEOF
12868if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012872
12873fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012874rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012877/* end confdefs.h. */
12878#include <readline/readline.h>
12879
12880_ACEOF
12881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012885
12886fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012887rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012888
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012889fi
12890
Martin v. Löwis0daad592001-09-30 21:09:59 +000012891# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12893$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012894if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012896else
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012898LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902/* Override any GCC internal prototype to avoid an error.
12903 Use char because int might match the return type of a GCC
12904 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012905#ifdef __cplusplus
12906extern "C"
12907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012908char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012909int
12910main ()
12911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 ;
12914 return 0;
12915}
12916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012917if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012919else
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012922rm -f core conftest.err conftest.$ac_objext \
12923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012924LIBS=$ac_check_lib_save_LIBS
12925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12927$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012928if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012929
Matthias Kloseb9621712010-04-24 17:59:49 +000012930$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012931
Martin v. Löwis0daad592001-09-30 21:09:59 +000012932fi
12933
Michael W. Hudson54241132001-12-07 15:38:26 +000012934
Thomas Wouters89d996e2007-09-08 17:39:28 +000012935# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12937$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012938if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012940else
12941 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012942LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012944/* end confdefs.h. */
12945
12946/* Override any GCC internal prototype to avoid an error.
12947 Use char because int might match the return type of a GCC
12948 builtin and then its argument prototype would still apply. */
12949#ifdef __cplusplus
12950extern "C"
12951#endif
12952char rl_completion_display_matches_hook ();
12953int
12954main ()
12955{
12956return rl_completion_display_matches_hook ();
12957 ;
12958 return 0;
12959}
12960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012961if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012962 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12963else
Matthias Kloseb9621712010-04-24 17:59:49 +000012964 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012966rm -f core conftest.err conftest.$ac_objext \
12967 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012968LIBS=$ac_check_lib_save_LIBS
12969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12971$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012972if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012973
Matthias Kloseb9621712010-04-24 17:59:49 +000012974$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012975
12976fi
12977
12978
Martin v. Löwis0daad592001-09-30 21:09:59 +000012979# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12981$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012982if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012984else
Martin v. Löwis11437992002-04-12 09:54:03 +000012985 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012986LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990/* Override any GCC internal prototype to avoid an error.
12991 Use char because int might match the return type of a GCC
12992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012993#ifdef __cplusplus
12994extern "C"
12995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012996char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012997int
12998main ()
12999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013000return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 ;
13002 return 0;
13003}
13004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013005if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013007else
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013010rm -f core conftest.err conftest.$ac_objext \
13011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013012LIBS=$ac_check_lib_save_LIBS
13013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13015$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013016if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013019
Guido van Rossum353ae582001-07-10 16:45:32 +000013020fi
13021
Jack Jansendd19cf82001-12-06 22:36:17 +000013022
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013023# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013025/* end confdefs.h. */
13026#include <readline/readline.h>
13027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013028if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013029 have_readline=yes
13030else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013031 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013032
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013033fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013034rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035if test $have_readline = yes
13036then
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013038/* end confdefs.h. */
13039#include <readline/readline.h>
13040
13041_ACEOF
13042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013046
13047fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013048rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013049
13050fi
13051
Martin v. Löwis82bca632006-02-10 20:49:30 +000013052# End of readline checks: restore LIBS
13053LIBS=$LIBS_no_readline
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13056$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013057if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013059else
Martin v. Löwis11437992002-04-12 09:54:03 +000013060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013062 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013063else
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013065/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013066
13067int main()
13068{
13069 int val1 = nice(1);
13070 if (val1 != -1 && val1 == nice(2))
13071 exit(0);
13072 exit(1);
13073}
13074
Martin v. Löwis11437992002-04-12 09:54:03 +000013075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013076if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013077 ac_cv_broken_nice=yes
13078else
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13082 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013083fi
13084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013085fi
13086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13088$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013089if test "$ac_cv_broken_nice" = yes
13090then
Martin v. Löwis11437992002-04-12 09:54:03 +000013091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013093
13094fi
13095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13097$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013098if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013100else
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013102 ac_cv_broken_poll=no
13103else
Matthias Kloseb9621712010-04-24 17:59:49 +000013104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013105/* end confdefs.h. */
13106
13107#include <poll.h>
13108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013109int main()
13110{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013111 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013112 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013113
13114 close (42);
13115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013116 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013117 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013118 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013119 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013121 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122 return 1;
13123}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013124
13125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013126if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013127 ac_cv_broken_poll=yes
13128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13132 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013135fi
13136
Matthias Kloseb9621712010-04-24 17:59:49 +000013137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13138$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013139if test "$ac_cv_broken_poll" = yes
13140then
13141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013143
13144fi
13145
Brett Cannon43802422005-02-10 20:48:03 +000013146# 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 +000013147# (which is not required by ISO C or UNIX spec) and/or if we support
13148# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013149ac_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 +000013150#include <$ac_cv_struct_tm>
13151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013153if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013154
13155cat >>confdefs.h <<_ACEOF
13156#define HAVE_STRUCT_TM_TM_ZONE 1
13157_ACEOF
13158
13159
13160fi
13161
13162if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013165
13166else
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13168"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013169if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171else
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173fi
13174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013176#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177_ACEOF
13178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13180$as_echo_n "checking for tzname... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013181if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183else
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013185/* end confdefs.h. */
13186#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187#if !HAVE_DECL_TZNAME
13188extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013189#endif
13190
13191int
13192main ()
13193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013194return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013195 ;
13196 return 0;
13197}
13198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013199if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013200 ac_cv_var_tzname=yes
13201else
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013204rm -f core conftest.err conftest.$ac_objext \
13205 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13208$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013209 if test $ac_cv_var_tzname = yes; then
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013212
13213 fi
13214fi
13215
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013216
Martin v. Löwis1d459062005-03-14 21:23:33 +000013217# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13219$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013220if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013222else
13223
Matthias Kloseb9621712010-04-24 17:59:49 +000013224if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013225 ac_cv_working_tzset=no
13226else
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013228/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013229
13230#include <stdlib.h>
13231#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013232#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013233
13234#if HAVE_TZNAME
13235extern char *tzname[];
13236#endif
13237
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013238int main()
13239{
Brett Cannon18367812003-09-19 00:59:16 +000013240 /* Note that we need to ensure that not only does tzset(3)
13241 do 'something' with localtime, but it works as documented
13242 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013243 This includes making sure that tzname is set properly if
13244 tm->tm_zone does not exist since it is the alternative way
13245 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013246
13247 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013248 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013249 */
13250
Martin v. Löwis1d459062005-03-14 21:23:33 +000013251 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013252 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13253
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013254 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013255 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013256 if (localtime(&groundhogday)->tm_hour != 0)
13257 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013258#if HAVE_TZNAME
13259 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13260 if (strcmp(tzname[0], "UTC") ||
13261 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13262 exit(1);
13263#endif
Brett Cannon18367812003-09-19 00:59:16 +000013264
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013265 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013266 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013267 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013268 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013269#if HAVE_TZNAME
13270 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13271 exit(1);
13272#endif
Brett Cannon18367812003-09-19 00:59:16 +000013273
13274 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13275 tzset();
13276 if (localtime(&groundhogday)->tm_hour != 11)
13277 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013278#if HAVE_TZNAME
13279 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13280 exit(1);
13281#endif
13282
13283#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013284 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13285 exit(1);
13286 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13287 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013288#endif
Brett Cannon18367812003-09-19 00:59:16 +000013289
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013290 exit(0);
13291}
13292
13293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013294if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013295 ac_cv_working_tzset=yes
13296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13300 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013301fi
13302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013303fi
13304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13306$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013307if test "$ac_cv_working_tzset" = yes
13308then
13309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013311
13312fi
13313
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013314# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13316$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013317if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013321/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013322#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013323int
13324main ()
13325{
13326
13327struct stat st;
13328st.st_mtim.tv_nsec = 1;
13329
13330 ;
13331 return 0;
13332}
13333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013335 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13340fi
13341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13343$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013344if test "$ac_cv_stat_tv_nsec" = yes
13345then
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013348
13349fi
13350
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013351# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13353$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013354if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013356else
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013358/* end confdefs.h. */
13359#include <sys/stat.h>
13360int
13361main ()
13362{
13363
13364struct stat st;
13365st.st_mtimespec.tv_nsec = 1;
13366
13367 ;
13368 return 0;
13369}
13370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013372 ac_cv_stat_tv_nsec2=yes
13373else
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13377fi
13378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13380$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013381if test "$ac_cv_stat_tv_nsec2" = yes
13382then
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013385
13386fi
13387
Jack Jansen666b1e72001-10-31 12:11:48 +000013388# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13390$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013391if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013395/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013396#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013397int
13398main ()
13399{
Jack Jansen666b1e72001-10-31 12:11:48 +000013400
13401 int rtn;
13402 rtn = mvwdelch(0,0,0);
13403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404 ;
13405 return 0;
13406}
13407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013408if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013409 ac_cv_mvwdelch_is_expression=yes
13410else
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13414fi
13415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13417$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013418
13419if test "$ac_cv_mvwdelch_is_expression" = yes
13420then
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013423
13424fi
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13427$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013428if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013430else
Matthias Kloseb9621712010-04-24 17:59:49 +000013431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013432/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013433#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013434int
13435main ()
13436{
Jack Jansen666b1e72001-10-31 12:11:48 +000013437
13438 WINDOW *w;
13439 w->_flags = 0;
13440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 ;
13442 return 0;
13443}
13444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013445if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013446 ac_cv_window_has_flags=yes
13447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13451fi
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13454$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013455
Jack Jansen666b1e72001-10-31 12:11:48 +000013456
13457if test "$ac_cv_window_has_flags" = yes
13458then
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013461
13462fi
13463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13465$as_echo_n "checking for is_term_resized... " >&6; }
13466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013467/* end confdefs.h. */
13468#include <curses.h>
13469int
13470main ()
13471{
13472void *x=is_term_resized
13473 ;
13474 return 0;
13475}
13476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013478
Matthias Kloseb9621712010-04-24 17:59:49 +000013479$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013480
Matthias Kloseb159a552010-04-25 21:00:44 +000013481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013482$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13485$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013486
13487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13491$as_echo_n "checking for resize_term... " >&6; }
13492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013493/* end confdefs.h. */
13494#include <curses.h>
13495int
13496main ()
13497{
13498void *x=resize_term
13499 ;
13500 return 0;
13501}
13502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013503if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013506
Matthias Kloseb159a552010-04-25 21:00:44 +000013507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013508$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13511$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013512
13513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13517$as_echo_n "checking for resizeterm... " >&6; }
13518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013519/* end confdefs.h. */
13520#include <curses.h>
13521int
13522main ()
13523{
13524void *x=resizeterm
13525 ;
13526 return 0;
13527}
13528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013529if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013530
Matthias Kloseb9621712010-04-24 17:59:49 +000013531$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013532
Matthias Kloseb159a552010-04-25 21:00:44 +000013533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013534$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013535else
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13537$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013538
13539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13543$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013544
13545if test -r /dev/ptmx
13546then
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13548$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013551
Thomas Wouters89f507f2006-12-13 04:49:30 +000013552else
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13554$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013555fi
13556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13558$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013559
13560if test -r /dev/ptc
13561then
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13563$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013566
Thomas Wouters89f507f2006-12-13 04:49:30 +000013567else
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013570fi
13571
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013572if test "$have_long_long" = yes
13573then
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13575$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013576 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013578else
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013580 ac_cv_have_long_long_format=no
13581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013583/* end confdefs.h. */
13584
13585 #include <stdio.h>
13586 #include <stddef.h>
13587 #include <string.h>
13588
13589 #ifdef HAVE_SYS_TYPES_H
13590 #include <sys/types.h>
13591 #endif
13592
13593 int main()
13594 {
13595 char buffer[256];
13596
13597 if (sprintf(buffer, "%lld", (long long)123) < 0)
13598 return 1;
13599 if (strcmp(buffer, "123"))
13600 return 1;
13601
13602 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13603 return 1;
13604 if (strcmp(buffer, "-123"))
13605 return 1;
13606
13607 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13608 return 1;
13609 if (strcmp(buffer, "123"))
13610 return 1;
13611
13612 return 0;
13613 }
13614
13615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013616if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013617 ac_cv_have_long_long_format=yes
13618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13622 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013623fi
13624
13625
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013626fi
13627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13629$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013630fi
13631
Mark Dickinson89d7d412009-12-31 20:50:59 +000013632if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013633then
13634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013636
13637fi
13638
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013639if test $ac_sys_system = Darwin
13640then
13641 LIBS="$LIBS -framework CoreFoundation"
13642fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13645$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013646if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013650 ac_cv_have_size_t_format="cross -- assuming yes"
13651
Thomas Wouters477c8d52006-05-27 19:21:47 +000013652else
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013654/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655
Thomas Wouters477c8d52006-05-27 19:21:47 +000013656#include <stdio.h>
13657#include <stddef.h>
13658#include <string.h>
13659
Christian Heimes2c181612007-12-17 20:04:13 +000013660#ifdef HAVE_SYS_TYPES_H
13661#include <sys/types.h>
13662#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013663
13664#ifdef HAVE_SSIZE_T
13665typedef ssize_t Py_ssize_t;
13666#elif SIZEOF_VOID_P == SIZEOF_LONG
13667typedef long Py_ssize_t;
13668#else
13669typedef int Py_ssize_t;
13670#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013671
Christian Heimes2c181612007-12-17 20:04:13 +000013672int main()
13673{
13674 char buffer[256];
13675
Thomas Wouters477c8d52006-05-27 19:21:47 +000013676 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13677 return 1;
13678
Thomas Wouters89f507f2006-12-13 04:49:30 +000013679 if (strcmp(buffer, "123"))
13680 return 1;
13681
13682 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13683 return 1;
13684
13685 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013686 return 1;
13687
13688 return 0;
13689}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013690
Thomas Wouters477c8d52006-05-27 19:21:47 +000013691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013692if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013693 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013694else
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13698 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013699fi
13700
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13703$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013704if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013707
13708fi
13709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013711#ifdef HAVE_SYS_TYPES_H
13712#include <sys/types.h>
13713#endif
13714#ifdef HAVE_SYS_SOCKET_H
13715#include <sys/socket.h>
13716#endif
13717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013719if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013720
Martin v. Löwis11437992002-04-12 09:54:03 +000013721else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013724
13725fi
13726
Michael W. Hudson54241132001-12-07 15:38:26 +000013727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13729$as_echo_n "checking for broken mbstowcs... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013730if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013732else
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013734 ac_cv_broken_mbstowcs=no
13735else
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013737/* end confdefs.h. */
13738
13739#include<stdlib.h>
13740int main() {
13741 size_t len = -1;
13742 const char *str = "text";
13743 len = mbstowcs(NULL, str, 0);
13744 return (len != 4);
13745}
13746
13747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013748if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013749 ac_cv_broken_mbstowcs=no
13750else
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13754 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013755fi
13756
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013757fi
13758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13760$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013761if test "$ac_cv_broken_mbstowcs" = yes
13762then
13763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013765
13766fi
13767
Antoine Pitrou042b1282010-08-13 21:15:58 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13769$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013770if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013771 $as_echo_n "(cached) " >&6
13772else
13773 if test "$cross_compiling" = yes; then :
13774 ac_cv_computed_gotos=no
13775else
13776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13777/* end confdefs.h. */
13778
13779int main(int argc, char **argv)
13780{
13781 static void *targets[1] = { &&LABEL1 };
13782 goto LABEL2;
13783LABEL1:
13784 return 0;
13785LABEL2:
13786 goto *targets[0];
13787 return 1;
13788}
13789
13790_ACEOF
13791if ac_fn_c_try_run "$LINENO"; then :
13792 ac_cv_computed_gotos=yes
13793else
13794 ac_cv_computed_gotos=no
13795fi
13796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13797 conftest.$ac_objext conftest.beam conftest.$ac_ext
13798fi
13799
13800fi
13801
13802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13803$as_echo "$ac_cv_computed_gotos" >&6; }
13804if test "$ac_cv_computed_gotos" = yes
13805then
13806
13807$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13808
13809fi
13810
Antoine Pitroub52ec782009-01-25 16:34:23 +000013811# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13813$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013814
13815# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013816if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013817 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013818if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013819then
13820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13824$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013825fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013826if test "$withval" = no
13827then
13828
13829$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13832$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013833fi
13834
Antoine Pitrou042b1282010-08-13 21:15:58 +000013835else
13836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13837$as_echo "no value specified" >&6; }
13838fi
13839
Antoine Pitroub52ec782009-01-25 16:34:23 +000013840
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013841case $ac_sys_system in
13842AIX*)
13843
13844$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13845 ;;
13846esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013847
Michael W. Hudson54241132001-12-07 15:38:26 +000013848
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013849
13850
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013851for h in `(cd $srcdir;echo Python/thread_*.h)`
13852do
13853 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13854done
13855
Michael W. Hudson54241132001-12-07 15:38:26 +000013856
Neal Norwitzd24499d2005-12-18 21:36:39 +000013857SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13859$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013860for dir in $SRCDIRS; do
13861 if test ! -d $dir; then
13862 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013863 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013864done
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13866$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013867
Guido van Rossum627b2d71993-12-24 10:39:16 +000013868# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013869ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013870
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013871ac_config_files="$ac_config_files Modules/ld_so_aix"
13872
Martin v. Löwis11437992002-04-12 09:54:03 +000013873cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013874# This file is a shell script that caches the results of configure
13875# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013876# scripts and configure runs, see configure's option --config-cache.
13877# It is not useful on other systems. If it contains results you don't
13878# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013879#
Martin v. Löwis11437992002-04-12 09:54:03 +000013880# config.status only pays attention to the cache file if you give it
13881# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013882#
Skip Montanaro6dead952003-09-25 14:50:04 +000013883# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013884# loading this file, other *unset* `ac_cv_foo' will be assigned the
13885# following values.
13886
13887_ACEOF
13888
Guido van Rossumf78abae1997-01-21 22:02:36 +000013889# The following way of writing the cache mishandles newlines in values,
13890# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013891# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013892# Ultrix sh set writes to stderr and can't be redirected directly,
13893# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894(
13895 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13896 eval ac_val=\$$ac_var
13897 case $ac_val in #(
13898 *${as_nl}*)
13899 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13901$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902 esac
13903 case $ac_var in #(
13904 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13906 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 esac ;;
13908 esac
13909 done
13910
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13913 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013914 # `set' does not quote correctly, so add quotes: double-quote
13915 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013917 "s/'/'\\\\''/g;
13918 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 *)
13921 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924 esac |
13925 sort
13926) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13932 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13934 :end' >>confcache
13935if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13936 if test -w "$cache_file"; then
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013937 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13939$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013940 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013941 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13943$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013944 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013945fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013946rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013947
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013948test "x$prefix" = xNONE && prefix=$ac_default_prefix
13949# Let make expand exec_prefix.
13950test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013951
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013952DEFS=-DHAVE_CONFIG_H
13953
Skip Montanaro6dead952003-09-25 14:50:04 +000013954ac_libobjs=
13955ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013956U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013957for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13958 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13962 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13964 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013965done
13966LIBOBJS=$ac_libobjs
13967
13968LTLIBOBJS=$ac_ltlibobjs
13969
13970
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013973: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013974ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013975ac_clean_files_save=$ac_clean_files
13976ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013977{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13978$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13979as_write_fail=0
13980cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013981#! $SHELL
13982# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013983# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013984# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013985# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013986
Martin v. Löwis11437992002-04-12 09:54:03 +000013987debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013988ac_cs_recheck=false
13989ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991SHELL=\${CONFIG_SHELL-$SHELL}
13992export SHELL
13993_ASEOF
13994cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13995## -------------------- ##
13996## M4sh Initialization. ##
13997## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999# Be more Bourne compatible
14000DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014001if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 emulate sh
14003 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014004 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014005 # is contrary to our usage. Disable this feature.
14006 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014007 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014008else
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 case `(set -o) 2>/dev/null` in #(
14010 *posix*) :
14011 set -o posix ;; #(
14012 *) :
14013 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014015fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014016
14017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018as_nl='
14019'
14020export as_nl
14021# Printing a long string crashes Solaris 7 /usr/bin/printf.
14022as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14023as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14024as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14025# Prefer a ksh shell builtin over an external printf program on Solaris,
14026# but without wasting forks for bash or zsh.
14027if test -z "$BASH_VERSION$ZSH_VERSION" \
14028 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14029 as_echo='print -r --'
14030 as_echo_n='print -rn --'
14031elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14032 as_echo='printf %s\n'
14033 as_echo_n='printf %s'
14034else
14035 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14036 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14037 as_echo_n='/usr/ucb/echo -n'
14038 else
14039 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14040 as_echo_n_body='eval
14041 arg=$1;
14042 case $arg in #(
14043 *"$as_nl"*)
14044 expr "X$arg" : "X\\(.*\\)$as_nl";
14045 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14046 esac;
14047 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14048 '
14049 export as_echo_n_body
14050 as_echo_n='sh -c $as_echo_n_body as_echo'
14051 fi
14052 export as_echo_body
14053 as_echo='sh -c $as_echo_body as_echo'
14054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
14056# The user is always right.
14057if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014058 PATH_SEPARATOR=:
14059 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14060 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14061 PATH_SEPARATOR=';'
14062 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014065
14066# IFS
14067# We need space, tab and new line, in precisely that order. Quoting is
14068# there to prevent editors from complaining about space-tab.
14069# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14070# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014071IFS=" "" $as_nl"
14072
14073# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014074case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075 *[\\/]* ) as_myself=$0 ;;
14076 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014077for as_dir in $PATH
14078do
14079 IFS=$as_save_IFS
14080 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014081 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14082 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085 ;;
14086esac
14087# We did not find ourselves, most probably we were run as `sh COMMAND'
14088# in which case we are not to be found in the path.
14089if test "x$as_myself" = x; then
14090 as_myself=$0
14091fi
14092if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14094 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095fi
14096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097# Unset variables that we do not need and which cause bugs (e.g. in
14098# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14099# suppresses any "Segmentation fault" message there. '((' could
14100# trigger a bug in pdksh 5.2.14.
14101for as_var in BASH_ENV ENV MAIL MAILPATH
14102do eval test x\${$as_var+set} = xset \
14103 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104done
14105PS1='$ '
14106PS2='> '
14107PS4='+ '
14108
14109# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014110LC_ALL=C
14111export LC_ALL
14112LANGUAGE=C
14113export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115# CDPATH.
14116(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14117
14118
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014119# as_fn_error STATUS ERROR [LINENO LOG_FD]
14120# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014121# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14122# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014123# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014124as_fn_error ()
14125{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014126 as_status=$1; test $as_status -eq 0 && as_status=1
14127 if test "$4"; then
14128 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14129 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014131 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 as_fn_exit $as_status
14133} # as_fn_error
14134
14135
14136# as_fn_set_status STATUS
14137# -----------------------
14138# Set $? to STATUS, without forking.
14139as_fn_set_status ()
14140{
14141 return $1
14142} # as_fn_set_status
14143
14144# as_fn_exit STATUS
14145# -----------------
14146# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14147as_fn_exit ()
14148{
14149 set +e
14150 as_fn_set_status $1
14151 exit $1
14152} # as_fn_exit
14153
14154# as_fn_unset VAR
14155# ---------------
14156# Portably unset VAR.
14157as_fn_unset ()
14158{
14159 { eval $1=; unset $1;}
14160}
14161as_unset=as_fn_unset
14162# as_fn_append VAR VALUE
14163# ----------------------
14164# Append the text in VALUE to the end of the definition contained in VAR. Take
14165# advantage of any shell optimizations that allow amortized linear growth over
14166# repeated appends, instead of the typical quadratic growth present in naive
14167# implementations.
14168if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14169 eval 'as_fn_append ()
14170 {
14171 eval $1+=\$2
14172 }'
14173else
14174 as_fn_append ()
14175 {
14176 eval $1=\$$1\$2
14177 }
14178fi # as_fn_append
14179
14180# as_fn_arith ARG...
14181# ------------------
14182# Perform arithmetic evaluation on the ARGs, and store the result in the
14183# global $as_val. Take advantage of shells that can avoid forks. The arguments
14184# must be portable across $(()) and expr.
14185if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14186 eval 'as_fn_arith ()
14187 {
14188 as_val=$(( $* ))
14189 }'
14190else
14191 as_fn_arith ()
14192 {
14193 as_val=`expr "$@" || test $? -eq 1`
14194 }
14195fi # as_fn_arith
14196
14197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198if expr a : '\(a\)' >/dev/null 2>&1 &&
14199 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14200 as_expr=expr
14201else
14202 as_expr=false
14203fi
14204
14205if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14206 as_basename=basename
14207else
14208 as_basename=false
14209fi
14210
Matthias Kloseb9621712010-04-24 17:59:49 +000014211if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14212 as_dirname=dirname
14213else
14214 as_dirname=false
14215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217as_me=`$as_basename -- "$0" ||
14218$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14219 X"$0" : 'X\(//\)$' \| \
14220 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014221$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014222 sed '/^.*\/\([^/][^/]*\)\/*$/{
14223 s//\1/
14224 q
14225 }
14226 /^X\/\(\/\/\)$/{
14227 s//\1/
14228 q
14229 }
14230 /^X\/\(\/\).*/{
14231 s//\1/
14232 q
14233 }
14234 s/.*/./; q'`
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236# Avoid depending upon Character Ranges.
14237as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14238as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14239as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14240as_cr_digits='0123456789'
14241as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242
14243ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014244case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 xy) ECHO_C='\c';;
14249 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14250 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251 esac;;
14252*)
14253 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014254esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014255
Martin v. Löwis11437992002-04-12 09:54:03 +000014256rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257if test -d conf$$.dir; then
14258 rm -f conf$$.dir/conf$$.file
14259else
14260 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014263if (echo >conf$$.file) 2>/dev/null; then
14264 if ln -s conf$$.file conf$$ 2>/dev/null; then
14265 as_ln_s='ln -s'
14266 # ... but there are two gotchas:
14267 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14268 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14269 # In both cases, we have to default to `cp -p'.
14270 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14271 as_ln_s='cp -p'
14272 elif ln conf$$.file conf$$ 2>/dev/null; then
14273 as_ln_s=ln
14274 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014275 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014277else
14278 as_ln_s='cp -p'
14279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14281rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283
14284# as_fn_mkdir_p
14285# -------------
14286# Create "$as_dir" as a directory, including parents if necessary.
14287as_fn_mkdir_p ()
14288{
14289
14290 case $as_dir in #(
14291 -*) as_dir=./$as_dir;;
14292 esac
14293 test -d "$as_dir" || eval $as_mkdir_p || {
14294 as_dirs=
14295 while :; do
14296 case $as_dir in #(
14297 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14298 *) as_qdir=$as_dir;;
14299 esac
14300 as_dirs="'$as_qdir' $as_dirs"
14301 as_dir=`$as_dirname -- "$as_dir" ||
14302$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14303 X"$as_dir" : 'X\(//\)[^/]' \| \
14304 X"$as_dir" : 'X\(//\)$' \| \
14305 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14306$as_echo X"$as_dir" |
14307 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14308 s//\1/
14309 q
14310 }
14311 /^X\(\/\/\)[^/].*/{
14312 s//\1/
14313 q
14314 }
14315 /^X\(\/\/\)$/{
14316 s//\1/
14317 q
14318 }
14319 /^X\(\/\).*/{
14320 s//\1/
14321 q
14322 }
14323 s/.*/./; q'`
14324 test -d "$as_dir" && break
14325 done
14326 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014327 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014328
14329
14330} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014331if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014333else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014334 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014335 as_mkdir_p=false
14336fi
14337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338if test -x / >/dev/null 2>&1; then
14339 as_test_x='test -x'
14340else
14341 if ls -dL / >/dev/null 2>&1; then
14342 as_ls_L_option=L
14343 else
14344 as_ls_L_option=
14345 fi
14346 as_test_x='
14347 eval sh -c '\''
14348 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014350 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014351 case $1 in #(
14352 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355 ???[sx]*):;;*)false;;esac;fi
14356 '\'' sh
14357 '
14358fi
14359as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014360
14361# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014362as_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 +000014363
14364# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014365as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014366
14367
Martin v. Löwis11437992002-04-12 09:54:03 +000014368exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014369## ----------------------------------- ##
14370## Main body of $CONFIG_STATUS script. ##
14371## ----------------------------------- ##
14372_ASEOF
14373test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014374
Matthias Kloseb9621712010-04-24 17:59:49 +000014375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14376# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014377# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378# values after options handling.
14379ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014380This file was extended by python $as_me 3.3, which was
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014381generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
14383 CONFIG_FILES = $CONFIG_FILES
14384 CONFIG_HEADERS = $CONFIG_HEADERS
14385 CONFIG_LINKS = $CONFIG_LINKS
14386 CONFIG_COMMANDS = $CONFIG_COMMANDS
14387 $ $0 $@
14388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014389on `(hostname || uname -n) 2>/dev/null | sed 1q`
14390"
14391
Martin v. Löwis11437992002-04-12 09:54:03 +000014392_ACEOF
14393
Matthias Kloseb9621712010-04-24 17:59:49 +000014394case $ac_config_files in *"
14395"*) set x $ac_config_files; shift; ac_config_files=$*;;
14396esac
14397
14398case $ac_config_headers in *"
14399"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14400esac
14401
14402
14403cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014404# Files that config.status was made for.
Benjamin Peterson94b580d2011-08-02 17:30:04 -050014405config_files="$ac_config_files"
14406config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014411ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014412\`$as_me' instantiates files and other configuration actions
14413from templates according to the current configuration. Unless the files
14414and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014415
Matthias Kloseb9621712010-04-24 17:59:49 +000014416Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
14418 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 --config print configuration, then exit
14421 -q, --quiet, --silent
14422 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 -d, --debug don't remove temporary files
14424 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 --file=FILE[:TEMPLATE]
14426 instantiate the configuration file FILE
14427 --header=FILE[:TEMPLATE]
14428 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
14430Configuration files:
14431$config_files
14432
14433Configuration headers:
14434$config_headers
14435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14440ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014441ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014442python config.status 3.3
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014443configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014446Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014447This config.status script is free software; the Free Software Foundation
14448gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449
14450ac_pwd='$ac_pwd'
14451srcdir='$srcdir'
14452INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014453test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014454_ACEOF
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14457# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014458ac_need_defaults=:
14459while test $# != 0
14460do
14461 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014462 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14464 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014465 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014467 --*=)
14468 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14469 ac_optarg=
14470 ac_shift=:
14471 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014473 ac_option=$1
14474 ac_optarg=$2
14475 ac_shift=shift
14476 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 esac
14478
Skip Montanaro6dead952003-09-25 14:50:04 +000014479 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014481 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14482 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 $as_echo "$ac_cs_version"; exit ;;
14485 --config | --confi | --conf | --con | --co | --c )
14486 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 debug=: ;;
14489 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014490 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 case $ac_optarg in
14492 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014493 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 esac
14495 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 ac_need_defaults=false;;
14497 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014498 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 case $ac_optarg in
14500 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14501 esac
14502 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 --he | --h)
14505 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014506 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014507Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014510 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14511 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14512 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
14514 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014515 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014516Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014517
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
14521 esac
14522 shift
14523done
14524
Skip Montanaro6dead952003-09-25 14:50:04 +000014525ac_configure_extra_args=
14526
14527if $ac_cs_silent; then
14528 exec 6>/dev/null
14529 ac_configure_extra_args="$ac_configure_extra_args --silent"
14530fi
14531
14532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014533cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014534if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14536 shift
14537 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14538 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014541fi
14542
Martin v. Löwis11437992002-04-12 09:54:03 +000014543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545exec 5>>config.log
14546{
14547 echo
14548 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14549## Running $as_me. ##
14550_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014555cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014557
Matthias Kloseb9621712010-04-24 17:59:49 +000014558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559
14560# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014561for ac_config_target in $ac_config_targets
14562do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563 case $ac_config_target in
14564 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14565 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14566 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014567 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14568 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14570 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014571 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014572 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014574 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 esac
14576done
14577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578
Martin v. Löwis11437992002-04-12 09:54:03 +000014579# If the user did not use the arguments to specify the items to instantiate,
14580# then the envvar interface is used. Set only those that are not.
14581# We use the long form for the default assignment because of an extremely
14582# bizarre bug on SunOS 4.1.3.
14583if $ac_need_defaults; then
14584 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14585 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14586fi
14587
Skip Montanaro6dead952003-09-25 14:50:04 +000014588# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014590# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591# Hook for its removal unless debugging.
14592# Note that there is a small window in which the directory will not be cleaned:
14593# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014594$debug ||
14595{
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014596 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014597 trap 'exit_status=$?
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014598 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014601}
Martin v. Löwis11437992002-04-12 09:54:03 +000014602# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014603
Martin v. Löwis11437992002-04-12 09:54:03 +000014604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014606 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014607} ||
14608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609 tmp=./conf$$-$RANDOM
14610 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014611} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613# Set up the scripts for CONFIG_FILES section.
14614# No need to generate them if there are no CONFIG_FILES.
14615# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014617
Matthias Kloseb9621712010-04-24 17:59:49 +000014618
14619ac_cr=`echo X | tr X '\015'`
14620# On cygwin, bash can eat \r inside `` if the user requested igncr.
14621# But we know of no other shell where ac_cr would be empty at this
14622# point, so we can use a bashism as a fallback.
14623if test "x$ac_cr" = x; then
14624 eval ac_cr=\$\'\\r\'
14625fi
14626ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14627if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014628 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014629else
14630 ac_cs_awk_cr=$ac_cr
14631fi
14632
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014633echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
14635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636
Matthias Kloseb9621712010-04-24 17:59:49 +000014637{
14638 echo "cat >conf$$subs.awk <<_ACEOF" &&
14639 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14640 echo "_ACEOF"
14641} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014642 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14643ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644ac_delim='%!_!# '
14645for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014647 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648
Matthias Kloseb9621712010-04-24 17:59:49 +000014649 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14650 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014651 break
14652 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014653 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654 else
14655 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657done
Matthias Kloseb9621712010-04-24 17:59:49 +000014658rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659
Matthias Kloseb9621712010-04-24 17:59:49 +000014660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014661cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014663sed -n '
14664h
14665s/^/S["/; s/!.*/"]=/
14666p
14667g
14668s/^[^!]*!//
14669:repl
14670t repl
14671s/'"$ac_delim"'$//
14672t delim
14673:nl
14674h
14675s/\(.\{148\}\)..*/\1/
14676t more1
14677s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14678p
14679n
14680b repl
14681:more1
14682s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14683p
14684g
14685s/.\{148\}//
14686t nl
14687:delim
14688h
14689s/\(.\{148\}\)..*/\1/
14690t more2
14691s/["\\]/\\&/g; s/^/"/; s/$/"/
14692p
14693b
14694:more2
14695s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14696p
14697g
14698s/.\{148\}//
14699t delim
14700' <conf$$subs.awk | sed '
14701/^[^""]/{
14702 N
14703 s/\n//
14704}
14705' >>$CONFIG_STATUS || ac_write_fail=1
14706rm -f conf$$subs.awk
14707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14708_ACAWK
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014709cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 for (key in S) S_is_set[key] = 1
14711 FS = ""
14712
14713}
14714{
14715 line = $ 0
14716 nfields = split(line, field, "@")
14717 substed = 0
14718 len = length(field[1])
14719 for (i = 2; i < nfields; i++) {
14720 key = field[i]
14721 keylen = length(key)
14722 if (S_is_set[key]) {
14723 value = S[key]
14724 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14725 len += length(value) + length(field[++i])
14726 substed = 1
14727 } else
14728 len += 1 + keylen
14729 }
14730
14731 print line
14732}
14733
14734_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014736cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14737if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14738 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14739else
14740 cat
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014741fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014742 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014743_ACEOF
14744
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014745# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14746# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014747# trailing colons and then remove the whole line if VPATH becomes empty
14748# (actually we leave an empty line to preserve line numbers).
14749if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014750 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14751h
14752s///
14753s/^/:/
14754s/[ ]*$/:/
14755s/:\$(srcdir):/:/g
14756s/:\${srcdir}:/:/g
14757s/:@srcdir@:/:/g
14758s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014760x
14761s/\(=[ ]*\).*/\1/
14762G
14763s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014764s/^[^=]*=[ ]*$//
14765}'
14766fi
14767
Matthias Kloseb9621712010-04-24 17:59:49 +000014768cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014769fi # test -n "$CONFIG_FILES"
14770
Matthias Kloseb9621712010-04-24 17:59:49 +000014771# Set up the scripts for CONFIG_HEADERS section.
14772# No need to generate them if there are no CONFIG_HEADERS.
14773# This happens for instance with `./config.status Makefile'.
14774if test -n "$CONFIG_HEADERS"; then
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014775cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014776BEGIN {
14777_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779# Transform confdefs.h into an awk script `defines.awk', embedded as
14780# here-document in config.status, that substitutes the proper values into
14781# config.h.in to produce config.h.
14782
14783# Create a delimiter string that does not exist in confdefs.h, to ease
14784# handling of long lines.
14785ac_delim='%!_!# '
14786for ac_last_try in false false :; do
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014787 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14788 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 break
14790 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014791 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 else
14793 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14794 fi
14795done
14796
14797# For the awk script, D is an array of macro values keyed by name,
14798# likewise P contains macro parameters if any. Preserve backslash
14799# newline sequences.
14800
14801ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14802sed -n '
14803s/.\{148\}/&'"$ac_delim"'/g
14804t rset
14805:rset
14806s/^[ ]*#[ ]*define[ ][ ]*/ /
14807t def
14808d
14809:def
14810s/\\$//
14811t bsnl
14812s/["\\]/\\&/g
14813s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14814D["\1"]=" \3"/p
14815s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14816d
14817:bsnl
14818s/["\\]/\\&/g
14819s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14820D["\1"]=" \3\\\\\\n"\\/p
14821t cont
14822s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14823t cont
14824d
14825:cont
14826n
14827s/.\{148\}/&'"$ac_delim"'/g
14828t clear
14829:clear
14830s/\\$//
14831t bsnlc
14832s/["\\]/\\&/g; s/^/"/; s/$/"/p
14833d
14834:bsnlc
14835s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14836b cont
14837' <confdefs.h | sed '
14838s/'"$ac_delim"'/"\\\
14839"/g' >>$CONFIG_STATUS || ac_write_fail=1
14840
14841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14842 for (key in D) D_is_set[key] = 1
14843 FS = ""
14844}
14845/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14846 line = \$ 0
14847 split(line, arg, " ")
14848 if (arg[1] == "#") {
14849 defundef = arg[2]
14850 mac1 = arg[3]
14851 } else {
14852 defundef = substr(arg[1], 2)
14853 mac1 = arg[2]
14854 }
14855 split(mac1, mac2, "(") #)
14856 macro = mac2[1]
14857 prefix = substr(line, 1, index(line, defundef) - 1)
14858 if (D_is_set[macro]) {
14859 # Preserve the white space surrounding the "#".
14860 print prefix "define", macro P[macro] D[macro]
14861 next
14862 } else {
14863 # Replace #undef with comments. This is necessary, for example,
14864 # in the case of _POSIX_SOURCE, which is predefined and required
14865 # on some systems where configure will not decide to define it.
14866 if (defundef == "undef") {
14867 print "/*", prefix defundef, macro, "*/"
14868 next
14869 }
14870 }
14871}
14872{ print }
14873_ACAWK
14874_ACEOF
14875cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014876 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014877fi # test -n "$CONFIG_HEADERS"
14878
14879
14880eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14881shift
14882for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883do
14884 case $ac_tag in
14885 :[FHLC]) ac_mode=$ac_tag; continue;;
14886 esac
14887 case $ac_mode$ac_tag in
14888 :[FHL]*:*);;
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014889 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890 :[FH]-) ac_tag=-:-;;
14891 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14892 esac
14893 ac_save_IFS=$IFS
14894 IFS=:
14895 set x $ac_tag
14896 IFS=$ac_save_IFS
14897 shift
14898 ac_file=$1
14899 shift
14900
14901 case $ac_mode in
14902 :L) ac_source=$1;;
14903 :[FH])
14904 ac_file_inputs=
14905 for ac_f
14906 do
14907 case $ac_f in
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014908 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909 *) # Look for the file first in the build tree, then in the source tree
14910 # (if the path is not absolute). The absolute path cannot be DOS-style,
14911 # because $ac_f cannot contain `:'.
14912 test -f "$ac_f" ||
14913 case $ac_f in
14914 [\\/$]*) false;;
14915 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14916 esac ||
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014917 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14920 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921 done
14922
14923 # Let's still pretend it is `configure' which instantiates (i.e., don't
14924 # use $as_me), people would be surprised to read:
14925 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 configure_input='Generated from '`
14927 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14928 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 if test x"$ac_file" != x-; then
14930 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14932$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 # Neutralize special characters interpreted by sed in replacement strings.
14935 case $configure_input in #(
14936 *\&* | *\|* | *\\* )
14937 ac_sed_conf_input=`$as_echo "$configure_input" |
14938 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14939 *) ac_sed_conf_input=$configure_input;;
14940 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941
14942 case $ac_tag in
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014943 *:-:* | *:-) cat >"$tmp/stdin" \
14944 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 esac
14946 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 esac
14948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014950$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014951 X"$ac_file" : 'X\(//\)[^/]' \| \
14952 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014954$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14956 s//\1/
14957 q
14958 }
14959 /^X\(\/\/\)[^/].*/{
14960 s//\1/
14961 q
14962 }
14963 /^X\(\/\/\)$/{
14964 s//\1/
14965 q
14966 }
14967 /^X\(\/\).*/{
14968 s//\1/
14969 q
14970 }
14971 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 ac_builddir=.
14974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975case "$ac_dir" in
14976.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14977*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981 case $ac_top_builddir_sub in
14982 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14983 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14984 esac ;;
14985esac
14986ac_abs_top_builddir=$ac_pwd
14987ac_abs_builddir=$ac_pwd$ac_dir_suffix
14988# for backward compatibility:
14989ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014990
14991case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014992 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994 ac_top_srcdir=$ac_top_builddir_sub
14995 ac_abs_top_srcdir=$ac_pwd ;;
14996 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998 ac_top_srcdir=$srcdir
14999 ac_abs_top_srcdir=$srcdir ;;
15000 *) # Relative name.
15001 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15002 ac_top_srcdir=$ac_top_build_prefix$srcdir
15003 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015004esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015006
Martin v. Löwis11437992002-04-12 09:54:03 +000015007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008 case $ac_mode in
15009 :F)
15010 #
15011 # CONFIG_FILE
15012 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015013
15014 case $INSTALL in
15015 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015018_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019
Matthias Kloseb9621712010-04-24 17:59:49 +000015020cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021# If the template does not know about datarootdir, expand it.
15022# FIXME: This hack should be removed a few years after 2.60.
15023ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015024ac_sed_dataroot='
15025/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026 p
15027 q
15028}
15029/@datadir@/p
15030/@docdir@/p
15031/@infodir@/p
15032/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015033/@mandir@/p'
15034case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035*datarootdir*) ac_datarootdir_seen=yes;;
15036*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15038$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041 ac_datarootdir_hack='
15042 s&@datadir@&$datadir&g
15043 s&@docdir@&$docdir&g
15044 s&@infodir@&$infodir&g
15045 s&@localedir@&$localedir&g
15046 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048esac
15049_ACEOF
15050
15051# Neutralize VPATH when `$srcdir' = `.'.
15052# Shell code in configure.ac might set extrasub.
15053# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015054cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15055ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015056$extrasub
15057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015058cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015059:t
15060/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015061s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015063s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064s&@srcdir@&$ac_srcdir&;t t
15065s&@abs_srcdir@&$ac_abs_srcdir&;t t
15066s&@top_srcdir@&$ac_top_srcdir&;t t
15067s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15068s&@builddir@&$ac_builddir&;t t
15069s&@abs_builddir@&$ac_abs_builddir&;t t
15070s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15071s&@INSTALL@&$ac_INSTALL&;t t
15072$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015073"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015074eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15075 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015078 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15079 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015081which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015082$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015083which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015084
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015085 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 case $ac_file in
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015087 -) cat "$tmp/out" && rm -f "$tmp/out";;
15088 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015090 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091 ;;
15092 :H)
15093 #
15094 # CONFIG_HEADER
15095 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 {
15098 $as_echo "/* $configure_input */" \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015099 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15100 } >"$tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015101 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015102 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15104$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 rm -f "$ac_file"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015107 mv "$tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015108 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 fi
15110 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 $as_echo "/* $configure_input */" \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015112 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015113 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117
15118 esac
15119
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015120
15121 case $ac_file$ac_mode in
15122 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15123
15124 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125done # for ac_tag
15126
Guido van Rossum627b2d71993-12-24 10:39:16 +000015127
Matthias Kloseb9621712010-04-24 17:59:49 +000015128as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015129_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015130ac_clean_files=$ac_clean_files_save
15131
Matthias Kloseb9621712010-04-24 17:59:49 +000015132test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015133 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015134
Martin v. Löwis11437992002-04-12 09:54:03 +000015135
15136# configure is writing to config.log, and then calls config.status.
15137# config.status does its own redirection, appending to config.log.
15138# Unfortunately, on DOS this fails, as config.log is still kept open
15139# by configure, so config.status won't be able to write to it; its
15140# output is simply discarded. So we exec the FD to /dev/null,
15141# effectively closing config.log, so it can be properly (re)opened and
15142# appended to by config.status. When coming back to configure, we
15143# need to make the FD available again.
15144if test "$no_create" != yes; then
15145 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015146 ac_config_status_args=
15147 test "$silent" = yes &&
15148 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015150 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 exec 5>>config.log
15152 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15153 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015154 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015155fi
15156if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15158$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015159fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015160
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015161
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015162echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015163if test ! -f Modules/Setup
15164then
15165 cp $srcdir/Modules/Setup.dist Modules/Setup
15166fi
15167
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015168echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015169if test ! -f Modules/Setup.local
15170then
15171 echo "# Edit this file for local setup changes" >Modules/Setup.local
15172fi
15173
15174echo "creating Makefile"
15175$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15176 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015177 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015178mv config.c Modules