blob: d1436e06395c814bcbcce72841d8c2455681a8c1 [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
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003143
Matthias Kloseb9621712010-04-24 17:59:49 +00003144$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003145
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003146
3147 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3148 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3149 # several APIs are not declared. Since this is also needed in some
3150 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003151
Matthias Kloseb9621712010-04-24 17:59:49 +00003152$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003153
3154
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003155
Matthias Kloseb9621712010-04-24 17:59:49 +00003156$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003157
3158
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003159fi
3160
Guido van Rossum91922671997-10-09 20:24:13 +00003161#
3162# SGI compilers allow the specification of the both the ABI and the
3163# ISA on the command line. Depending on the values of these switches,
3164# different and often incompatable code will be generated.
3165#
3166# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3167# thus supply support for various ABI/ISA combinations. The MACHDEP
3168# variable is also adjusted.
3169#
3170
3171if test ! -z "$SGI_ABI"
3172then
3173 CC="cc $SGI_ABI"
3174 LDFLAGS="$SGI_ABI $LDFLAGS"
3175 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3178$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003179
Jack Jansen6b08a402004-06-03 12:41:45 +00003180# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3181# it may influence the way we can build extensions, so distutils
3182# needs to check it
3183
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Jack Jansen6b08a402004-06-03 12:41:45 +00003185CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003187
Matthias Kloseb9621712010-04-24 17:59:49 +00003188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3189$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003190ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3192$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003193
Guido van Rossum627b2d71993-12-24 10:39:16 +00003194# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003195
3196# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3197# for debug/optimization stuff. BASECFLAGS is for flags that are required
3198# just to get things to compile and link. Users are free to override OPT
3199# when running configure or make. The build should not break if they do.
3200# BASECFLAGS should generally not be messed with, however.
3201
3202# XXX shouldn't some/most/all of this code be merged with the stuff later
3203# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3205$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003208if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003209 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003210 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003211 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003212 without_gcc=yes;;
3213 yes) CC=gcc
3214 without_gcc=no;;
3215 *) CC=$withval
3216 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003217 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003218else
Martin v. Löwis11437992002-04-12 09:54:03 +00003219
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003220 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003221 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003222 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003223 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003224 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Matthias Kloseb9621712010-04-24 17:59:49 +00003227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3228$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
Guido van Rossum8b131c51995-03-09 14:10:13 +00003230# If the user switches compilers, we can't believe the cache
3231if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3232then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003233 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003234(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003235fi
3236
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003237# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3238# when the compiler supports them, but we don't always want -O2, and
3239# we set -g later.
3240if test -z "$CFLAGS"; then
3241 CFLAGS=
3242fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003243ac_ext=c
3244ac_cpp='$CPP $CPPFLAGS'
3245ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3246ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3247ac_compiler_gnu=$ac_cv_c_compiler_gnu
3248if test -n "$ac_tool_prefix"; then
3249 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3250set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3252$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003253if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003255else
3256 if test -n "$CC"; then
3257 ac_cv_prog_CC="$CC" # Let the user override the test.
3258else
Martin v. Löwis11437992002-04-12 09:54:03 +00003259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3260for as_dir in $PATH
3261do
3262 IFS=$as_save_IFS
3263 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003264 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265 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 +00003266 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003267 $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 +00003268 break 2
3269 fi
3270done
Matthias Kloseb9621712010-04-24 17:59:49 +00003271 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003273
Jack Jansendd19cf82001-12-06 22:36:17 +00003274fi
3275fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003276CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003277if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3279$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003280else
Matthias Kloseb9621712010-04-24 17:59:49 +00003281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3282$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003283fi
3284
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285
Martin v. Löwis11437992002-04-12 09:54:03 +00003286fi
3287if test -z "$ac_cv_prog_CC"; then
3288 ac_ct_CC=$CC
3289 # Extract the first word of "gcc", so it can be a program name with args.
3290set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3292$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003293if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003294 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003295else
3296 if test -n "$ac_ct_CC"; then
3297 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3298else
3299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in $PATH
3301do
3302 IFS=$as_save_IFS
3303 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003304 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003305 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 +00003306 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 $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 +00003308 break 2
3309 fi
3310done
Matthias Kloseb9621712010-04-24 17:59:49 +00003311 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003313
3314fi
3315fi
3316ac_ct_CC=$ac_cv_prog_ac_ct_CC
3317if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3319$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003320else
Matthias Kloseb9621712010-04-24 17:59:49 +00003321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3322$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003323fi
3324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003325 if test "x$ac_ct_CC" = x; then
3326 CC=""
3327 else
3328 case $cross_compiling:$ac_tool_warned in
3329yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003330{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3331$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332ac_tool_warned=yes ;;
3333esac
3334 CC=$ac_ct_CC
3335 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003336else
3337 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003338fi
3339
Jack Jansendd19cf82001-12-06 22:36:17 +00003340if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003341 if test -n "$ac_tool_prefix"; then
3342 # 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 +00003343set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3345$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003346if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003347 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003348else
3349 if test -n "$CC"; then
3350 ac_cv_prog_CC="$CC" # Let the user override the test.
3351else
Martin v. Löwis11437992002-04-12 09:54:03 +00003352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3353for as_dir in $PATH
3354do
3355 IFS=$as_save_IFS
3356 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003358 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 +00003359 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003360 $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 +00003361 break 2
3362 fi
3363done
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003366
3367fi
3368fi
3369CC=$ac_cv_prog_CC
3370if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3372$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003373else
Matthias Kloseb9621712010-04-24 17:59:49 +00003374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3375$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003376fi
3377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003378
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003380fi
3381if test -z "$CC"; then
3382 # Extract the first word of "cc", so it can be a program name with args.
3383set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3385$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003386if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003387 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003388else
3389 if test -n "$CC"; then
3390 ac_cv_prog_CC="$CC" # Let the user override the test.
3391else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003392 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3394for as_dir in $PATH
3395do
3396 IFS=$as_save_IFS
3397 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003399 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 +00003400 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3401 ac_prog_rejected=yes
3402 continue
3403 fi
3404 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 $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 +00003406 break 2
3407 fi
3408done
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003411
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003412if test $ac_prog_rejected = yes; then
3413 # We found a bogon in the path, so make sure we never use it.
3414 set dummy $ac_cv_prog_CC
3415 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003417 # We chose a different compiler from the bogus one.
3418 # However, it has the same basename, so the bogon will be chosen
3419 # first if we set CC to just the basename; use the full file name.
3420 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003421 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003422 fi
3423fi
3424fi
3425fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003426CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003427if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3429$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003430else
Matthias Kloseb9621712010-04-24 17:59:49 +00003431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3432$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003433fi
3434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003435
Martin v. Löwis11437992002-04-12 09:54:03 +00003436fi
3437if test -z "$CC"; then
3438 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003439 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 do
3441 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3442set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3444$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003445if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003447else
3448 if test -n "$CC"; then
3449 ac_cv_prog_CC="$CC" # Let the user override the test.
3450else
Martin v. Löwis11437992002-04-12 09:54:03 +00003451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3452for as_dir in $PATH
3453do
3454 IFS=$as_save_IFS
3455 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457 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 +00003458 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003459 $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 +00003460 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003462done
Matthias Kloseb9621712010-04-24 17:59:49 +00003463 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003465
3466fi
3467fi
3468CC=$ac_cv_prog_CC
3469if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3471$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472else
Matthias Kloseb9621712010-04-24 17:59:49 +00003473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3474$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003475fi
3476
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 test -n "$CC" && break
3479 done
3480fi
3481if test -z "$CC"; then
3482 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003484do
3485 # Extract the first word of "$ac_prog", so it can be a program name with args.
3486set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3488$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003489if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003490 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003491else
3492 if test -n "$ac_ct_CC"; then
3493 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3494else
3495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3496for as_dir in $PATH
3497do
3498 IFS=$as_save_IFS
3499 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003500 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003501 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 +00003502 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003503 $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 +00003504 break 2
3505 fi
3506done
Matthias Kloseb9621712010-04-24 17:59:49 +00003507 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003508IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510fi
3511fi
3512ac_ct_CC=$ac_cv_prog_ac_ct_CC
3513if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3515$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003516else
Matthias Kloseb9621712010-04-24 17:59:49 +00003517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3518$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003519fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003521
Martin v. Löwis11437992002-04-12 09:54:03 +00003522 test -n "$ac_ct_CC" && break
3523done
Michael W. Hudson54241132001-12-07 15:38:26 +00003524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525 if test "x$ac_ct_CC" = x; then
3526 CC=""
3527 else
3528 case $cross_compiling:$ac_tool_warned in
3529yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003530{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3531$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532ac_tool_warned=yes ;;
3533esac
3534 CC=$ac_ct_CC
3535 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003536fi
3537
3538fi
3539
3540
Matthias Kloseb9621712010-04-24 17:59:49 +00003541test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003543as_fn_error $? "no acceptable C compiler found in \$PATH
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003544See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003545
3546# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003547$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3548set X $ac_compile
3549ac_compiler=$2
3550for ac_option in --version -v -V -qversion; do
3551 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552case "(($ac_try" in
3553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3554 *) ac_try_echo=$ac_try;;
3555esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003556eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3557$as_echo "$ac_try_echo"; } >&5
3558 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 if test -s conftest.err; then
3561 sed '10a\
3562... rest of stderr output deleted ...
3563 10q' conftest.err >conftest.er1
3564 cat conftest.er1 >&5
3565 fi
3566 rm -f conftest.er1 conftest.err
3567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3568 test $ac_status = 0; }
3569done
Martin v. Löwis11437992002-04-12 09:54:03 +00003570
Matthias Kloseb9621712010-04-24 17:59:49 +00003571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003572/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003573
Martin v. Löwis11437992002-04-12 09:54:03 +00003574int
3575main ()
3576{
3577
3578 ;
3579 return 0;
3580}
3581_ACEOF
3582ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003583ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003584# Try to create an executable without -o first, disregard a.out.
3585# It will help us diagnose broken compilers, and finding out an intuition
3586# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3588$as_echo_n "checking whether the C compiler works... " >&6; }
3589ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3590
3591# The possible output files:
3592ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594ac_rmfiles=
3595for ac_file in $ac_files
3596do
3597 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3600 esac
3601done
3602rm -f $ac_rmfiles
3603
Matthias Kloseb9621712010-04-24 17:59:49 +00003604if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605case "(($ac_try" in
3606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3607 *) ac_try_echo=$ac_try;;
3608esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003609eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3610$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3614 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3616# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3617# in a Makefile. We should not override ac_cv_exeext if it was cached,
3618# so that the user can short-circuit this test for compilers unknown to
3619# Autoconf.
3620for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003621do
3622 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003625 ;;
3626 [ab].out )
3627 # We found the default executable, but exeext='' is most
3628 # certainly right.
3629 break;;
3630 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632 then :; else
3633 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3634 fi
3635 # We set ac_cv_exeext here because the later test for it is not
3636 # safe: cross compilers may not add the suffix if given an `-o'
3637 # argument, so we may need to know it at that point already.
3638 # Even if this section looks crufty: it has the advantage of
3639 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003640 break;;
3641 * )
3642 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 esac
3644done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645test "$ac_cv_exeext" = no && ac_cv_exeext=
3646
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003647else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648 ac_file=''
3649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003650if test -z "$ac_file"; then :
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
3653$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003654sed 's/^/| /' conftest.$ac_ext >&5
3655
Matthias Kloseb9621712010-04-24 17:59:49 +00003656{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003658as_fn_error 77 "C compiler cannot create executables
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003659See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003660else
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3662$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3665$as_echo_n "checking for C compiler default output file name... " >&6; }
3666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3667$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003668ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003669
Matthias Kloseb9621712010-04-24 17:59:49 +00003670rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003671ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3673$as_echo_n "checking for suffix of executables... " >&6; }
3674if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3680$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003685 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3686# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3687# work properly (i.e., refer to `conftest.exe'), while it won't with
3688# `rm'.
3689for ac_file in conftest.exe conftest conftest.*; do
3690 test -f "$ac_file" || continue
3691 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003693 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3694 break;;
3695 * ) break;;
3696 esac
3697done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003698else
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003701as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003702See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003704rm -f conftest conftest$ac_cv_exeext
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3706$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003707
3708rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003709EXEEXT=$ac_cv_exeext
3710ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3712/* end confdefs.h. */
3713#include <stdio.h>
3714int
3715main ()
3716{
3717FILE *f = fopen ("conftest.out", "w");
3718 return ferror (f) || fclose (f) != 0;
3719
3720 ;
3721 return 0;
3722}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003724ac_clean_files="$ac_clean_files conftest.out"
3725# Check that the compiler produces executables we can run. If not, either
3726# the compiler is broken, or we cross compile.
3727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3728$as_echo_n "checking whether we are cross compiling... " >&6; }
3729if test "$cross_compiling" != yes; then
3730 { { ac_try="$ac_link"
3731case "(($ac_try" in
3732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3733 *) ac_try_echo=$ac_try;;
3734esac
3735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3736$as_echo "$ac_try_echo"; } >&5
3737 (eval "$ac_link") 2>&5
3738 ac_status=$?
3739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3740 test $ac_status = 0; }
3741 if { ac_try='./conftest$ac_cv_exeext'
3742 { { case "(($ac_try" in
3743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3744 *) ac_try_echo=$ac_try;;
3745esac
3746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3747$as_echo "$ac_try_echo"; } >&5
3748 (eval "$ac_try") 2>&5
3749 ac_status=$?
3750 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3751 test $ac_status = 0; }; }; then
3752 cross_compiling=no
3753 else
3754 if test "$cross_compiling" = maybe; then
3755 cross_compiling=yes
3756 else
3757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003759as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003760If you meant to cross compile, use \`--host'.
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003761See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 fi
3763 fi
3764fi
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3766$as_echo "$cross_compiling" >&6; }
3767
3768rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3769ac_clean_files=$ac_clean_files_save
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3771$as_echo_n "checking for suffix of object files... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003772if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $as_echo_n "(cached) " >&6
3774else
3775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003776/* end confdefs.h. */
3777
3778int
3779main ()
3780{
3781
3782 ;
3783 return 0;
3784}
3785_ACEOF
3786rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003787if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788case "(($ac_try" in
3789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3790 *) ac_try_echo=$ac_try;;
3791esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003792eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3793$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3797 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798 for ac_file in conftest.o conftest.obj conftest.*; do
3799 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3803 break;;
3804 esac
3805done
3806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003808sed 's/^/| /' conftest.$ac_ext >&5
3809
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003812as_fn_error $? "cannot compute suffix of object files: cannot compile
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003813See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003814fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003815rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3818$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819OBJEXT=$ac_cv_objext
3820ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3822$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003823if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003825else
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829int
3830main ()
3831{
3832#ifndef __GNUC__
3833 choke me
3834#endif
3835
3836 ;
3837 return 0;
3838}
3839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 ac_compiler_gnu=yes
3842else
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003846ac_cv_c_compiler_gnu=$ac_compiler_gnu
3847
3848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3850$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3851if test $ac_compiler_gnu = yes; then
3852 GCC=yes
3853else
3854 GCC=
3855fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003856ac_test_CFLAGS=${CFLAGS+set}
3857ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3859$as_echo_n "checking whether $CC accepts -g... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003860if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003862else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863 ac_save_c_werror_flag=$ac_c_werror_flag
3864 ac_c_werror_flag=yes
3865 ac_cv_prog_cc_g=no
3866 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870int
3871main ()
3872{
3873
3874 ;
3875 return 0;
3876}
3877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003878if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003879 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880else
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 CFLAGS=""
3882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883/* end confdefs.h. */
3884
3885int
3886main ()
3887{
3888
3889 ;
3890 return 0;
3891}
3892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003893if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894
Matthias Kloseb9621712010-04-24 17:59:49 +00003895else
3896 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899/* end confdefs.h. */
3900
3901int
3902main ()
3903{
3904
3905 ;
3906 return 0;
3907}
3908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003909if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3917 ac_c_werror_flag=$ac_save_c_werror_flag
3918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3920$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003922 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003923elif test $ac_cv_prog_cc_g = yes; then
3924 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003925 CFLAGS="-g -O2"
3926 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003927 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003928 fi
3929else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003930 if test "$GCC" = yes; then
3931 CFLAGS="-O2"
3932 else
3933 CFLAGS=
3934 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3937$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02003938if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003940else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003942ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003944/* end confdefs.h. */
3945#include <stdarg.h>
3946#include <stdio.h>
3947#include <sys/types.h>
3948#include <sys/stat.h>
3949/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3950struct buf { int x; };
3951FILE * (*rcsopen) (struct buf *, struct stat *, int);
3952static char *e (p, i)
3953 char **p;
3954 int i;
3955{
3956 return p[i];
3957}
3958static char *f (char * (*g) (char **, int), char **p, ...)
3959{
3960 char *s;
3961 va_list v;
3962 va_start (v,p);
3963 s = g (p, va_arg (v,int));
3964 va_end (v);
3965 return s;
3966}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003967
3968/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3969 function prototypes and stuff, but not '\xHH' hex character constants.
3970 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003972 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3973 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003975int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3978 inside strings and character constants. */
3979#define FOO(x) 'x'
3980int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3981
Skip Montanaro6dead952003-09-25 14:50:04 +00003982int test (int i, double x);
3983struct s1 {int (*f) (int a);};
3984struct s2 {int (*f) (double a);};
3985int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3986int argc;
3987char **argv;
3988int
3989main ()
3990{
3991return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3992 ;
3993 return 0;
3994}
3995_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3997 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003998do
3999 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004000 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003rm -f core conftest.err conftest.$ac_objext
4004 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004005done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004007CC=$ac_save_CC
4008
4009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010# AC_CACHE_VAL
4011case "x$ac_cv_prog_cc_c89" in
4012 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4014$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4017$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004018 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4021$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004022esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004023if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004024
Matthias Kloseb9621712010-04-24 17:59:49 +00004025fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004026
Martin v. Löwis11437992002-04-12 09:54:03 +00004027ac_ext=c
4028ac_cpp='$CPP $CPPFLAGS'
4029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4031ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004033
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004034
4035
Matthias Kloseb9621712010-04-24 17:59:49 +00004036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4037$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004040if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042
4043 case $withval in
4044 no) with_cxx_main=no
4045 MAINCC='$(CC)';;
4046 yes) with_cxx_main=yes
4047 MAINCC='$(CXX)';;
4048 *) with_cxx_main=yes
4049 MAINCC=$withval
4050 if test -z "$CXX"
4051 then
4052 CXX=$withval
4053 fi;;
4054 esac
4055else
4056
4057 with_cxx_main=no
4058 MAINCC='$(CC)'
4059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004060fi
4061
Matthias Kloseb9621712010-04-24 17:59:49 +00004062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4063$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004064
4065preset_cxx="$CXX"
4066if test -z "$CXX"
4067then
4068 case "$CC" in
4069 gcc) # Extract the first word of "g++", so it can be a program name with args.
4070set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4072$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004073if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075else
4076 case $CXX in
4077 [\\/]* | ?:[\\/]*)
4078 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4079 ;;
4080 *)
4081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4082for as_dir in notfound
4083do
4084 IFS=$as_save_IFS
4085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004087 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 +00004088 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004090 break 2
4091 fi
4092done
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004095
4096 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4097 ;;
4098esac
4099fi
4100CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004101if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4103$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004104else
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4106$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004108
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004109 ;;
4110 cc) # Extract the first word of "c++", so it can be a program name with args.
4111set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4113$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004114if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116else
4117 case $CXX in
4118 [\\/]* | ?:[\\/]*)
4119 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4120 ;;
4121 *)
4122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4123for as_dir in notfound
4124do
4125 IFS=$as_save_IFS
4126 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128 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 +00004129 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131 break 2
4132 fi
4133done
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004136
4137 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4138 ;;
4139esac
4140fi
4141CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004142if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4144$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4147$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004150 ;;
4151 esac
4152 if test "$CXX" = "notfound"
4153 then
4154 CXX=""
4155 fi
4156fi
4157if test -z "$CXX"
4158then
4159 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4160do
4161 # Extract the first word of "$ac_prog", so it can be a program name with args.
4162set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4164$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004165if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004167else
4168 if test -n "$CXX"; then
4169 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4170else
4171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4172for as_dir in $PATH
4173do
4174 IFS=$as_save_IFS
4175 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177 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 +00004178 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004180 break 2
4181 fi
4182done
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004185
4186fi
4187fi
4188CXX=$ac_cv_prog_CXX
4189if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4191$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004192else
Matthias Kloseb9621712010-04-24 17:59:49 +00004193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4194$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004195fi
4196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004198 test -n "$CXX" && break
4199done
4200test -n "$CXX" || CXX="notfound"
4201
4202 if test "$CXX" = "notfound"
4203 then
4204 CXX=""
4205 fi
4206fi
4207if test "$preset_cxx" != "$CXX"
4208then
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004210
4211 By default, distutils will build C++ extension modules with \"$CXX\".
4212 If this is not intended, then set CXX on the configure command line.
4213 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004214$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004215
4216 By default, distutils will build C++ extension modules with \"$CXX\".
4217 If this is not intended, then set CXX on the configure command line.
4218 " >&2;}
4219fi
4220
4221
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4223$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4224save_LDFLAGS="$LDFLAGS"
4225LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004226
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4228/* end confdefs.h. */
4229
4230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
4238if ac_fn_c_try_link "$LINENO"; then :
4239 NO_AS_NEEDED="-Wl,--no-as-needed"
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4241$as_echo "yes" >&6; }
4242else
4243 NO_AS_NEEDED=""
4244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4245$as_echo "no" >&6; }
4246fi
4247rm -f core conftest.err conftest.$ac_objext \
4248 conftest$ac_exeext conftest.$ac_ext
4249LDFLAGS="$save_LDFLAGS"
4250
4251
4252
4253# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004254ac_ext=c
4255ac_cpp='$CPP $CPPFLAGS'
4256ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4257ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4258ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4260$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004261# On Suns, sometimes $CPP names a directory.
4262if test -n "$CPP" && test -d "$CPP"; then
4263 CPP=
4264fi
4265if test -z "$CPP"; then
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004266 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004267 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004268else
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 # Double quotes because CPP needs to be expanded
4270 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4271 do
4272 ac_preproc_ok=false
4273for ac_c_preproc_warn_flag in '' yes
4274do
4275 # Use a header file that comes with gcc, so configuring glibc
4276 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004277 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4278 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004279 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004280 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004282/* end confdefs.h. */
4283#ifdef __STDC__
4284# include <limits.h>
4285#else
4286# include <assert.h>
4287#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004288 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004290if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004291
Matthias Kloseb9621712010-04-24 17:59:49 +00004292else
Martin v. Löwis11437992002-04-12 09:54:03 +00004293 # Broken: fails on valid input.
4294continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004295fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004296rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004299 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004302#include <ac_nonexistent.h>
4303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004304if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 # Broken: success on invalid input.
4306continue
4307else
Martin v. Löwis11437992002-04-12 09:54:03 +00004308 # Passes both tests.
4309ac_preproc_ok=:
4310break
4311fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004312rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004313
4314done
4315# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004316rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004317if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 break
4319fi
4320
4321 done
4322 ac_cv_prog_CPP=$CPP
4323
4324fi
4325 CPP=$ac_cv_prog_CPP
4326else
4327 ac_cv_prog_CPP=$CPP
4328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4330$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004331ac_preproc_ok=false
4332for ac_c_preproc_warn_flag in '' yes
4333do
4334 # Use a header file that comes with gcc, so configuring glibc
4335 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004336 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4337 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004338 # On the NeXT, cc -E runs the code through the compiler's parser,
4339 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004341/* end confdefs.h. */
4342#ifdef __STDC__
4343# include <limits.h>
4344#else
4345# include <assert.h>
4346#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004347 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004349if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004350
Matthias Kloseb9621712010-04-24 17:59:49 +00004351else
Martin v. Löwis11437992002-04-12 09:54:03 +00004352 # Broken: fails on valid input.
4353continue
4354fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004355rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004358 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004361#include <ac_nonexistent.h>
4362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004363if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004364 # Broken: success on invalid input.
4365continue
4366else
Martin v. Löwis11437992002-04-12 09:54:03 +00004367 # Passes both tests.
4368ac_preproc_ok=:
4369break
4370fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004371rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004372
4373done
4374# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004375rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004376if $ac_preproc_ok; then :
4377
Martin v. Löwis11437992002-04-12 09:54:03 +00004378else
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4380$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004381as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004382See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004383fi
4384
4385ac_ext=c
4386ac_cpp='$CPP $CPPFLAGS'
4387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4389ac_compiler_gnu=$ac_cv_c_compiler_gnu
4390
4391
Matthias Kloseb9621712010-04-24 17:59:49 +00004392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4393$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004394if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004396else
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004399 # Loop through the user's path and test for each of PROGNAME-LIST
4400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4402do
4403 IFS=$as_save_IFS
4404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 for ac_prog in grep ggrep; do
4406 for ac_exec_ext in '' $ac_executable_extensions; do
4407 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4408 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4409# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410 # Check for GNU $ac_path_GREP
4411case `"$ac_path_GREP" --version 2>&1` in
4412*GNU*)
4413 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4414*)
4415 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004416 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 while :
4418 do
4419 cat "conftest.in" "conftest.in" >"conftest.tmp"
4420 mv "conftest.tmp" "conftest.in"
4421 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4424 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4427 # Best one so far, save it but keep looking for a better one
4428 ac_cv_path_GREP="$ac_path_GREP"
4429 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004430 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 # 10*(2^10) chars as input seems more than enough
4432 test $ac_count -gt 10 && break
4433 done
4434 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4435esac
4436
Matthias Kloseb9621712010-04-24 17:59:49 +00004437 $ac_path_GREP_found && break 3
4438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004440 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004441IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004442 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004443 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 +00004444 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004445else
4446 ac_cv_path_GREP=$GREP
4447fi
4448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4451$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004452 GREP="$ac_cv_path_GREP"
4453
4454
Matthias Kloseb9621712010-04-24 17:59:49 +00004455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4456$as_echo_n "checking for egrep... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004457if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459else
4460 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4461 then ac_cv_path_EGREP="$GREP -E"
4462 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004464 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004465 # Loop through the user's path and test for each of PROGNAME-LIST
4466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4468do
4469 IFS=$as_save_IFS
4470 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 for ac_prog in egrep; do
4472 for ac_exec_ext in '' $ac_executable_extensions; do
4473 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4474 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4475# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004476 # Check for GNU $ac_path_EGREP
4477case `"$ac_path_EGREP" --version 2>&1` in
4478*GNU*)
4479 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4480*)
4481 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004482 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004483 while :
4484 do
4485 cat "conftest.in" "conftest.in" >"conftest.tmp"
4486 mv "conftest.tmp" "conftest.in"
4487 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004489 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4490 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004491 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004492 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4493 # Best one so far, save it but keep looking for a better one
4494 ac_cv_path_EGREP="$ac_path_EGREP"
4495 ac_path_EGREP_max=$ac_count
4496 fi
4497 # 10*(2^10) chars as input seems more than enough
4498 test $ac_count -gt 10 && break
4499 done
4500 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4501esac
4502
Matthias Kloseb9621712010-04-24 17:59:49 +00004503 $ac_path_EGREP_found && break 3
4504 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004505 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004506 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004507IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004508 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004509 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 +00004510 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004511else
4512 ac_cv_path_EGREP=$EGREP
4513fi
4514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004515 fi
4516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4518$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004519 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004520
4521
Matthias Kloseb9621712010-04-24 17:59:49 +00004522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4523$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004524if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004525 $as_echo_n "(cached) " >&6
4526else
4527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004528/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004529#include <stdlib.h>
4530#include <stdarg.h>
4531#include <string.h>
4532#include <float.h>
4533
4534int
4535main ()
4536{
4537
4538 ;
4539 return 0;
4540}
4541_ACEOF
4542if ac_fn_c_try_compile "$LINENO"; then :
4543 ac_cv_header_stdc=yes
4544else
4545 ac_cv_header_stdc=no
4546fi
4547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4548
4549if test $ac_cv_header_stdc = yes; then
4550 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4552/* end confdefs.h. */
4553#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004554
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004555_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004556if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004557 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004558
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004559else
Matthias Kloseb9621712010-04-24 17:59:49 +00004560 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004561fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004562rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004563
Matthias Kloseb9621712010-04-24 17:59:49 +00004564fi
4565
4566if test $ac_cv_header_stdc = yes; then
4567 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4569/* end confdefs.h. */
4570#include <stdlib.h>
4571
4572_ACEOF
4573if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4574 $EGREP "free" >/dev/null 2>&1; then :
4575
4576else
4577 ac_cv_header_stdc=no
4578fi
4579rm -f conftest*
4580
4581fi
4582
4583if test $ac_cv_header_stdc = yes; then
4584 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4585 if test "$cross_compiling" = yes; then :
4586 :
4587else
4588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4589/* end confdefs.h. */
4590#include <ctype.h>
4591#include <stdlib.h>
4592#if ((' ' & 0x0FF) == 0x020)
4593# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4594# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4595#else
4596# define ISLOWER(c) \
4597 (('a' <= (c) && (c) <= 'i') \
4598 || ('j' <= (c) && (c) <= 'r') \
4599 || ('s' <= (c) && (c) <= 'z'))
4600# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4601#endif
4602
4603#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4604int
4605main ()
4606{
4607 int i;
4608 for (i = 0; i < 256; i++)
4609 if (XOR (islower (i), ISLOWER (i))
4610 || toupper (i) != TOUPPER (i))
4611 return 2;
4612 return 0;
4613}
4614_ACEOF
4615if ac_fn_c_try_run "$LINENO"; then :
4616
4617else
4618 ac_cv_header_stdc=no
4619fi
4620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4621 conftest.$ac_objext conftest.beam conftest.$ac_ext
4622fi
4623
4624fi
4625fi
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4627$as_echo "$ac_cv_header_stdc" >&6; }
4628if test $ac_cv_header_stdc = yes; then
4629
4630$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4631
4632fi
4633
4634# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4635for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4636 inttypes.h stdint.h unistd.h
4637do :
4638 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4639ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4640"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004641if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004642 cat >>confdefs.h <<_ACEOF
4643#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4644_ACEOF
4645
4646fi
4647
4648done
4649
4650
4651
4652 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 +02004653if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004654 MINIX=yes
4655else
4656 MINIX=
4657fi
4658
4659
4660 if test "$MINIX" = yes; then
4661
4662$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4663
4664
4665$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4666
4667
4668$as_echo "#define _MINIX 1" >>confdefs.h
4669
4670 fi
4671
4672
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4674$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004675if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004676 $as_echo_n "(cached) " >&6
4677else
4678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4679/* end confdefs.h. */
4680
4681# define __EXTENSIONS__ 1
4682 $ac_includes_default
4683int
4684main ()
4685{
4686
4687 ;
4688 return 0;
4689}
4690_ACEOF
4691if ac_fn_c_try_compile "$LINENO"; then :
4692 ac_cv_safe_to_define___extensions__=yes
4693else
4694 ac_cv_safe_to_define___extensions__=no
4695fi
4696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4697fi
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4699$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4700 test $ac_cv_safe_to_define___extensions__ = yes &&
4701 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4702
4703 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4704
4705 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4706
4707 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4708
4709 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4710
4711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004713# Check for unsupported systems
4714case $ac_sys_system/$ac_sys_release in
4715atheos*|Linux*/1*)
4716 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4717 echo See README for details.
4718 exit 1;;
4719esac
4720
4721
Matthias Kloseb9621712010-04-24 17:59:49 +00004722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4723$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724
4725# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004726if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727 withval=$with_suffix;
4728 case $withval in
4729 no) EXEEXT=;;
4730 yes) EXEEXT=.exe;;
4731 *) EXEEXT=$withval;;
4732 esac
4733fi
4734
Matthias Kloseb9621712010-04-24 17:59:49 +00004735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4736$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004737
4738# Test whether we're running on a non-case-sensitive system, in which
4739# case we give a warning if no ext is given
4740
Matthias Kloseb9621712010-04-24 17:59:49 +00004741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4742$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743if test ! -d CaseSensitiveTestDir; then
4744mkdir CaseSensitiveTestDir
4745fi
4746
4747if test -d casesensitivetestdir
4748then
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4750$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751 BUILDEXEEXT=.exe
4752else
Matthias Kloseb9621712010-04-24 17:59:49 +00004753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4754$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755 BUILDEXEEXT=$EXEEXT
4756fi
4757rmdir CaseSensitiveTestDir
4758
4759case $MACHDEP in
4760bsdos*)
4761 case $CC in
4762 gcc) CC="$CC -D_HAVE_BSDI";;
4763 esac;;
4764esac
4765
4766case $ac_sys_system in
4767hp*|HP*)
4768 case $CC in
4769 cc|*/cc) CC="$CC -Ae";;
4770 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004771esac
4772
4773
4774
Matthias Kloseb9621712010-04-24 17:59:49 +00004775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4776$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004777if test -z "$LIBRARY"
4778then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004779 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4782$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783
4784# LDLIBRARY is the name of the library to link against (as opposed to the
4785# name of the library into which to insert object files). BLDLIBRARY is also
4786# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4787# is blank as the main program is not linked directly against LDLIBRARY.
4788# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4789# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4790# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4791# DLLLIBRARY is the shared (i.e., DLL) library.
4792#
4793# RUNSHARED is used to run shared python without installed libraries
4794#
4795# INSTSONAME is the name of the shared library that will be use to install
4796# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004797#
4798# LDVERSION is the shared library version number, normally the Python version
4799# with the ABI build flags appended.
4800
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004801
4802
4803
4804
4805
4806
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808LDLIBRARY="$LIBRARY"
4809BLDLIBRARY='$(LDLIBRARY)'
4810INSTSONAME='$(LDLIBRARY)'
4811DLLLIBRARY=''
4812LDLIBRARYDIR=''
4813RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004814LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004815
4816# LINKCC is the command that links the python executable -- default is $(CC).
4817# If CXX is set, and if it is needed to link a main function that was
4818# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4819# python might then depend on the C++ runtime
4820# This is altered for AIX in order to build the export list before
4821# linking.
4822
Matthias Kloseb9621712010-04-24 17:59:49 +00004823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4824$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825if test -z "$LINKCC"
4826then
4827 LINKCC='$(PURIFY) $(MAINCC)'
4828 case $ac_sys_system in
4829 AIX*)
4830 exp_extra="\"\""
4831 if test $ac_sys_release -ge 5 -o \
4832 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4833 exp_extra="."
4834 fi
4835 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004836 QNX*)
4837 # qcc must be used because the other compilers do not
4838 # support -N.
4839 LINKCC=qcc;;
4840 esac
4841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4843$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844
4845# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4846# make sure we default having it set to "no": this is used by
4847# distutils.unixccompiler to know if it should add --enable-new-dtags
4848# to linker command lines, and failing to detect GNU ld simply results
4849# in the same bahaviour as before.
4850
Matthias Kloseb9621712010-04-24 17:59:49 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4852$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853ac_prog=ld
4854if test "$GCC" = yes; then
4855 ac_prog=`$CC -print-prog-name=ld`
4856fi
4857case `"$ac_prog" -V 2>&1 < /dev/null` in
4858 *GNU*)
4859 GNULD=yes;;
4860 *)
4861 GNULD=no;;
4862esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4864$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4867$as_echo_n "checking for inline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02004868if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004869 $as_echo_n "(cached) " >&6
4870else
4871 ac_cv_c_inline=no
4872for ac_kw in inline __inline__ __inline; do
4873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4874/* end confdefs.h. */
4875#ifndef __cplusplus
4876typedef int foo_t;
4877static $ac_kw foo_t static_foo () {return 0; }
4878$ac_kw foo_t foo () {return 0; }
4879#endif
4880
4881_ACEOF
4882if ac_fn_c_try_compile "$LINENO"; then :
4883 ac_cv_c_inline=$ac_kw
4884fi
4885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4886 test "$ac_cv_c_inline" != no && break
4887done
4888
4889fi
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4891$as_echo "$ac_cv_c_inline" >&6; }
4892
4893case $ac_cv_c_inline in
4894 inline | yes) ;;
4895 *)
4896 case $ac_cv_c_inline in
4897 no) ac_val=;;
4898 *) ac_val=$ac_cv_c_inline;;
4899 esac
4900 cat >>confdefs.h <<_ACEOF
4901#ifndef __cplusplus
4902#define inline $ac_val
4903#endif
4904_ACEOF
4905 ;;
4906esac
4907
4908if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004909
4910$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004911
4912
4913fi
4914
4915
Matthias Kloseb9621712010-04-24 17:59:49 +00004916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4917$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004919if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004920 enableval=$enable_shared;
4921fi
4922
4923
4924if test -z "$enable_shared"
4925then
4926 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004927 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 enable_shared="yes";;
4929 *)
4930 enable_shared="no";;
4931 esac
4932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4934$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935
Matthias Kloseb9621712010-04-24 17:59:49 +00004936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4937$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004939if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940 enableval=$enable_profiling; ac_save_cc="$CC"
4941 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004942 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943 ac_enable_profiling="no"
4944else
Matthias Kloseb9621712010-04-24 17:59:49 +00004945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946/* end confdefs.h. */
4947int main() { return 0; }
4948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004949if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 ac_enable_profiling="yes"
4951else
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4955 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956fi
4957
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 CC="$ac_save_cc"
4959fi
4960
Matthias Kloseb9621712010-04-24 17:59:49 +00004961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4962$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963
4964case "$ac_enable_profiling" in
4965 "yes")
4966 BASECFLAGS="-pg $BASECFLAGS"
4967 LDFLAGS="-pg $LDFLAGS"
4968 ;;
4969esac
4970
Matthias Kloseb9621712010-04-24 17:59:49 +00004971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4972$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973
4974# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4975# library that we build, but we do not want to link against it (we
4976# will find it with a -framework option). For this reason there is an
4977# extra variable BLDLIBRARY against which Python and the extension
4978# modules are linked, BLDLIBRARY. This is normally the same as
4979# LDLIBRARY, but empty for MacOSX framework builds.
4980if test "$enable_framework"
4981then
4982 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4983 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4984 BLDLIBRARY=''
4985else
4986 BLDLIBRARY='$(LDLIBRARY)'
4987fi
4988
4989# Other platforms follow
4990if test $enable_shared = "yes"; then
4991
Matthias Kloseb9621712010-04-24 17:59:49 +00004992$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993
4994 case $ac_sys_system in
4995 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004996 LDLIBRARY='libpython$(LDVERSION).dll.a'
4997 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004998 ;;
4999 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005000 LDLIBRARY='libpython$(LDVERSION).so'
5001 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005002 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5003 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005004 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005005 then
5006 PY3LIBRARY=libpython3.so
5007 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005009 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005010 LDLIBRARY='libpython$(LDVERSION).so'
5011 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5013 case $ac_sys_system in
5014 FreeBSD*)
5015 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5016 ;;
5017 esac
5018 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005019 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005020 then
5021 PY3LIBRARY=libpython3.so
5022 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023 ;;
5024 hp*|HP*)
5025 case `uname -m` in
5026 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005027 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 ;;
5029 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005030 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 ;;
5032 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005033 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005034 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5035 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005037 LDLIBRARY='libpython$(LDVERSION).dylib'
5038 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5040 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005041 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005042 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005043 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5044 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045
5046 esac
5047else # shared is disabled
5048 case $ac_sys_system in
5049 CYGWIN*)
5050 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005051 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052 ;;
5053 esac
5054fi
5055
Matthias Kloseb9621712010-04-24 17:59:49 +00005056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5057$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005058
5059if test -n "$ac_tool_prefix"; then
5060 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5061set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5063$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005064if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066else
5067 if test -n "$RANLIB"; then
5068 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5069else
5070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071for as_dir in $PATH
5072do
5073 IFS=$as_save_IFS
5074 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079 break 2
5080 fi
5081done
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083IFS=$as_save_IFS
5084
5085fi
5086fi
5087RANLIB=$ac_cv_prog_RANLIB
5088if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5090$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091else
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5093$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005094fi
5095
5096
5097fi
5098if test -z "$ac_cv_prog_RANLIB"; then
5099 ac_ct_RANLIB=$RANLIB
5100 # Extract the first word of "ranlib", so it can be a program name with args.
5101set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005104if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005106else
5107 if test -n "$ac_ct_RANLIB"; then
5108 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5109else
5110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5117 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 break 2
5120 fi
5121done
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123IFS=$as_save_IFS
5124
5125fi
5126fi
5127ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5128if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5130$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131else
Matthias Kloseb9621712010-04-24 17:59:49 +00005132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005134fi
5135
5136 if test "x$ac_ct_RANLIB" = x; then
5137 RANLIB=":"
5138 else
5139 case $cross_compiling:$ac_tool_warned in
5140yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005141{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5142$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143ac_tool_warned=yes ;;
5144esac
5145 RANLIB=$ac_ct_RANLIB
5146 fi
5147else
5148 RANLIB="$ac_cv_prog_RANLIB"
5149fi
5150
5151
5152for ac_prog in ar aal
5153do
5154 # Extract the first word of "$ac_prog", so it can be a program name with args.
5155set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005158if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005159 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160else
5161 if test -n "$AR"; then
5162 ac_cv_prog_AR="$AR" # Let the user override the test.
5163else
5164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165for as_dir in $PATH
5166do
5167 IFS=$as_save_IFS
5168 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005169 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5171 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005173 break 2
5174 fi
5175done
Matthias Kloseb9621712010-04-24 17:59:49 +00005176 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177IFS=$as_save_IFS
5178
5179fi
5180fi
5181AR=$ac_cv_prog_AR
5182if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5184$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185else
Matthias Kloseb9621712010-04-24 17:59:49 +00005186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188fi
5189
5190
5191 test -n "$AR" && break
5192done
5193test -n "$AR" || AR="ar"
5194
5195
5196# tweak ARFLAGS only if the user didn't set it on the command line
5197
5198if test -z "$ARFLAGS"
5199then
5200 ARFLAGS="rc"
5201fi
5202
5203
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005204DISABLE_ASDLGEN=""
5205# Extract the first word of "python", so it can be a program name with args.
5206set dummy python; ac_word=$2
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005209if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005210 $as_echo_n "(cached) " >&6
5211else
5212 if test -n "$HAS_PYTHON"; then
5213 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5214else
5215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216for as_dir in $PATH
5217do
5218 IFS=$as_save_IFS
5219 test -z "$as_dir" && as_dir=.
5220 for ac_exec_ext in '' $ac_executable_extensions; do
5221 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5222 ac_cv_prog_HAS_PYTHON="found"
5223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224 break 2
5225 fi
5226done
5227 done
5228IFS=$as_save_IFS
5229
5230 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5231fi
5232fi
5233HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5234if test -n "$HAS_PYTHON"; then
5235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5236$as_echo "$HAS_PYTHON" >&6; }
5237else
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5239$as_echo "no" >&6; }
5240fi
5241
5242
5243if test $HAS_HG != found -o $HAS_PYTHON != found
5244then
5245 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5246fi
5247
5248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005249case $MACHDEP in
5250bsdos*|hp*|HP*)
5251 # install -d does not work on BSDI or HP-UX
5252 if test -z "$INSTALL"
5253 then
5254 INSTALL="${srcdir}/install-sh -c"
5255 fi
5256esac
5257ac_aux_dir=
5258for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005259 if test -f "$ac_dir/install-sh"; then
5260 ac_aux_dir=$ac_dir
5261 ac_install_sh="$ac_aux_dir/install-sh -c"
5262 break
5263 elif test -f "$ac_dir/install.sh"; then
5264 ac_aux_dir=$ac_dir
5265 ac_install_sh="$ac_aux_dir/install.sh -c"
5266 break
5267 elif test -f "$ac_dir/shtool"; then
5268 ac_aux_dir=$ac_dir
5269 ac_install_sh="$ac_aux_dir/shtool install -c"
5270 break
5271 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005272done
5273if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005274 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275fi
5276
5277# These three variables are undocumented and unsupported,
5278# and are intended to be withdrawn in a future Autoconf release.
5279# They can cause serious problems if a builder's source tree is in a directory
5280# whose full name contains unusual characters.
5281ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5282ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5283ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5284
5285
5286# Find a good install program. We prefer a C program (faster),
5287# so one script is as good as another. But avoid the broken or
5288# incompatible versions:
5289# SysV /etc/install, /usr/sbin/install
5290# SunOS /usr/etc/install
5291# IRIX /sbin/install
5292# AIX /bin/install
5293# AmigaOS /C/install, which installs bootblocks on floppy discs
5294# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5295# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5296# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5297# OS/2's system install, which has a completely different semantic
5298# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005299# Reject install programs that cannot install multiple files.
5300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5301$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005302if test -z "$INSTALL"; then
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005303if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005304 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305else
5306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in $PATH
5308do
5309 IFS=$as_save_IFS
5310 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005311 # Account for people who put trailing slashes in PATH elements.
5312case $as_dir/ in #((
5313 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005315 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316 /usr/ucb/* ) ;;
5317 *)
5318 # OSF1 and SCO ODT 3.0 have their own names for install.
5319 # Don't use installbsd from OSF since it installs stuff as root
5320 # by default.
5321 for ac_prog in ginstall scoinst install; do
5322 for ac_exec_ext in '' $ac_executable_extensions; do
5323 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5324 if test $ac_prog = install &&
5325 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5326 # AIX install. It has an incompatible calling convention.
5327 :
5328 elif test $ac_prog = install &&
5329 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5330 # program-specific install script used by HP pwplus--don't use.
5331 :
5332 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005333 rm -rf conftest.one conftest.two conftest.dir
5334 echo one > conftest.one
5335 echo two > conftest.two
5336 mkdir conftest.dir
5337 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5338 test -s conftest.one && test -s conftest.two &&
5339 test -s conftest.dir/conftest.one &&
5340 test -s conftest.dir/conftest.two
5341 then
5342 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5343 break 3
5344 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345 fi
5346 fi
5347 done
5348 done
5349 ;;
5350esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005351
5352 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005353IFS=$as_save_IFS
5354
Matthias Kloseb9621712010-04-24 17:59:49 +00005355rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356
5357fi
5358 if test "${ac_cv_path_install+set}" = set; then
5359 INSTALL=$ac_cv_path_install
5360 else
5361 # As a last resort, use the slow shell script. Don't cache a
5362 # value for INSTALL within a source directory, because that will
5363 # break other packages using the cache if that directory is
5364 # removed, or if the value is a relative name.
5365 INSTALL=$ac_install_sh
5366 fi
5367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5369$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005370
5371# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5372# It thinks the first close brace ends the variable substitution.
5373test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5374
5375test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5376
5377test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5378
5379
5380# Not every filesystem supports hard links
5381
5382if test -z "$LN" ; then
5383 case $ac_sys_system in
5384 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385 *) LN=ln;;
5386 esac
5387fi
5388
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005389# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005390
5391ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005392
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5395$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396
5397# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005398if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399 withval=$with_pydebug;
5400if test "$withval" != no
5401then
5402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5406$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005408 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005409else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5410$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411fi
5412else
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5414$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415fi
5416
5417
5418# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5419# merged with this chunk of code?
5420
5421# Optimizer/debugger flags
5422# ------------------------
5423# (The following bit of code is complicated enough - please keep things
5424# indented properly. Just pretend you're editing Python code. ;-)
5425
5426# There are two parallel sets of case statements below, one that checks to
5427# see if OPT was set and one that does BASECFLAGS setting based upon
5428# compiler and platform. BASECFLAGS tweaks need to be made even if the
5429# user set OPT.
5430
5431# tweak OPT based on compiler and platform, only if the user didn't set
5432# it on the command line
5433
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005434if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005435then
5436 case $GCC in
5437 yes)
5438 if test "$CC" != 'g++' ; then
5439 STRICT_PROTO="-Wstrict-prototypes"
5440 fi
5441 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5442 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5443 WRAP="-fwrapv"
5444 fi
5445 case $ac_cv_prog_cc_g in
5446 yes)
5447 if test "$Py_DEBUG" = 'true' ; then
5448 # Optimization messes up debuggers, so turn it off for
5449 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005450 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005451 else
5452 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5453 fi
5454 ;;
5455 *)
5456 OPT="-O3 -Wall $STRICT_PROTO"
5457 ;;
5458 esac
5459 case $ac_sys_system in
5460 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5461 ;;
5462 esac
5463 ;;
5464
5465 *)
5466 OPT="-O"
5467 ;;
5468 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005469fi
5470
5471
5472
5473# The -arch flags for universal builds on OSX
5474UNIVERSAL_ARCH_FLAGS=
5475
5476
5477# tweak BASECFLAGS based on compiler and platform
5478case $GCC in
5479yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005480 # Python doesn't violate C99 aliasing rules, but older versions of
5481 # GCC produce warnings for legal Python code. Enable
5482 # -fno-strict-aliasing on versions of GCC that support but produce
5483 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5485$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486 ac_save_cc="$CC"
5487 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005488 save_CFLAGS="$CFLAGS"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005489 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005490 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005491else
Matthias Kloseb9621712010-04-24 17:59:49 +00005492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005494
Matthias Kloseb159a552010-04-25 21:00:44 +00005495
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005496int
5497main ()
5498{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005499
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005500 ;
5501 return 0;
5502}
Matthias Kloseb159a552010-04-25 21:00:44 +00005503
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005505if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005506
5507 CC="$ac_save_cc -fstrict-aliasing"
5508 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005510/* end confdefs.h. */
5511
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005512 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005513int
5514main ()
5515{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005516double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005517 ;
5518 return 0;
5519}
Matthias Kloseb159a552010-04-25 21:00:44 +00005520
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005522if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005523
5524 ac_cv_no_strict_aliasing=no
5525
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526else
Matthias Kloseb159a552010-04-25 21:00:44 +00005527
5528 ac_cv_no_strict_aliasing=yes
5529
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005530fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005532
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005533else
Matthias Kloseb159a552010-04-25 21:00:44 +00005534
5535 ac_cv_no_strict_aliasing=no
5536
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005539fi
5540
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005541 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005542 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5544$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005545 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546 then
5547 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5548 fi
5549
5550 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5551 # support. Without this, treatment of subnormals doesn't follow
5552 # the standard.
5553 case $ac_sys_machine in
5554 alpha*)
5555 BASECFLAGS="$BASECFLAGS -mieee"
5556 ;;
5557 esac
5558
5559 case $ac_sys_system in
5560 SCO_SV*)
5561 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5562 ;;
5563 # is there any other compiler on Darwin besides gcc?
5564 Darwin*)
5565 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5566 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005567 if test "${CC}" = gcc
5568 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5570$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005571 case "${UNIVERSALSDK}" in
5572 */MacOSX10.4u.sdk)
5573 # Build using 10.4 SDK, force usage of gcc when the
5574 # compiler is gcc, otherwise the user will get very
5575 # confusing error messages when building on OSX 10.6
5576 CC=gcc-4.0
5577 CPP=cpp-4.0
5578 ;;
5579 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5581$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005582 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583
5584
5585 if test "${enable_universalsdk}"; then
5586 UNIVERSAL_ARCH_FLAGS=""
5587 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5588 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5589 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005590 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5592 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005593 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005594 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595
5596 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5597 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005598 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005599 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005601 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5602 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005603 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005604 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005605
5606 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5607 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005608 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005609 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005612 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 +00005613
5614 fi
5615
5616
Ronald Oussoren666028b2010-04-18 19:07:43 +00005617 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5618 if test "${UNIVERSALSDK}" != "/"
5619 then
5620 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5621 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005622 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623 fi
5624 fi
5625
5626 # Calculate the right deployment target for this build.
5627 #
5628 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5629 if test ${cur_target} '>' 10.2; then
5630 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005631 if test ${enable_universalsdk}; then
5632 if test "${UNIVERSAL_ARCHS}" = "all"; then
5633 # Ensure that the default platform for a
5634 # 4-way universal build is OSX 10.5,
5635 # that's the first OS release where
5636 # 4-way builds make sense.
5637 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005638
5639 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5640 cur_target='10.5'
5641
5642 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5643 cur_target='10.5'
5644
5645 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5646 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005647 fi
5648 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005649 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005650 # On Intel macs default to a deployment
5651 # target of 10.4, that's the first OSX
5652 # release with Intel support.
5653 cur_target="10.4"
5654 fi
5655 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656 fi
5657 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5658
5659 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5660 # environment with a value that is the same as what we'll use
5661 # in the Makefile to ensure that we'll get the same compiler
5662 # environment during configure and build time.
5663 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5664 export MACOSX_DEPLOYMENT_TARGET
5665 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5666
5667 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 esac
5669 ;;
5670
5671*)
5672 case $ac_sys_system in
5673 OpenUNIX*|UnixWare*)
5674 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5675 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 SCO_SV*)
5677 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5678 ;;
5679 esac
5680 ;;
5681esac
5682
5683if test "$Py_DEBUG" = 'true'; then
5684 :
5685else
5686 OPT="-DNDEBUG $OPT"
5687fi
5688
5689if test "$ac_arch_flags"
5690then
5691 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5692fi
5693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694# Check whether GCC supports PyArg_ParseTuple format
5695if test "$GCC" = "yes"
5696then
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5698$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699 save_CFLAGS=$CFLAGS
5700 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702/* end confdefs.h. */
5703
5704 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705int
5706main ()
5707{
5708
5709 ;
5710 return 0;
5711}
Matthias Kloseb159a552010-04-25 21:00:44 +00005712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005714if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715
Matthias Kloseb159a552010-04-25 21:00:44 +00005716
Matthias Kloseb9621712010-04-24 17:59:49 +00005717$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
Matthias Kloseb159a552010-04-25 21:00:44 +00005719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005720$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005721
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722else
Matthias Kloseb159a552010-04-25 21:00:44 +00005723
5724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005725$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
5727fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5729 CFLAGS=$save_CFLAGS
5730fi
5731
5732# On some compilers, pthreads are available without further options
5733# (e.g. MacOS X). On some of these systems, the compiler will not
5734# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5735# So we have to see first whether pthreads are available without
5736# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5738$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005739if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741else
Matthias Kloseb9621712010-04-24 17:59:49 +00005742 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 ac_cv_pthread_is_default=no
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746/* end confdefs.h. */
5747
5748#include <pthread.h>
5749
5750void* routine(void* p){return NULL;}
5751
5752int main(){
5753 pthread_t p;
5754 if(pthread_create(&p,NULL,routine,NULL)!=0)
5755 return 1;
5756 (void)pthread_detach(p);
5757 return 0;
5758}
5759
5760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005761if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762
5763 ac_cv_pthread_is_default=yes
5764 ac_cv_kthread=no
5765 ac_cv_pthread=no
5766
5767else
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772fi
5773
5774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775fi
5776
Matthias Kloseb9621712010-04-24 17:59:49 +00005777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5778$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779
5780
5781if test $ac_cv_pthread_is_default = yes
5782then
5783 ac_cv_kpthread=no
5784else
5785# -Kpthread, if available, provides the right #defines
5786# and linker options to make pthread_create available
5787# Some compilers won't report that they do not support -Kpthread,
5788# so we need to run a program to see whether it really made the
5789# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5791$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005792if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005793 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794else
5795 ac_save_cc="$CC"
5796CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005797if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798 ac_cv_kpthread=no
5799else
Matthias Kloseb9621712010-04-24 17:59:49 +00005800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801/* end confdefs.h. */
5802
5803#include <pthread.h>
5804
5805void* routine(void* p){return NULL;}
5806
5807int main(){
5808 pthread_t p;
5809 if(pthread_create(&p,NULL,routine,NULL)!=0)
5810 return 1;
5811 (void)pthread_detach(p);
5812 return 0;
5813}
5814
5815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005816if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817 ac_cv_kpthread=yes
5818else
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823fi
5824
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825CC="$ac_save_cc"
5826fi
5827
Matthias Kloseb9621712010-04-24 17:59:49 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5829$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830fi
5831
5832if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5833then
5834# -Kthread, if available, provides the right #defines
5835# and linker options to make pthread_create available
5836# Some compilers won't report that they do not support -Kthread,
5837# so we need to run a program to see whether it really made the
5838# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5840$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005841if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005842 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843else
5844 ac_save_cc="$CC"
5845CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005846if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847 ac_cv_kthread=no
5848else
Matthias Kloseb9621712010-04-24 17:59:49 +00005849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850/* end confdefs.h. */
5851
5852#include <pthread.h>
5853
5854void* routine(void* p){return NULL;}
5855
5856int main(){
5857 pthread_t p;
5858 if(pthread_create(&p,NULL,routine,NULL)!=0)
5859 return 1;
5860 (void)pthread_detach(p);
5861 return 0;
5862}
5863
5864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005865if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866 ac_cv_kthread=yes
5867else
Matthias Kloseb9621712010-04-24 17:59:49 +00005868 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5871 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872fi
5873
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874CC="$ac_save_cc"
5875fi
5876
Matthias Kloseb9621712010-04-24 17:59:49 +00005877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5878$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
5880
5881if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5882then
5883# -pthread, if available, provides the right #defines
5884# and linker options to make pthread_create available
5885# Some compilers won't report that they do not support -pthread,
5886# so we need to run a program to see whether it really made the
5887# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5889$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005890if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005891 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892else
5893 ac_save_cc="$CC"
5894CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005895if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 ac_cv_pthread=no
5897else
Matthias Kloseb9621712010-04-24 17:59:49 +00005898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899/* end confdefs.h. */
5900
5901#include <pthread.h>
5902
5903void* routine(void* p){return NULL;}
5904
5905int main(){
5906 pthread_t p;
5907 if(pthread_create(&p,NULL,routine,NULL)!=0)
5908 return 1;
5909 (void)pthread_detach(p);
5910 return 0;
5911}
5912
5913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005914if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ac_cv_pthread=yes
5916else
Matthias Kloseb9621712010-04-24 17:59:49 +00005917 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5920 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921fi
5922
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923CC="$ac_save_cc"
5924fi
5925
Matthias Kloseb9621712010-04-24 17:59:49 +00005926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5927$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928fi
5929
5930# If we have set a CC compiler flag for thread support then
5931# check if it works for CXX, too.
5932ac_cv_cxx_thread=no
5933if test ! -z "$CXX"
5934then
Matthias Kloseb9621712010-04-24 17:59:49 +00005935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5936$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937ac_save_cxx="$CXX"
5938
5939if test "$ac_cv_kpthread" = "yes"
5940then
5941 CXX="$CXX -Kpthread"
5942 ac_cv_cxx_thread=yes
5943elif test "$ac_cv_kthread" = "yes"
5944then
5945 CXX="$CXX -Kthread"
5946 ac_cv_cxx_thread=yes
5947elif test "$ac_cv_pthread" = "yes"
5948then
5949 CXX="$CXX -pthread"
5950 ac_cv_cxx_thread=yes
5951fi
5952
5953if test $ac_cv_cxx_thread = yes
5954then
5955 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5956 $CXX -c conftest.$ac_ext 2>&5
5957 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5958 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5959 then
5960 ac_cv_cxx_thread=yes
5961 else
5962 ac_cv_cxx_thread=no
5963 fi
5964 rm -fr conftest*
5965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5967$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968fi
5969CXX="$ac_save_cxx"
5970
5971
5972# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5974$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02005975if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005976 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977else
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979/* end confdefs.h. */
5980#include <stdlib.h>
5981#include <stdarg.h>
5982#include <string.h>
5983#include <float.h>
5984
5985int
5986main ()
5987{
5988
5989 ;
5990 return 0;
5991}
5992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005993if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 ac_cv_header_stdc=yes
5995else
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5999
6000if test $ac_cv_header_stdc = yes; then
6001 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003/* end confdefs.h. */
6004#include <string.h>
6005
6006_ACEOF
6007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 $EGREP "memchr" >/dev/null 2>&1; then :
6009
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010else
6011 ac_cv_header_stdc=no
6012fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006013rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014
6015fi
6016
6017if test $ac_cv_header_stdc = yes; then
6018 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020/* end confdefs.h. */
6021#include <stdlib.h>
6022
6023_ACEOF
6024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 $EGREP "free" >/dev/null 2>&1; then :
6026
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027else
6028 ac_cv_header_stdc=no
6029fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006030rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031
6032fi
6033
6034if test $ac_cv_header_stdc = yes; then
6035 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037 :
6038else
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040/* end confdefs.h. */
6041#include <ctype.h>
6042#include <stdlib.h>
6043#if ((' ' & 0x0FF) == 0x020)
6044# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6045# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6046#else
6047# define ISLOWER(c) \
6048 (('a' <= (c) && (c) <= 'i') \
6049 || ('j' <= (c) && (c) <= 'r') \
6050 || ('s' <= (c) && (c) <= 'z'))
6051# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6052#endif
6053
6054#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6055int
6056main ()
6057{
6058 int i;
6059 for (i = 0; i < 256; i++)
6060 if (XOR (islower (i), ISLOWER (i))
6061 || toupper (i) != TOUPPER (i))
6062 return 2;
6063 return 0;
6064}
6065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006066if ac_fn_c_try_run "$LINENO"; then :
6067
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068else
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6072 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073fi
6074
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075fi
6076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6078$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079if test $ac_cv_header_stdc = yes; then
6080
Matthias Kloseb9621712010-04-24 17:59:49 +00006081$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082
6083fi
6084
Benjamin Peterson799bd802011-08-31 22:15:17 -04006085for 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 +00006086fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006087ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006088sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006089unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006090sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6091sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006092sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6093sys/stat.h sys/termio.h sys/time.h \
6094sys/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 -07006095libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006096bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006097do :
6098 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6099ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006100if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006101 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006102#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006103_ACEOF
6104
6105fi
6106
Guido van Rossum627b2d71993-12-24 10:39:16 +00006107done
6108
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006109ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006110for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006111 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6113$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006114if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006115 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006116else
Matthias Kloseb9621712010-04-24 17:59:49 +00006117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006118/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006119#include <sys/types.h>
6120#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006121
Martin v. Löwis11437992002-04-12 09:54:03 +00006122int
6123main ()
6124{
6125if ((DIR *) 0)
6126return 0;
6127 ;
6128 return 0;
6129}
6130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006132 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006133else
Matthias Kloseb9621712010-04-24 17:59:49 +00006134 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006138eval ac_res=\$$as_ac_Header
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6140$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006141if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006142 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006143#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006144_ACEOF
6145
6146ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006147fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006149done
6150# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6151if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6153$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006154if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006155 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006156else
Martin v. Löwis11437992002-04-12 09:54:03 +00006157 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006161/* Override any GCC internal prototype to avoid an error.
6162 Use char because int might match the return type of a GCC
6163 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006164#ifdef __cplusplus
6165extern "C"
6166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006167char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006168int
6169main ()
6170{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006172 ;
6173 return 0;
6174}
6175_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176for ac_lib in '' dir; do
6177 if test -z "$ac_lib"; then
6178 ac_res="none required"
6179 else
6180 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006181 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006182 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006183 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006186rm -f core conftest.err conftest.$ac_objext \
6187 conftest$ac_exeext
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006188 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191done
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006192if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006194else
6195 ac_cv_search_opendir=no
6196fi
6197rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006198LIBS=$ac_func_search_save_LIBS
6199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6201$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006202ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006203if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006206fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006207
Michael W. Hudson54241132001-12-07 15:38:26 +00006208else
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6210$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006211if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006212 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006213else
6214 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218/* Override any GCC internal prototype to avoid an error.
6219 Use char because int might match the return type of a GCC
6220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006221#ifdef __cplusplus
6222extern "C"
6223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006224char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006225int
6226main ()
6227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006229 ;
6230 return 0;
6231}
6232_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233for ac_lib in '' x; do
6234 if test -z "$ac_lib"; then
6235 ac_res="none required"
6236 else
6237 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006240 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006243rm -f core conftest.err conftest.$ac_objext \
6244 conftest$ac_exeext
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006245 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248done
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006249if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251else
6252 ac_cv_search_opendir=no
6253fi
6254rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006255LIBS=$ac_func_search_save_LIBS
6256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6258$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006260if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006262
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006263fi
6264
6265fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006266
Matthias Kloseb9621712010-04-24 17:59:49 +00006267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6268$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006269if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271else
Matthias Kloseb9621712010-04-24 17:59:49 +00006272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006273/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275int
6276main ()
6277{
6278return makedev(0, 0);
6279 ;
6280 return 0;
6281}
6282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284 ac_cv_header_sys_types_h_makedev=yes
6285else
Matthias Kloseb9621712010-04-24 17:59:49 +00006286 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006288rm -f core conftest.err conftest.$ac_objext \
6289 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290
6291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6293$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294
6295if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006296ac_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 +02006297if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006298
Matthias Kloseb9621712010-04-24 17:59:49 +00006299$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300
6301fi
6302
6303
6304
6305 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006306 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 +02006307if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006308
Matthias Kloseb9621712010-04-24 17:59:49 +00006309$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006310
6311fi
6312
6313
6314 fi
6315fi
6316
Michael W. Hudson54241132001-12-07 15:38:26 +00006317
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006318# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6319for ac_header in net/if.h
6320do :
6321 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6322#ifdef STDC_HEADERS
6323# include <stdlib.h>
6324# include <stddef.h>
6325#else
6326# ifdef HAVE_STDLIB_H
6327# include <stdlib.h>
6328# endif
6329#endif
6330#ifdef HAVE_SYS_SOCKET_H
6331# include <sys/socket.h>
6332#endif
6333
6334"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006335if test "x$ac_cv_header_net_if_h" = x""yes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006336 cat >>confdefs.h <<_ACEOF
6337#define HAVE_NET_IF_H 1
6338_ACEOF
6339
6340fi
6341
6342done
6343
6344
6345
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006347for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006348do :
6349 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006350#ifdef HAVE_CURSES_H
6351#include <curses.h>
6352#endif
6353
Matthias Kloseb9621712010-04-24 17:59:49 +00006354"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006355if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006356 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006357#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006358_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006359
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006360fi
6361
6362done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363
6364
Martin v. Löwis11017b12006-01-14 18:12:57 +00006365# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006366for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006367do :
6368 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 +00006369#ifdef HAVE_ASM_TYPES_H
6370#include <asm/types.h>
6371#endif
6372#ifdef HAVE_SYS_SOCKET_H
6373#include <sys/socket.h>
6374#endif
6375
Matthias Kloseb9621712010-04-24 17:59:49 +00006376"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006377if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006378 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006379#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006380_ACEOF
6381
6382fi
6383
6384done
6385
6386
Guido van Rossum627b2d71993-12-24 10:39:16 +00006387# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006388was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6390$as_echo_n "checking for clock_t in time.h... " >&6; }
6391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006392/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006393#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006394
6395_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006396if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006397 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006398 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006399else
Martin v. Löwis11437992002-04-12 09:54:03 +00006400
6401
Matthias Kloseb9621712010-04-24 17:59:49 +00006402$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006403
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006404
Guido van Rossum627b2d71993-12-24 10:39:16 +00006405fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006406rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006407
Matthias Kloseb9621712010-04-24 17:59:49 +00006408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6409$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006410
Matthias Kloseb9621712010-04-24 17:59:49 +00006411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6412$as_echo_n "checking for makedev... " >&6; }
6413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006414/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006415
Jesus Cea740f53a2010-04-28 11:35:30 +00006416#if defined(MAJOR_IN_MKDEV)
6417#include <sys/mkdev.h>
6418#elif defined(MAJOR_IN_SYSMACROS)
6419#include <sys/sysmacros.h>
6420#else
6421#include <sys/types.h>
6422#endif
6423
Neal Norwitz11690112002-07-30 01:08:28 +00006424int
6425main ()
6426{
Jesus Cea740f53a2010-04-28 11:35:30 +00006427
6428 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006429 ;
6430 return 0;
6431}
Matthias Kloseb159a552010-04-25 21:00:44 +00006432
Neal Norwitz11690112002-07-30 01:08:28 +00006433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006434if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006435 ac_cv_has_makedev=yes
6436else
Matthias Kloseb9621712010-04-24 17:59:49 +00006437 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006439rm -f core conftest.err conftest.$ac_objext \
6440 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6442$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006443if test "$ac_cv_has_makedev" = "yes"; then
6444
Matthias Kloseb9621712010-04-24 17:59:49 +00006445$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006446
6447fi
6448
Martin v. Löwis399a6892002-10-04 10:22:02 +00006449# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6450# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6451# defined, but the compiler does not support pragma redefine_extname,
6452# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6453# structures (such as rlimit64) without declaring them. As a
6454# work-around, disable LFS on such configurations
6455
6456use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6458$as_echo_n "checking Solaris LFS bug... " >&6; }
6459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006460/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006461
6462#define _LARGEFILE_SOURCE 1
6463#define _FILE_OFFSET_BITS 64
6464#include <sys/resource.h>
6465
Martin v. Löwis399a6892002-10-04 10:22:02 +00006466int
6467main ()
6468{
6469struct rlimit foo;
6470 ;
6471 return 0;
6472}
6473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006475 sol_lfs_bug=no
6476else
Matthias Kloseb9621712010-04-24 17:59:49 +00006477 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6481$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006482if test "$sol_lfs_bug" = "yes"; then
6483 use_lfs=no
6484fi
6485
6486if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006487# Two defines needed to enable largefile support on various platforms
6488# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006489case $ac_sys_system/$ac_sys_release in
6490AIX*)
6491
6492$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6493
6494 ;;
6495esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006496
Matthias Kloseb9621712010-04-24 17:59:49 +00006497$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006498
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006501
Martin v. Löwis399a6892002-10-04 10:22:02 +00006502fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006503
Guido van Rossum84e7b241996-08-19 21:59:00 +00006504# Add some code to confdefs.h so that the test for off_t works on SCO
6505cat >> confdefs.h <<\EOF
6506#if defined(SCO_DS)
6507#undef _OFF_T
6508#endif
6509EOF
6510
Guido van Rossumef2255b2000-03-10 22:30:29 +00006511# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006512ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006513if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006514
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006515else
Martin v. Löwis11437992002-04-12 09:54:03 +00006516
6517cat >>confdefs.h <<_ACEOF
6518#define mode_t int
6519_ACEOF
6520
6521fi
6522
Matthias Kloseb9621712010-04-24 17:59:49 +00006523ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006524if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006525
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006526else
Martin v. Löwis11437992002-04-12 09:54:03 +00006527
6528cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006529#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006530_ACEOF
6531
6532fi
6533
Matthias Kloseb9621712010-04-24 17:59:49 +00006534ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006535if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006536
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006537else
Martin v. Löwis11437992002-04-12 09:54:03 +00006538
6539cat >>confdefs.h <<_ACEOF
6540#define pid_t int
6541_ACEOF
6542
6543fi
6544
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006545
Martin v. Löwis11437992002-04-12 09:54:03 +00006546cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006547#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006549
Matthias Kloseb9621712010-04-24 17:59:49 +00006550ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006551if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006552
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006553else
Martin v. Löwis11437992002-04-12 09:54:03 +00006554
6555cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006557_ACEOF
6558
6559fi
6560
Matthias Kloseb9621712010-04-24 17:59:49 +00006561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6562$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006563if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006564 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006565else
Matthias Kloseb9621712010-04-24 17:59:49 +00006566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006567/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006568#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006569
6570_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006573 ac_cv_type_uid_t=yes
6574else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006575 ac_cv_type_uid_t=no
6576fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006577rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006578
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6581$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006582if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006583
Matthias Kloseb9621712010-04-24 17:59:49 +00006584$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006585
6586
Matthias Kloseb9621712010-04-24 17:59:49 +00006587$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006588
6589fi
6590
Matthias Kloseb9621712010-04-24 17:59:49 +00006591ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6592case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006593 no|yes) ;; #(
6594 *)
6595
Matthias Kloseb9621712010-04-24 17:59:49 +00006596$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006597
6598
6599cat >>confdefs.h <<_ACEOF
6600#define uint32_t $ac_cv_c_uint32_t
6601_ACEOF
6602;;
6603 esac
6604
Matthias Kloseb9621712010-04-24 17:59:49 +00006605ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6606case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006607 no|yes) ;; #(
6608 *)
6609
Matthias Kloseb9621712010-04-24 17:59:49 +00006610$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006611
6612
6613cat >>confdefs.h <<_ACEOF
6614#define uint64_t $ac_cv_c_uint64_t
6615_ACEOF
6616;;
6617 esac
6618
Matthias Kloseb9621712010-04-24 17:59:49 +00006619ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6620case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006621 no|yes) ;; #(
6622 *)
6623
6624cat >>confdefs.h <<_ACEOF
6625#define int32_t $ac_cv_c_int32_t
6626_ACEOF
6627;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006628esac
6629
Matthias Kloseb9621712010-04-24 17:59:49 +00006630ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6631case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006632 no|yes) ;; #(
6633 *)
6634
6635cat >>confdefs.h <<_ACEOF
6636#define int64_t $ac_cv_c_int64_t
6637_ACEOF
6638;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006639esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006640
Matthias Kloseb9621712010-04-24 17:59:49 +00006641ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006642if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006643
Matthias Kloseb9621712010-04-24 17:59:49 +00006644$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006645
6646fi
6647
Jack Jansendd19cf82001-12-06 22:36:17 +00006648
Michael W. Hudson54241132001-12-07 15:38:26 +00006649# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006650# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006651# The cast to long int works around a bug in the HP C Compiler
6652# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6653# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6654# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6656$as_echo_n "checking size of int... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006657if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006658 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006659else
Matthias Kloseb9621712010-04-24 17:59:49 +00006660 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 +00006661
Martin v. Löwis11437992002-04-12 09:54:03 +00006662else
Matthias Kloseb9621712010-04-24 17:59:49 +00006663 if test "$ac_cv_type_int" = yes; then
6664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006666as_fn_error 77 "cannot compute sizeof (int)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006667See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006668 else
6669 ac_cv_sizeof_int=0
6670 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6675$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006676
6677
6678
Martin v. Löwis11437992002-04-12 09:54:03 +00006679cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006680#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006681_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006682
6683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684# The cast to long int works around a bug in the HP C Compiler
6685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6687# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6689$as_echo_n "checking size of long... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006690if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006691 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006692else
Matthias Kloseb9621712010-04-24 17:59:49 +00006693 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 +00006694
Martin v. Löwis11437992002-04-12 09:54:03 +00006695else
Matthias Kloseb9621712010-04-24 17:59:49 +00006696 if test "$ac_cv_type_long" = yes; then
6697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006699as_fn_error 77 "cannot compute sizeof (long)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006700See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006701 else
6702 ac_cv_sizeof_long=0
6703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6708$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709
6710
6711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006713#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006714_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006715
6716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717# The cast to long int works around a bug in the HP C Compiler
6718# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6719# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6720# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6722$as_echo_n "checking size of void *... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006723if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006725else
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 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 +00006727
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 if test "$ac_cv_type_void_p" = yes; then
6730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006732as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006733See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006734 else
6735 ac_cv_sizeof_void_p=0
6736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6741$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006742
6743
6744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006746#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006747_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006748
6749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006750# The cast to long int works around a bug in the HP C Compiler
6751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6753# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6755$as_echo_n "checking size of short... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006756if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006758else
Matthias Kloseb9621712010-04-24 17:59:49 +00006759 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 +00006760
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Kloseb9621712010-04-24 17:59:49 +00006762 if test "$ac_cv_type_short" = yes; then
6763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006765as_fn_error 77 "cannot compute sizeof (short)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006766See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006767 else
6768 ac_cv_sizeof_short=0
6769 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6774$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006775
6776
6777
Martin v. Löwis11437992002-04-12 09:54:03 +00006778cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006779#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006780_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006781
6782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783# The cast to long int works around a bug in the HP C Compiler
6784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6786# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6788$as_echo_n "checking size of float... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006789if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006790 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006791else
Matthias Kloseb9621712010-04-24 17:59:49 +00006792 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 +00006793
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 if test "$ac_cv_type_float" = yes; then
6796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006798as_fn_error 77 "cannot compute sizeof (float)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006799See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006800 else
6801 ac_cv_sizeof_float=0
6802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6807$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006808
6809
6810
Martin v. Löwis11437992002-04-12 09:54:03 +00006811cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006812#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006813_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006814
6815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816# The cast to long int works around a bug in the HP C Compiler
6817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6819# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6821$as_echo_n "checking size of double... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006822if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006824else
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 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 +00006826
Martin v. Löwis11437992002-04-12 09:54:03 +00006827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 if test "$ac_cv_type_double" = yes; then
6829 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006831as_fn_error 77 "cannot compute sizeof (double)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006832See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006833 else
6834 ac_cv_sizeof_double=0
6835 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006837
Martin v. Löwis11437992002-04-12 09:54:03 +00006838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6840$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841
6842
6843
Martin v. Löwis11437992002-04-12 09:54:03 +00006844cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006845#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006846_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006847
6848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849# The cast to long int works around a bug in the HP C Compiler
6850# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6851# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6852# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6854$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006855if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006857else
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 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 +00006859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860else
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 if test "$ac_cv_type_fpos_t" = yes; then
6862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006864as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006865See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006866 else
6867 ac_cv_sizeof_fpos_t=0
6868 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006870
Martin v. Löwis11437992002-04-12 09:54:03 +00006871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6873$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874
6875
6876
Martin v. Löwis11437992002-04-12 09:54:03 +00006877cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006878#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006879_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006880
Michael W. Hudson54241132001-12-07 15:38:26 +00006881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882# The cast to long int works around a bug in the HP C Compiler
6883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6885# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6887$as_echo_n "checking size of size_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006888if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006889 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006890else
Matthias Kloseb9621712010-04-24 17:59:49 +00006891 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 +00006892
Martin v. Löwis18e16552006-02-15 17:27:45 +00006893else
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 if test "$ac_cv_type_size_t" = yes; then
6895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006897as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006898See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006899 else
6900 ac_cv_sizeof_size_t=0
6901 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006903
Martin v. Löwis18e16552006-02-15 17:27:45 +00006904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6906$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907
6908
6909
Martin v. Löwis18e16552006-02-15 17:27:45 +00006910cat >>confdefs.h <<_ACEOF
6911#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6912_ACEOF
6913
6914
Christian Heimes400adb02008-02-01 08:12:03 +00006915# The cast to long int works around a bug in the HP C Compiler
6916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6918# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6920$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006921if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006922 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006923else
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006925
Christian Heimes400adb02008-02-01 08:12:03 +00006926else
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 if test "$ac_cv_type_pid_t" = yes; then
6928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006930as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006931See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006932 else
6933 ac_cv_sizeof_pid_t=0
6934 fi
6935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006936
Christian Heimes400adb02008-02-01 08:12:03 +00006937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6939$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006940
6941
6942
6943cat >>confdefs.h <<_ACEOF
6944#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6945_ACEOF
6946
6947
Michael W. Hudson54241132001-12-07 15:38:26 +00006948
Matthias Kloseb9621712010-04-24 17:59:49 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6950$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006951have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006953/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006954
Martin v. Löwis11437992002-04-12 09:54:03 +00006955int
6956main ()
6957{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006958long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 ;
6960 return 0;
6961}
6962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006963if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006964
6965
Matthias Kloseb9621712010-04-24 17:59:49 +00006966$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006967
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006968 have_long_long=yes
6969
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6973$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006974if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975# The cast to long int works around a bug in the HP C Compiler
6976# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6977# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6978# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6980$as_echo_n "checking size of long long... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006981if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006983else
Matthias Kloseb9621712010-04-24 17:59:49 +00006984 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 +00006985
Martin v. Löwis11437992002-04-12 09:54:03 +00006986else
Matthias Kloseb9621712010-04-24 17:59:49 +00006987 if test "$ac_cv_type_long_long" = yes; then
6988 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006990as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02006991See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006992 else
6993 ac_cv_sizeof_long_long=0
6994 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6999$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000
7001
7002
Martin v. Löwis11437992002-04-12 09:54:03 +00007003cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007004#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007005_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007006
Michael W. Hudson54241132001-12-07 15:38:26 +00007007
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007008fi
7009
Matthias Kloseb9621712010-04-24 17:59:49 +00007010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7011$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007012have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007014/* end confdefs.h. */
7015
7016int
7017main ()
7018{
7019long double x; x = (long double)0;
7020 ;
7021 return 0;
7022}
7023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007024if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007025
7026
Matthias Kloseb9621712010-04-24 17:59:49 +00007027$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007028
7029 have_long_double=yes
7030
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007031fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7034$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007035if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007036# The cast to long int works around a bug in the HP C Compiler
7037# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7038# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7039# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7041$as_echo_n "checking size of long double... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007042if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007044else
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 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 +00007046
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007047else
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 if test "$ac_cv_type_long_double" = yes; then
7049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007051as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007052See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007053 else
7054 ac_cv_sizeof_long_double=0
7055 fi
7056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007057
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7060$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007061
7062
7063
7064cat >>confdefs.h <<_ACEOF
7065#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7066_ACEOF
7067
7068
7069fi
7070
7071
Matthias Kloseb9621712010-04-24 17:59:49 +00007072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7073$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007074have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007076/* end confdefs.h. */
7077
7078int
7079main ()
7080{
7081_Bool x; x = (_Bool)0;
7082 ;
7083 return 0;
7084}
7085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007086if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007087
7088
Matthias Kloseb9621712010-04-24 17:59:49 +00007089$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007090
7091 have_c99_bool=yes
7092
Thomas Woutersb2137042007-02-01 18:02:27 +00007093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7096$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007097if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007098# The cast to long int works around a bug in the HP C Compiler
7099# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7100# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7101# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7103$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007104if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007106else
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 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 +00007108
Thomas Woutersb2137042007-02-01 18:02:27 +00007109else
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 if test "$ac_cv_type__Bool" = yes; then
7111 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7112$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007113as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007114See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007115 else
7116 ac_cv_sizeof__Bool=0
7117 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007119
Thomas Woutersb2137042007-02-01 18:02:27 +00007120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7122$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123
7124
7125
Thomas Woutersb2137042007-02-01 18:02:27 +00007126cat >>confdefs.h <<_ACEOF
7127#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7128_ACEOF
7129
7130
7131fi
7132
Matthias Kloseb9621712010-04-24 17:59:49 +00007133ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007134 #include <stdint.h>
7135 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007136 #ifdef HAVE_INTTYPES_H
7137 #include <inttypes.h>
7138 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007139"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007140if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007141
7142cat >>confdefs.h <<_ACEOF
7143#define HAVE_UINTPTR_T 1
7144_ACEOF
7145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146# The cast to long int works around a bug in the HP C Compiler
7147# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7148# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7149# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7151$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007152if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007154else
Matthias Kloseb9621712010-04-24 17:59:49 +00007155 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 +00007156
Martin v. Löwis11437992002-04-12 09:54:03 +00007157else
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 if test "$ac_cv_type_uintptr_t" = yes; then
7159 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007161as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007162See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007163 else
7164 ac_cv_sizeof_uintptr_t=0
7165 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007167
Martin v. Löwis11437992002-04-12 09:54:03 +00007168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7170$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007171
7172
7173
Martin v. Löwis11437992002-04-12 09:54:03 +00007174cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007175#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007176_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007177
Michael W. Hudson54241132001-12-07 15:38:26 +00007178
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007179fi
7180
Thomas Wouters89f507f2006-12-13 04:49:30 +00007181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007182# The cast to long int works around a bug in the HP C Compiler
7183# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7184# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7185# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7187$as_echo_n "checking size of off_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007188if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007189 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007190else
Matthias Kloseb9621712010-04-24 17:59:49 +00007191 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007192#ifdef HAVE_SYS_TYPES_H
7193#include <sys/types.h>
7194#endif
7195
Matthias Kloseb9621712010-04-24 17:59:49 +00007196"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007198else
Matthias Kloseb9621712010-04-24 17:59:49 +00007199 if test "$ac_cv_type_off_t" = yes; then
7200 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007202as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007203See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007204 else
7205 ac_cv_sizeof_off_t=0
7206 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007208
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7211$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007212
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007213
7214
Martin v. Löwis11437992002-04-12 09:54:03 +00007215cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007216#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007217_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007218
Michael W. Hudson54241132001-12-07 15:38:26 +00007219
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220
Matthias Kloseb9621712010-04-24 17:59:49 +00007221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7222$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007223if test "$have_long_long" = yes
7224then
7225if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007226 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007227
Matthias Kloseb9621712010-04-24 17:59:49 +00007228$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007229
Matthias Kloseb9621712010-04-24 17:59:49 +00007230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7231$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007232else
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7234$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007235fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007236else
Matthias Kloseb9621712010-04-24 17:59:49 +00007237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007239fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007241# The cast to long int works around a bug in the HP C Compiler
7242# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7243# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7244# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7246$as_echo_n "checking size of time_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007247if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007248 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249else
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007251#ifdef HAVE_SYS_TYPES_H
7252#include <sys/types.h>
7253#endif
7254#ifdef HAVE_TIME_H
7255#include <time.h>
7256#endif
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260else
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 if test "$ac_cv_type_time_t" = yes; then
7262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007264as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007265See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266 else
7267 ac_cv_sizeof_time_t=0
7268 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007270
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7273$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275
7276
Martin v. Löwis11437992002-04-12 09:54:03 +00007277cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007278#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007279_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007280
Michael W. Hudson54241132001-12-07 15:38:26 +00007281
7282
Trent Mick635f6fb2000-08-23 21:33:05 +00007283# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007284ac_save_cc="$CC"
7285if test "$ac_cv_kpthread" = "yes"
7286then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007287elif test "$ac_cv_kthread" = "yes"
7288then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007289elif test "$ac_cv_pthread" = "yes"
7290then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007291fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007292
Matthias Kloseb9621712010-04-24 17:59:49 +00007293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7294$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007295have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007297/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007298
7299 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007300int
7301main ()
7302{
Guido van Rossum12580492000-09-24 16:47:19 +00007303pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007304 ;
7305 return 0;
7306}
Matthias Kloseb159a552010-04-25 21:00:44 +00007307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007309if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007310 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7314$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007315if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7319# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7321$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007322if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007324else
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007326#ifdef HAVE_PTHREAD_H
7327#include <pthread.h>
7328#endif
7329
Matthias Kloseb9621712010-04-24 17:59:49 +00007330"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007332else
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 if test "$ac_cv_type_pthread_t" = yes; then
7334 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007336as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007337See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007338 else
7339 ac_cv_sizeof_pthread_t=0
7340 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007342
Trent Mick635f6fb2000-08-23 21:33:05 +00007343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7345$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007346
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007347
7348
Martin v. Löwis11437992002-04-12 09:54:03 +00007349cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007350#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007351_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007352
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007353
Trent Mick635f6fb2000-08-23 21:33:05 +00007354fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007355CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007356
Michael W. Hudson54241132001-12-07 15:38:26 +00007357
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007358case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007359 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007360 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7361 ;;
7362 Darwin/*)
7363 OTHER_LIBTOOL_OPT=""
7364 ;;
7365esac
7366
7367
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007368ARCH_RUN_32BIT=""
7369
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007370case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007371 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007372 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7373 if test "${enable_universalsdk}"; then
7374 :
7375 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007376 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007377 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007378 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007379 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007380 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007381 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007382 if test ${gcc_version} '<' 4.0
7383 then
7384 LIBTOOL_CRUFT="-lcc_dynamic"
7385 else
7386 LIBTOOL_CRUFT=""
7387 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007389 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007390else
Matthias Kloseb9621712010-04-24 17:59:49 +00007391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007392/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007393
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007394 #include <unistd.h>
7395 int main(int argc, char*argv[])
7396 {
7397 if (sizeof(long) == 4) {
7398 return 0;
7399 } else {
7400 return 1;
7401 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007402 }
7403
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007405if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007406 ac_osx_32bit=yes
7407else
Matthias Kloseb9621712010-04-24 17:59:49 +00007408 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7411 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007412fi
7413
7414
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007415 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007416 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007417 i386)
7418 MACOSX_DEFAULT_ARCH="i386"
7419 ;;
7420 ppc)
7421 MACOSX_DEFAULT_ARCH="ppc"
7422 ;;
7423 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007424 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007425 ;;
7426 esac
7427 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007428 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007429 i386)
7430 MACOSX_DEFAULT_ARCH="x86_64"
7431 ;;
7432 ppc)
7433 MACOSX_DEFAULT_ARCH="ppc64"
7434 ;;
7435 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007436 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007437 ;;
7438 esac
7439
7440 #ARCH_RUN_32BIT="true"
7441 fi
7442
7443 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007444 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007445 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007446esac
7447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7449$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007450if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007451then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007452 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007453 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007454 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007455
Matthias Kloseb9621712010-04-24 17:59:49 +00007456$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7459$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007460 if test $enable_shared = "yes"
7461 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007462 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 +00007463 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7466$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007467fi
7468
Matthias Kloseb9621712010-04-24 17:59:49 +00007469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7470$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007471case $ac_sys_system/$ac_sys_release in
7472 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007473
Matthias Kloseb9621712010-04-24 17:59:49 +00007474$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007475
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7477$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007478 ;;
7479 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7481$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007482 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007483esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007484
Guido van Rossum0a516c91994-09-12 10:58:40 +00007485# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007486
Michael W. Hudson54241132001-12-07 15:38:26 +00007487
7488
7489
7490
Benjamin Peterson99f03762010-04-11 22:15:28 +00007491
Thomas Wouters477c8d52006-05-27 19:21:47 +00007492
Georg Brandlb1441c72009-01-03 22:33:39 +00007493
Thomas Wouters477c8d52006-05-27 19:21:47 +00007494cat >>confdefs.h <<_ACEOF
7495#define SHLIB_EXT "$SO"
7496_ACEOF
7497
Guido van Rossum0a516c91994-09-12 10:58:40 +00007498# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007499# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007500# (Shared libraries in this instance are shared modules to be loaded into
7501# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7503$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007504if test -z "$LDSHARED"
7505then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007506 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007507 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007508 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007509 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007510 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007511 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007512 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007513 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007514 if test "$GCC" = "yes" ; then
7515 LDSHARED='$(CC) -shared'
7516 LDCXXSHARED='$(CXX) -shared'
7517 else
7518 LDSHARED='$(CC) -G'
7519 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007520 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007521 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007522 if test "$GCC" = "yes" ; then
7523 LDSHARED='$(CC) -shared'
7524 LDCXXSHARED='$(CXX) -shared'
7525 else
7526 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007527 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007528 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007529 LDSHARED='$(CC) -bundle'
7530 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007531 if test "$enable_framework" ; then
7532 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007533 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7534 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007535 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007536 else
7537 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007538 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007539 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007540 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007541 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007542 LDSHARED='$(CC) -bundle'
7543 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007544 if test "$enable_framework" ; then
7545 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007546 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7547 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007548 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007549 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007550 # No framework, use the Python app as bundle-loader
7551 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007552 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007553 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007554 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007555 Darwin/*)
7556 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7557 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007558
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007559 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007560 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007561 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007562 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007563 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007564 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7565 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007566 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007567 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007568 LDSHARED='$(CC) -bundle'
7569 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007570 if test "$enable_framework" ; then
7571 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007572 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7573 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007574 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007575 else
7576 # No framework, use the Python app as bundle-loader
7577 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7578 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007579 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007580 fi
7581 fi
7582 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007583 Linux*|GNU*|QNX*)
7584 LDSHARED='$(CC) -shared'
7585 LDCXXSHARED='$(CXX) -shared';;
7586 BSD/OS*/4*)
7587 LDSHARED="gcc -shared"
7588 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007589 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007590 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007591 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007592 LDSHARED='$(CC) -shared'
7593 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007594 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007595 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007596 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007597 OpenBSD*)
7598 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7599 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007600 LDSHARED='$(CC) -shared $(CCSHARED)'
7601 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007602 else
7603 case `uname -r` in
7604 [01].* | 2.[0-7] | 2.[0-7].*)
7605 LDSHARED="ld -Bshareable ${LDFLAGS}"
7606 ;;
7607 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007608 LDSHARED='$(CC) -shared $(CCSHARED)'
7609 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007610 ;;
7611 esac
7612 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007613 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007614 LDSHARED='$(CC) -shared'
7615 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007616 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007617 if test "$GCC" = "yes" ; then
7618 LDSHARED='$(CC) -shared'
7619 LDCXXSHARED='$(CXX) -shared'
7620 else
7621 LDSHARED='$(CC) -G'
7622 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007623 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007624 SCO_SV*)
7625 LDSHARED='$(CC) -Wl,-G,-Bexport'
7626 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7627 CYGWIN*)
7628 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7629 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007630 *) LDSHARED="ld";;
7631 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7634$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007635LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007636BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007637# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007638# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7640$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007641if test -z "$CCSHARED"
7642then
Guido van Rossum07397971997-04-29 21:49:50 +00007643 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007644 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007645 then CCSHARED="-fPIC";
7646 elif test `uname -p` = sparc;
7647 then CCSHARED="-xcode=pic32";
7648 else CCSHARED="-Kpic";
7649 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007650 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007651 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007652 else CCSHARED="+z";
7653 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007654 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007655 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007656 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007657 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007658 if test "$GCC" = "yes"
7659 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007660 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007661 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007662 SCO_SV*)
7663 if test "$GCC" = "yes"
7664 then CCSHARED="-fPIC"
7665 else CCSHARED="-Kpic -belf"
7666 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007667 IRIX*/6*) case $CC in
7668 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007669 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007670 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007671 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7674$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007675# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007676# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7678$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679if test -z "$LINKFORSHARED"
7680then
Guido van Rossum07397971997-04-29 21:49:50 +00007681 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007682 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007683 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007684 LINKFORSHARED="-Wl,-E -Wl,+s";;
7685# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007686 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007687 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007688 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007689 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007690 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007691 if test "$enable_framework"
7692 then
Jack Jansenda49e192005-01-07 13:08:22 +00007693 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007694 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007695 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007696 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007697 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007698 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007699 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007700 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7701 then
7702 LINKFORSHARED="-Wl,--export-dynamic"
7703 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007704 SunOS/5*) case $CC in
7705 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007706 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007707 then
7708 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007709 fi;;
7710 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007711 CYGWIN*)
7712 if test $enable_shared = "no"
7713 then
7714 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7715 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007716 QNX*)
7717 # -Wl,-E causes the symbols to be added to the dynamic
7718 # symbol table so that they can be found when a module
7719 # is loaded. -N 2048K causes the stack size to be set
7720 # to 2048 kilobytes so that the stack doesn't overflow
7721 # when running test_compile.py.
7722 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007723 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7726$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007727
Michael W. Hudson54241132001-12-07 15:38:26 +00007728
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007729
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7731$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007732if test ! "$LIBRARY" = "$LDLIBRARY"
7733then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007734 case $ac_sys_system in
7735 CYGWIN*)
7736 # Cygwin needs CCSHARED when building extension DLLs
7737 # but not when building the interpreter DLL.
7738 CFLAGSFORSHARED='';;
7739 *)
7740 CFLAGSFORSHARED='$(CCSHARED)'
7741 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7744$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007745
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007746# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7747# library (with --enable-shared).
7748# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007749# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7750# if it is not required, since it creates a dependency of the shared library
7751# to LIBS. This, in turn, means that applications linking the shared libpython
7752# don't need to link LIBS explicitly. The default should be only changed
7753# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007754
Matthias Kloseb9621712010-04-24 17:59:49 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7756$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007757case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007758 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007759 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007760esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7762$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007763
7764
Guido van Rossum627b2d71993-12-24 10:39:16 +00007765# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7767$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007768if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007769 $as_echo_n "(cached) " >&6
7770else
7771 ac_check_lib_save_LIBS=$LIBS
7772LIBS="-lsendfile $LIBS"
7773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7774/* end confdefs.h. */
7775
7776/* Override any GCC internal prototype to avoid an error.
7777 Use char because int might match the return type of a GCC
7778 builtin and then its argument prototype would still apply. */
7779#ifdef __cplusplus
7780extern "C"
7781#endif
7782char sendfile ();
7783int
7784main ()
7785{
7786return sendfile ();
7787 ;
7788 return 0;
7789}
7790_ACEOF
7791if ac_fn_c_try_link "$LINENO"; then :
7792 ac_cv_lib_sendfile_sendfile=yes
7793else
7794 ac_cv_lib_sendfile_sendfile=no
7795fi
7796rm -f core conftest.err conftest.$ac_objext \
7797 conftest$ac_exeext conftest.$ac_ext
7798LIBS=$ac_check_lib_save_LIBS
7799fi
7800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7801$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007802if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007803 cat >>confdefs.h <<_ACEOF
7804#define HAVE_LIBSENDFILE 1
7805_ACEOF
7806
7807 LIBS="-lsendfile $LIBS"
7808
7809fi
7810
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7812$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007813if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007815else
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007817LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821/* Override any GCC internal prototype to avoid an error.
7822 Use char because int might match the return type of a GCC
7823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007824#ifdef __cplusplus
7825extern "C"
7826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007827char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007828int
7829main ()
7830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 ;
7833 return 0;
7834}
7835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007838else
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841rm -f core conftest.err conftest.$ac_objext \
7842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007843LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7846$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007847if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 cat >>confdefs.h <<_ACEOF
7849#define HAVE_LIBDL 1
7850_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007851
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007852 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007853
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007854fi
7855 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7857$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007858if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007860else
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007862LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866/* Override any GCC internal prototype to avoid an error.
7867 Use char because int might match the return type of a GCC
7868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007869#ifdef __cplusplus
7870extern "C"
7871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007872char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007873int
7874main ()
7875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 ;
7878 return 0;
7879}
7880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886rm -f core conftest.err conftest.$ac_objext \
7887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007888LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7891$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007892if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 cat >>confdefs.h <<_ACEOF
7894#define HAVE_LIBDLD 1
7895_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007897 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007898
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007899fi
7900 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007901
Georg Brandlb1441c72009-01-03 22:33:39 +00007902# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007903if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7905$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007906if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007907 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007908else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007909 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913/* Override any GCC internal prototype to avoid an error.
7914 Use char because int might match the return type of a GCC
7915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007916#ifdef __cplusplus
7917extern "C"
7918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007919char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007920int
7921main ()
7922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 ;
7925 return 0;
7926}
7927_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928for ac_lib in '' pthread rt posix4; do
7929 if test -z "$ac_lib"; then
7930 ac_res="none required"
7931 else
7932 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007933 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938rm -f core conftest.err conftest.$ac_objext \
7939 conftest$ac_exeext
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007940 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943done
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007944if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946else
7947 ac_cv_search_sem_init=no
7948fi
7949rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007950LIBS=$ac_func_search_save_LIBS
7951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7953$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007955if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007957
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007958fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007959 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007960 # posix4 on Solaris 2.6
7961 # pthread (first!) on Linux
7962fi
7963
Martin v. Löwis19d17342003-06-14 21:03:05 +00007964# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7966$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02007967if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007969else
7970 ac_check_lib_save_LIBS=$LIBS
7971LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007973/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975/* Override any GCC internal prototype to avoid an error.
7976 Use char because int might match the return type of a GCC
7977 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007978#ifdef __cplusplus
7979extern "C"
7980#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007981char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007982int
7983main ()
7984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007986 ;
7987 return 0;
7988}
7989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007991 ac_cv_lib_intl_textdomain=yes
7992else
Matthias Kloseb9621712010-04-24 17:59:49 +00007993 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007995rm -f core conftest.err conftest.$ac_objext \
7996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007997LIBS=$ac_check_lib_save_LIBS
7998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8000$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008001if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008002
Matthias Kloseb9621712010-04-24 17:59:49 +00008003$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008004
Brett Cannonc6d936e2009-06-07 20:09:53 +00008005 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008006fi
8007
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008008
8009# checks for system dependent C++ extensions support
8010case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8012$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008014/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008015
Georg Brandl59e87bd2011-02-15 19:48:59 +00008016 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008017int
8018main ()
8019{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008020loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008021 ;
8022 return 0;
8023}
Matthias Kloseb159a552010-04-25 21:00:44 +00008024
Martin v. Löwis11437992002-04-12 09:54:03 +00008025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008026if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008027
Matthias Kloseb159a552010-04-25 21:00:44 +00008028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
Matthias Kloseb159a552010-04-25 21:00:44 +00008031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008032$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008033
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008034else
Matthias Kloseb159a552010-04-25 21:00:44 +00008035
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008037$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008038
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008040rm -f core conftest.err conftest.$ac_objext \
8041 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008042 *) ;;
8043esac
8044
Guido van Rossum70c7f481998-03-26 18:44:10 +00008045# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8047$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008048if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008050else
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008052LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056/* Override any GCC internal prototype to avoid an error.
8057 Use char because int might match the return type of a GCC
8058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008059#ifdef __cplusplus
8060extern "C"
8061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008062char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008063int
8064main ()
8065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008067 ;
8068 return 0;
8069}
8070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008072 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008073else
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076rm -f core conftest.err conftest.$ac_objext \
8077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008078LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8081$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008082if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008084fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008085 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8087$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008088if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008090else
Martin v. Löwis11437992002-04-12 09:54:03 +00008091 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008092LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096/* Override any GCC internal prototype to avoid an error.
8097 Use char because int might match the return type of a GCC
8098 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008099#ifdef __cplusplus
8100extern "C"
8101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008102char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008103int
8104main ()
8105{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ;
8108 return 0;
8109}
8110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008111if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008113else
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116rm -f core conftest.err conftest.$ac_objext \
8117 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008118LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8121$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008122if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008123 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008124fi
8125 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8128$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008131if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8134$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008135LIBS="$withval $LIBS"
8136
8137else
Matthias Kloseb9621712010-04-24 17:59:49 +00008138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8139$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140fi
8141
Guido van Rossum7f43da71994-08-01 12:15:30 +00008142
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008143if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008144 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8145set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8147$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008148if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008149 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008150else
8151 case $PKG_CONFIG in
8152 [\\/]* | ?:[\\/]*)
8153 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8154 ;;
8155 *)
8156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8157for as_dir in $PATH
8158do
8159 IFS=$as_save_IFS
8160 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008162 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8163 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008165 break 2
8166 fi
8167done
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008169IFS=$as_save_IFS
8170
8171 ;;
8172esac
8173fi
8174PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8175if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8177$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008178else
Matthias Kloseb9621712010-04-24 17:59:49 +00008179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8180$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008181fi
8182
8183
8184fi
8185if test -z "$ac_cv_path_PKG_CONFIG"; then
8186 ac_pt_PKG_CONFIG=$PKG_CONFIG
8187 # Extract the first word of "pkg-config", so it can be a program name with args.
8188set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8190$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008191if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008193else
8194 case $ac_pt_PKG_CONFIG in
8195 [\\/]* | ?:[\\/]*)
8196 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8197 ;;
8198 *)
8199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8200for as_dir in $PATH
8201do
8202 IFS=$as_save_IFS
8203 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008205 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8206 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008207 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008208 break 2
8209 fi
8210done
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008212IFS=$as_save_IFS
8213
8214 ;;
8215esac
8216fi
8217ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8218if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8220$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008221else
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8223$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008224fi
8225
8226 if test "x$ac_pt_PKG_CONFIG" = x; then
8227 PKG_CONFIG=""
8228 else
8229 case $cross_compiling:$ac_tool_warned in
8230yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8232$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008233ac_tool_warned=yes ;;
8234esac
8235 PKG_CONFIG=$ac_pt_PKG_CONFIG
8236 fi
8237else
8238 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8239fi
8240
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008241
8242# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8244$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008245
8246# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008247if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008248 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008249else
8250 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008251fi
8252
8253
Matthias Kloseb9621712010-04-24 17:59:49 +00008254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8255$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008256
8257# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8259$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008260
8261# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008262if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008263 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008264else
8265 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008266fi
8267
8268
8269if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008270 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8271else
8272 LIBFFI_INCLUDEDIR=""
8273fi
8274
8275
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8277$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008278
Benjamin Peterson076ed002010-10-31 17:11:02 +00008279# Check for support for loadable sqlite extensions
8280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8281$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8282# Check whether --enable-loadable-sqlite-extensions was given.
8283if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8284 enableval=$enable_loadable_sqlite_extensions;
8285else
8286 enable_loadable_sqlite_extensions="no"
8287fi
8288
8289
8290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8291$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8292
Matthias Klose55708cc2009-04-30 08:06:49 +00008293# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8295$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008296
8297# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008298if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008299 withval=$with_dbmliborder;
8300if test x$with_dbmliborder = xyes
8301then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008302as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008303else
8304 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8305 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8306 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008307 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008308 fi
8309 done
8310fi
8311fi
8312
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8314$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008315
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008316# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008317
8318
Matthias Kloseb9621712010-04-24 17:59:49 +00008319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8320$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008323if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324 withval=$with_signal_module;
8325fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008326
8327
8328if test -z "$with_signal_module"
8329then with_signal_module="yes"
8330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8332$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008333
8334if test "${with_signal_module}" = "yes"; then
8335 USE_SIGNAL_MODULE=""
8336 SIGNAL_OBJS=""
8337else
8338 USE_SIGNAL_MODULE="#"
8339 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8340fi
8341
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008342# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008343
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008344USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346
Martin v. Löwis11437992002-04-12 09:54:03 +00008347
8348# Templates for things AC_DEFINEd more than once.
8349# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008350
8351
Martin v. Löwis11437992002-04-12 09:54:03 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8354$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008357if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358 withval=$with_threads;
8359fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008360
8361
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008362# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366 withval=$with_thread; with_threads=$with_thread
8367fi
8368
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008369
8370if test -z "$with_threads"
8371then with_threads="yes"
8372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8374$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008375
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008376
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008377if test "$with_threads" = "no"
8378then
8379 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008380elif test "$ac_cv_pthread_is_default" = yes
8381then
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008383
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008384 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008386
8387 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008388 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008389elif test "$ac_cv_kpthread" = "yes"
8390then
8391 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008392 if test "$ac_cv_cxx_thread" = "yes"; then
8393 CXX="$CXX -Kpthread"
8394 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008397 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008398 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008399elif test "$ac_cv_kthread" = "yes"
8400then
8401 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008402 if test "$ac_cv_cxx_thread" = "yes"; then
8403 CXX="$CXX -Kthread"
8404 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008406
8407 posix_threads=yes
8408 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008409elif test "$ac_cv_pthread" = "yes"
8410then
8411 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008412 if test "$ac_cv_cxx_thread" = "yes"; then
8413 CXX="$CXX -pthread"
8414 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008416
8417 posix_threads=yes
8418 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008419else
8420 if test ! -z "$with_threads" -a -d "$with_threads"
8421 then LDFLAGS="$LDFLAGS -L$with_threads"
8422 fi
8423 if test ! -z "$withval" -a -d "$withval"
8424 then LDFLAGS="$LDFLAGS -L$withval"
8425 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008426
8427 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008428 # define _POSIX_THREADS in unistd.h. Some apparently don't
8429 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8431$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008433/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008434
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008435#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008436#ifdef _POSIX_THREADS
8437yes
8438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008439
8440_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008443 unistd_defines_pthreads=yes
8444else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008445 unistd_defines_pthreads=no
8446fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008447rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008448
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8450$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008451
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008453
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008454 # Just looking for pthread_create in libpthread is not enough:
8455 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8456 # So we really have to include pthread.h, and then link.
8457 _libs=$LIBS
8458 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8460$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008462/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008463#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008464
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008465void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008469
8470pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ;
8472 return 0;
8473}
8474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008475if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008476
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8478$as_echo "yes" >&6; }
8479 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008480
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008481 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008482 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008483else
Martin v. Löwis11437992002-04-12 09:54:03 +00008484
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008485 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008487if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008489
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008490 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008491 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008492else
Guido van Rossumad678af1998-10-02 14:42:15 +00008493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8495$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008496if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008498else
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008500LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504/* Override any GCC internal prototype to avoid an error.
8505 Use char because int might match the return type of a GCC
8506 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008507#ifdef __cplusplus
8508extern "C"
8509#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008510char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008511int
8512main ()
8513{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ;
8516 return 0;
8517}
8518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008519if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008521else
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524rm -f core conftest.err conftest.$ac_objext \
8525 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008526LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8529$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008530if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008532
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008533 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008534 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008535 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008536else
Greg Steinadf63d62000-07-05 10:38:09 +00008537
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8539$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008540if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008542else
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008544LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548/* Override any GCC internal prototype to avoid an error.
8549 Use char because int might match the return type of a GCC
8550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008551#ifdef __cplusplus
8552extern "C"
8553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008554char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008555int
8556main ()
8557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ;
8560 return 0;
8561}
8562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008563if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008565else
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008568rm -f core conftest.err conftest.$ac_objext \
8569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008570LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8573$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008574if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008576
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008577 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008578 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008579 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008580else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008581
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8583$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008584if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008586else
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008588LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592/* Override any GCC internal prototype to avoid an error.
8593 Use char because int might match the return type of a GCC
8594 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595#ifdef __cplusplus
8596extern "C"
8597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008598char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
8601{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ;
8604 return 0;
8605}
8606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008607if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008609else
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612rm -f core conftest.err conftest.$ac_objext \
8613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008614LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8617$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008618if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008620
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008621 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008622 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008623 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008624else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008625
Matthias Kloseb9621712010-04-24 17:59:49 +00008626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8627$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008628if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008630else
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008632LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636/* Override any GCC internal prototype to avoid an error.
8637 Use char because int might match the return type of a GCC
8638 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008639#ifdef __cplusplus
8640extern "C"
8641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008642char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008643int
8644main ()
8645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 ;
8648 return 0;
8649}
8650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008651if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656rm -f core conftest.err conftest.$ac_objext \
8657 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008658LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8661$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008662if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008664
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008665 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008666 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008667 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008668else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008669
Martin v. Löwis130fb172001-07-19 11:00:41 +00008670 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008671fi
8672
Guido van Rossum627b2d71993-12-24 10:39:16 +00008673
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008674fi
8675
Guido van Rossum0be3e491997-05-22 20:33:33 +00008676fi
8677
Guido van Rossum49545951997-12-02 19:28:29 +00008678fi
8679
Guido van Rossumb93a8621998-05-07 13:27:32 +00008680fi
8681
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683rm -f core conftest.err conftest.$ac_objext \
8684 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008685
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8687$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008688if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008690else
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008692LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696/* Override any GCC internal prototype to avoid an error.
8697 Use char because int might match the return type of a GCC
8698 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008699#ifdef __cplusplus
8700extern "C"
8701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008702char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008703int
8704main ()
8705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ;
8708 return 0;
8709}
8710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008712 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008713else
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716rm -f core conftest.err conftest.$ac_objext \
8717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008718LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8721$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008722if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008724
Martin v. Löwis130fb172001-07-19 11:00:41 +00008725 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008726 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008727 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008728fi
8729
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008730
Neal Norwitza978ab02002-11-02 16:58:05 +00008731 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8733$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008734if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008736else
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008738LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008742/* Override any GCC internal prototype to avoid an error.
8743 Use char because int might match the return type of a GCC
8744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008745#ifdef __cplusplus
8746extern "C"
8747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008748char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008749int
8750main ()
8751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 ;
8754 return 0;
8755}
8756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762rm -f core conftest.err conftest.$ac_objext \
8763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008764LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8767$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008768if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008770
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008771 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008772 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008773 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008774fi
8775
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008776 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008777fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008778
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779if test "$posix_threads" = "yes"; then
8780 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008781
Matthias Kloseb9621712010-04-24 17:59:49 +00008782$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008783
8784 fi
8785
8786 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8787 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008788 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008789$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008790
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791 ;;
8792 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008793$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008794
8795 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008796 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008797$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008798
8799 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008800 esac
8801
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8803$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008804 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808 ac_cv_pthread_system_supported=no
8809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008811/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008812#include <pthread.h>
8813 void *foo(void *parm) {
8814 return NULL;
8815 }
8816 main() {
8817 pthread_attr_t attr;
8818 pthread_t id;
8819 if (pthread_attr_init(&attr)) exit(-1);
8820 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8821 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8822 exit(0);
8823 }
8824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008825if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008826 ac_cv_pthread_system_supported=yes
8827else
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008832fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834
Guido van Rossum627b2d71993-12-24 10:39:16 +00008835fi
8836
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8838$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008839 if test "$ac_cv_pthread_system_supported" = "yes"; then
8840
Matthias Kloseb9621712010-04-24 17:59:49 +00008841$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008842
8843 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 for ac_func in pthread_sigmask
8845do :
8846 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02008847if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008848 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008849#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008851 case $ac_sys_system in
8852 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008853
Matthias Kloseb9621712010-04-24 17:59:49 +00008854$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008855
8856 ;;
8857 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008858fi
8859done
8860
8861fi
8862
8863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8867$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008869if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008871 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008874 ipv6=no
8875 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8877$as_echo "yes" >&6; }
8878 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008879
8880 ipv6=yes
8881 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008883else
Martin v. Löwis11437992002-04-12 09:54:03 +00008884
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8888$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008889 ipv6=no
8890
8891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008893/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008894 /* AF_INET6 available check */
8895#include <sys/types.h>
8896#include <sys/socket.h>
8897main()
8898{
8899 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8900 exit(1);
8901 else
8902 exit(0);
8903}
8904
Martin v. Löwis11437992002-04-12 09:54:03 +00008905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008906if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008907
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8909$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008911
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912else
Matthias Kloseb159a552010-04-25 21:00:44 +00008913
Matthias Kloseb9621712010-04-24 17:59:49 +00008914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008916 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8920 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921fi
8922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008923
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008924if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8926$as_echo_n "checking if RFC2553 API is available... " >&6; }
8927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008928/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008929
8930 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008931#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008935struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008936 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 ;
8938 return 0;
8939}
Matthias Kloseb159a552010-04-25 21:00:44 +00008940
Martin v. Löwis11437992002-04-12 09:54:03 +00008941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008942if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008943
8944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008945$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008946 ipv6=yes
8947
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008948else
Matthias Kloseb159a552010-04-25 21:00:44 +00008949
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008951$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008952 ipv6=no
8953
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008956fi
8957
8958if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008960
8961fi
8962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963fi
8964
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965
8966ipv6type=unknown
8967ipv6lib=none
8968ipv6trylibc=no
8969
8970if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8972$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008973 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8974 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008975 case $i in
8976 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008978/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008979
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980#include <netinet/in.h>
8981#ifdef IPV6_INRIA_VERSION
8982yes
8983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008984_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008987 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990
8991 ;;
8992 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include <netinet/in.h>
8997#ifdef __KAME__
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6lib=inet6
9005 ipv6libdir=/usr/local/v6/lib
9006 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009008rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009
9010 ;;
9011 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009014
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015#include <features.h>
9016#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9017yes
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 ipv6type=$i;
9023 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009025rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026
9027 ;;
9028 linux-inet6)
9029 if test -d /usr/inet6; then
9030 ipv6type=$i
9031 ipv6lib=inet6
9032 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009033 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034 fi
9035 ;;
9036 solaris)
9037 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009038 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039 ipv6type=$i
9040 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041 fi
9042 fi
9043 ;;
9044 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009046/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048#include <sys/param.h>
9049#ifdef _TOSHIBA_INET6
9050yes
9051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009052_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055 ipv6type=$i;
9056 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009057 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009059rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060
9061 ;;
9062 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066#include </usr/local/v6/include/sys/v6config.h>
9067#ifdef __V6D__
9068yes
9069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073 ipv6type=$i;
9074 ipv6lib=v6;
9075 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009076 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009077fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009078rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079
9080 ;;
9081 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009083/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085#include <sys/param.h>
9086#ifdef _ZETA_MINAMI_INET6
9087yes
9088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009089_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092 ipv6type=$i;
9093 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009094 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009096rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097
9098 ;;
9099 esac
9100 if test "$ipv6type" != "unknown"; then
9101 break
9102 fi
9103 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9105$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106fi
9107
9108if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9109 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9110 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9111 echo "using lib$ipv6lib"
9112 else
9113 if test $ipv6trylibc = "yes"; then
9114 echo "using libc"
9115 else
9116 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9117 echo "You need to fetch lib$ipv6lib.a from appropriate"
9118 echo 'ipv6 kit and compile beforehand.'
9119 exit 1
9120 fi
9121 fi
9122fi
9123
Matthias Kloseb9621712010-04-24 17:59:49 +00009124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9125$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009127/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009128
9129 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009130int
9131main ()
9132{
9133FSIORefNum fRef = 0
9134 ;
9135 return 0;
9136}
Matthias Kloseb159a552010-04-25 21:00:44 +00009137
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009139if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009140
Matthias Kloseb159a552010-04-25 21:00:44 +00009141
Matthias Kloseb9621712010-04-24 17:59:49 +00009142$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009143
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9145$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009146
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009147else
Matthias Kloseb159a552010-04-25 21:00:44 +00009148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9150$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009151
9152fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9154
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009155# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9157$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009160if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161 withval=$with_doc_strings;
9162fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009163
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009164
9165if test -z "$with_doc_strings"
9166then with_doc_strings="yes"
9167fi
9168if test "$with_doc_strings" != "no"
9169then
9170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009172
9173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9175$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009176
Antoine Pitrou042b1282010-08-13 21:15:58 +00009177# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9179$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009180
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009182if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009184if test "$withval" != no
9185then
9186
Matthias Kloseb9621712010-04-24 17:59:49 +00009187$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009188
Matthias Kloseb9621712010-04-24 17:59:49 +00009189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9190$as_echo "yes" >&6; }
9191else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009193fi
9194else
Matthias Kloseb9621712010-04-24 17:59:49 +00009195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009197fi
9198
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009199
9200# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9202$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009205if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206 withval=$with_pymalloc;
9207fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009208
Neil Schemenauera35c6882001-02-27 04:45:05 +00009209
Neil Schemenauer16c22972002-03-22 15:34:49 +00009210if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009211then
9212 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009213 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009214fi
9215if test "$with_pymalloc" != "no"
9216then
Martin v. Löwis11437992002-04-12 09:54:03 +00009217
Matthias Kloseb9621712010-04-24 17:59:49 +00009218$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009219
9220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9222$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009223
Benjamin Peterson05159c42009-12-03 03:01:27 +00009224# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9226$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009227
9228# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009229if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009230 withval=$with_valgrind;
9231else
9232 with_valgrind=no
9233fi
9234
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9236$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009237if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 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 +02009239if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009240
Matthias Kloseb9621712010-04-24 17:59:49 +00009241$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009242
9243else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009244 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009245
9246fi
9247
9248
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009249 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009250fi
9251
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009252# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009253
Guido van Rossum98935bf2001-09-05 19:13:16 +00009254DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009255
Guido van Rossume97ee181999-12-20 21:27:22 +00009256# the dlopen() function means we might want to use dynload_shlib.o. some
9257# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009258for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009259do :
9260 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009261if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009263#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009264_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009265
Guido van Rossume97ee181999-12-20 21:27:22 +00009266fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009267done
Guido van Rossume97ee181999-12-20 21:27:22 +00009268
Michael W. Hudson54241132001-12-07 15:38:26 +00009269
Guido van Rossume97ee181999-12-20 21:27:22 +00009270# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9271# loading of modules.
9272
Matthias Kloseb9621712010-04-24 17:59:49 +00009273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9274$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009275if test -z "$DYNLOADFILE"
9276then
9277 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009278 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9279 if test "$ac_cv_func_dlopen" = yes
9280 then DYNLOADFILE="dynload_shlib.o"
9281 else DYNLOADFILE="dynload_aix.o"
9282 fi
9283 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009284 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009285 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9286 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009287 *)
9288 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9289 # out any dynamic loading
9290 if test "$ac_cv_func_dlopen" = yes
9291 then DYNLOADFILE="dynload_shlib.o"
9292 else DYNLOADFILE="dynload_stub.o"
9293 fi
9294 ;;
9295 esac
9296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9298$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009299if test "$DYNLOADFILE" != "dynload_stub.o"
9300then
Martin v. Löwis11437992002-04-12 09:54:03 +00009301
Matthias Kloseb9621712010-04-24 17:59:49 +00009302$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009303
9304fi
9305
Neil Schemenauer4e425612001-06-19 15:44:15 +00009306# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9307
Michael W. Hudson54241132001-12-07 15:38:26 +00009308
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9310$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009311if test -z "$MACHDEP_OBJS"
9312then
Jack Jansene578a632001-08-15 01:27:14 +00009313 MACHDEP_OBJS=$extra_machdep_objs
9314else
9315 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9318$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009319
Guido van Rossum627b2d71993-12-24 10:39:16 +00009320# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009321for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009322 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009323 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009324 futimens futimes gai_strerror \
9325 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009326 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009327 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009328 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009329 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009330 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009331 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009332 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009333 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009334 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009335 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9336 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009337 sigaction sigaltstack siginterrupt sigpending sigrelse \
9338 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009339 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009340 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9341 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009342do :
9343 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9344ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009345if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009346 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009347#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009348_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009349
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009350fi
9351done
9352
Michael W. Hudson54241132001-12-07 15:38:26 +00009353
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009354# For some functions, having a definition is not sufficient, since
9355# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9357$as_echo_n "checking for chroot... " >&6; }
9358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009359/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009360#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361int
9362main ()
9363{
9364void *x=chroot
9365 ;
9366 return 0;
9367}
9368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009370
Matthias Kloseb9621712010-04-24 17:59:49 +00009371$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009372
Matthias Kloseb159a552010-04-25 21:00:44 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009374$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009375else
Matthias Kloseb9621712010-04-24 17:59:49 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378
9379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9382$as_echo_n "checking for link... " >&6; }
9383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009384/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009385#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009386int
9387main ()
9388{
9389void *x=link
9390 ;
9391 return 0;
9392}
9393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009395
Matthias Kloseb9621712010-04-24 17:59:49 +00009396$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009397
Matthias Kloseb159a552010-04-25 21:00:44 +00009398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009399$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009400else
Matthias Kloseb9621712010-04-24 17:59:49 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403
9404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9407$as_echo_n "checking for symlink... " >&6; }
9408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009409/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009410#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009411int
9412main ()
9413{
9414void *x=symlink
9415 ;
9416 return 0;
9417}
9418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009420
Matthias Kloseb9621712010-04-24 17:59:49 +00009421$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009422
Matthias Kloseb159a552010-04-25 21:00:44 +00009423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009424$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009425else
Matthias Kloseb9621712010-04-24 17:59:49 +00009426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9427$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428
9429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9432$as_echo_n "checking for fchdir... " >&6; }
9433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009434/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009435#include <unistd.h>
9436int
9437main ()
9438{
9439void *x=fchdir
9440 ;
9441 return 0;
9442}
9443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009445
Matthias Kloseb9621712010-04-24 17:59:49 +00009446$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009447
Matthias Kloseb159a552010-04-25 21:00:44 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009449$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009450else
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9452$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009453
9454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9457$as_echo_n "checking for fsync... " >&6; }
9458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009459/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009460#include <unistd.h>
9461int
9462main ()
9463{
9464void *x=fsync
9465 ;
9466 return 0;
9467}
9468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009469if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009470
Matthias Kloseb9621712010-04-24 17:59:49 +00009471$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009472
Matthias Kloseb159a552010-04-25 21:00:44 +00009473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009474$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009475else
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009478
9479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9482$as_echo_n "checking for fdatasync... " >&6; }
9483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009484/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009485#include <unistd.h>
9486int
9487main ()
9488{
9489void *x=fdatasync
9490 ;
9491 return 0;
9492}
9493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009495
Matthias Kloseb9621712010-04-24 17:59:49 +00009496$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009497
Matthias Kloseb159a552010-04-25 21:00:44 +00009498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009499$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009500else
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009503
9504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9507$as_echo_n "checking for epoll... " >&6; }
9508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009509/* end confdefs.h. */
9510#include <sys/epoll.h>
9511int
9512main ()
9513{
9514void *x=epoll_create
9515 ;
9516 return 0;
9517}
9518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009520
Matthias Kloseb9621712010-04-24 17:59:49 +00009521$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009522
Matthias Kloseb159a552010-04-25 21:00:44 +00009523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009524$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009525else
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009528
9529fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9532$as_echo_n "checking for kqueue... " >&6; }
9533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009534/* end confdefs.h. */
9535
9536#include <sys/types.h>
9537#include <sys/event.h>
9538
9539int
9540main ()
9541{
9542int x=kqueue()
9543 ;
9544 return 0;
9545}
9546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009547if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009548
Matthias Kloseb9621712010-04-24 17:59:49 +00009549$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009550
Matthias Kloseb159a552010-04-25 21:00:44 +00009551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009552$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009553else
Matthias Kloseb9621712010-04-24 17:59:49 +00009554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009556
9557fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009559# On some systems (eg. FreeBSD 5), we would find a definition of the
9560# functions ctermid_r, setgroups in the library, but no prototype
9561# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9562# address to avoid compiler warnings and potential miscompilations
9563# because of the missing prototypes.
9564
Matthias Kloseb9621712010-04-24 17:59:49 +00009565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9566$as_echo_n "checking for ctermid_r... " >&6; }
9567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009568/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009569
Martin v. Löwisd5843682002-11-21 20:41:28 +00009570#include <stdio.h>
9571
Martin v. Löwisd5843682002-11-21 20:41:28 +00009572int
9573main ()
9574{
9575void* p = ctermid_r
9576 ;
9577 return 0;
9578}
9579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009580if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009581
Matthias Kloseb9621712010-04-24 17:59:49 +00009582$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009583
Matthias Kloseb159a552010-04-25 21:00:44 +00009584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009585$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009586else
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9588$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009589
9590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9592
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9594$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009595if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009596 $as_echo_n "(cached) " >&6
9597else
9598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009600#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009601int
9602main ()
9603{
9604void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009605
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009606 ;
9607 return 0;
9608}
9609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009610if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009611 ac_cv_flock_decl=yes
9612else
9613 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009614
9615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009617
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009618fi
9619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9620$as_echo "$ac_cv_flock_decl" >&6; }
9621if test "x${ac_cv_flock_decl}" = xyes; then
9622 for ac_func in flock
9623do :
9624 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009625if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009626 cat >>confdefs.h <<_ACEOF
9627#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009628_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009629
Antoine Pitroua3000072010-09-07 14:52:42 +00009630else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009632$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009633if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009634 $as_echo_n "(cached) " >&6
9635else
9636 ac_check_lib_save_LIBS=$LIBS
9637LIBS="-lbsd $LIBS"
9638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9639/* end confdefs.h. */
9640
9641/* Override any GCC internal prototype to avoid an error.
9642 Use char because int might match the return type of a GCC
9643 builtin and then its argument prototype would still apply. */
9644#ifdef __cplusplus
9645extern "C"
9646#endif
9647char flock ();
9648int
9649main ()
9650{
9651return flock ();
9652 ;
9653 return 0;
9654}
9655_ACEOF
9656if ac_fn_c_try_link "$LINENO"; then :
9657 ac_cv_lib_bsd_flock=yes
9658else
9659 ac_cv_lib_bsd_flock=no
9660fi
9661rm -f core conftest.err conftest.$ac_objext \
9662 conftest$ac_exeext conftest.$ac_ext
9663LIBS=$ac_check_lib_save_LIBS
9664fi
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9666$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009667if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009668 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009669
9670
9671$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9672
9673
9674fi
9675
9676
9677fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009678done
9679
Antoine Pitroua3000072010-09-07 14:52:42 +00009680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9683$as_echo_n "checking for getpagesize... " >&6; }
9684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009685/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009686
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009687#include <unistd.h>
9688
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009689int
9690main ()
9691{
9692void* p = getpagesize
9693 ;
9694 return 0;
9695}
9696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009697if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009698
Matthias Kloseb9621712010-04-24 17:59:49 +00009699$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009700
Matthias Kloseb159a552010-04-25 21:00:44 +00009701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009702$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009703else
Matthias Kloseb9621712010-04-24 17:59:49 +00009704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009706
9707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009709
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9711$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9713/* end confdefs.h. */
9714
9715#include <malloc.h>
9716
9717int
9718main ()
9719{
9720mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9721 ;
9722 return 0;
9723}
9724_ACEOF
9725if ac_fn_c_try_compile "$LINENO"; then :
9726
9727$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9728
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9730$as_echo "yes" >&6; }
9731else
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733$as_echo "no" >&6; }
9734
9735fi
9736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9737
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009738for ac_prog in true
9739do
9740 # Extract the first word of "$ac_prog", so it can be a program name with args.
9741set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9743$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009744if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009746else
9747 if test -n "$TRUE"; then
9748 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9749else
9750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9751for as_dir in $PATH
9752do
9753 IFS=$as_save_IFS
9754 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009756 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 +00009757 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 $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 +00009759 break 2
9760 fi
9761done
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009764
9765fi
9766fi
9767TRUE=$ac_cv_prog_TRUE
9768if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9770$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009771else
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009774fi
9775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009777 test -n "$TRUE" && break
9778done
9779test -n "$TRUE" || TRUE="/bin/true"
9780
9781
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9783$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009784if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009785 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009786else
9787 ac_check_lib_save_LIBS=$LIBS
9788LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009790/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792/* Override any GCC internal prototype to avoid an error.
9793 Use char because int might match the return type of a GCC
9794 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009795#ifdef __cplusplus
9796extern "C"
9797#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009798char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009799int
9800main ()
9801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009802return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009803 ;
9804 return 0;
9805}
9806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009808 ac_cv_lib_c_inet_aton=yes
9809else
Matthias Kloseb9621712010-04-24 17:59:49 +00009810 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009812rm -f core conftest.err conftest.$ac_objext \
9813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009814LIBS=$ac_check_lib_save_LIBS
9815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9817$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009818if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009819 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009820else
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9822$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009823if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009825else
9826 ac_check_lib_save_LIBS=$LIBS
9827LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831/* Override any GCC internal prototype to avoid an error.
9832 Use char because int might match the return type of a GCC
9833 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009834#ifdef __cplusplus
9835extern "C"
9836#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009837char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009838int
9839main ()
9840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009842 ;
9843 return 0;
9844}
9845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847 ac_cv_lib_resolv_inet_aton=yes
9848else
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851rm -f core conftest.err conftest.$ac_objext \
9852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009853LIBS=$ac_check_lib_save_LIBS
9854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9856$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009857if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009858 cat >>confdefs.h <<_ACEOF
9859#define HAVE_LIBRESOLV 1
9860_ACEOF
9861
9862 LIBS="-lresolv $LIBS"
9863
9864fi
9865
9866
9867fi
9868
9869
Christian Heimesd0764e22007-12-04 15:00:33 +00009870# On Tru64, chflags seems to be present, but calling it will
9871# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9873$as_echo_n "checking for chflags... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009874if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009876else
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009878 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009879else
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009881/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009882
Christian Heimesd0764e22007-12-04 15:00:33 +00009883#include <sys/stat.h>
9884#include <unistd.h>
9885int main(int argc, char*argv[])
9886{
9887 if(chflags(argv[0], 0) != 0)
9888 return 1;
9889 return 0;
9890}
Ned Deily3eb67d52011-06-28 00:00:28 -07009891
Christian Heimesd0764e22007-12-04 15:00:33 +00009892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009893if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009894 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009895else
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009900fi
9901
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009902
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9905$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009906if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009907 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009908if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009909 ac_cv_have_chflags="yes"
9910else
9911 ac_cv_have_chflags="no"
9912fi
9913
9914fi
9915if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009916
Matthias Kloseb9621712010-04-24 17:59:49 +00009917$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009918
9919fi
9920
Matthias Kloseb9621712010-04-24 17:59:49 +00009921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9922$as_echo_n "checking for lchflags... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009923if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009925else
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009927 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009928else
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009930/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009931
Christian Heimesd0764e22007-12-04 15:00:33 +00009932#include <sys/stat.h>
9933#include <unistd.h>
9934int main(int argc, char*argv[])
9935{
9936 if(lchflags(argv[0], 0) != 0)
9937 return 1;
9938 return 0;
9939}
Ned Deily3eb67d52011-06-28 00:00:28 -07009940
Christian Heimesd0764e22007-12-04 15:00:33 +00009941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009942if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009943 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009944else
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009949fi
9950
9951
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9954$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009955if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009957if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009958 ac_cv_have_lchflags="yes"
9959else
9960 ac_cv_have_lchflags="no"
9961fi
9962
9963fi
9964if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009965
Matthias Kloseb9621712010-04-24 17:59:49 +00009966$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009967
9968fi
9969
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009970case $ac_sys_system/$ac_sys_release in
9971Darwin/*)
9972 _CUR_CFLAGS="${CFLAGS}"
9973 _CUR_LDFLAGS="${LDFLAGS}"
9974 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9975 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9976 ;;
9977esac
9978
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9980$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009981if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009983else
9984 ac_check_lib_save_LIBS=$LIBS
9985LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009987/* end confdefs.h. */
9988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009989/* Override any GCC internal prototype to avoid an error.
9990 Use char because int might match the return type of a GCC
9991 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
9995char inflateCopy ();
9996int
9997main ()
9998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010005 ac_cv_lib_z_inflateCopy=yes
10006else
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010009rm -f core conftest.err conftest.$ac_objext \
10010 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010011LIBS=$ac_check_lib_save_LIBS
10012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10014$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010015if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010016
Matthias Kloseb9621712010-04-24 17:59:49 +000010017$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010018
10019fi
10020
10021
10022case $ac_sys_system/$ac_sys_release in
10023Darwin/*)
10024 CFLAGS="${_CUR_CFLAGS}"
10025 LDFLAGS="${_CUR_LDFLAGS}"
10026 ;;
10027esac
10028
Matthias Kloseb9621712010-04-24 17:59:49 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10030$as_echo_n "checking for hstrerror... " >&6; }
10031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010032/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010033
Martin v. Löwise9416172003-05-03 10:12:45 +000010034#include <netdb.h>
10035
Martin v. Löwise9416172003-05-03 10:12:45 +000010036int
10037main ()
10038{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010039void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010040 ;
10041 return 0;
10042}
10043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010044if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010045
Matthias Kloseb9621712010-04-24 17:59:49 +000010046$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010047
Matthias Kloseb159a552010-04-25 21:00:44 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010049$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010050else
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10052$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010053
10054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010055rm -f core conftest.err conftest.$ac_objext \
10056 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10059$as_echo_n "checking for inet_aton... " >&6; }
10060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010061/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010062
Martin v. Löwis86d66262006-02-17 08:40:11 +000010063#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010064#include <sys/socket.h>
10065#include <netinet/in.h>
10066#include <arpa/inet.h>
10067
Martin v. Löwise9416172003-05-03 10:12:45 +000010068int
10069main ()
10070{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010071void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010072 ;
10073 return 0;
10074}
10075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010077
Matthias Kloseb9621712010-04-24 17:59:49 +000010078$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010079
Matthias Kloseb159a552010-04-25 21:00:44 +000010080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010081$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010082else
Matthias Kloseb9621712010-04-24 17:59:49 +000010083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10084$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010085
10086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010087rm -f core conftest.err conftest.$ac_objext \
10088 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010089
Matthias Kloseb9621712010-04-24 17:59:49 +000010090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10091$as_echo_n "checking for inet_pton... " >&6; }
10092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010093/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010094
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010095#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010096#include <sys/socket.h>
10097#include <netinet/in.h>
10098#include <arpa/inet.h>
10099
Martin v. Löwise9416172003-05-03 10:12:45 +000010100int
10101main ()
10102{
10103void* p = inet_pton
10104 ;
10105 return 0;
10106}
10107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010109
Matthias Kloseb9621712010-04-24 17:59:49 +000010110$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010111
Matthias Kloseb159a552010-04-25 21:00:44 +000010112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010113$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010114else
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10116$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010117
10118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010120
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010121# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10123$as_echo_n "checking for setgroups... " >&6; }
10124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010125/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010126
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010127#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010128#ifdef HAVE_GRP_H
10129#include <grp.h>
10130#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010131
Martin v. Löwisd5843682002-11-21 20:41:28 +000010132int
10133main ()
10134{
10135void* p = setgroups
10136 ;
10137 return 0;
10138}
10139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010143
Matthias Kloseb159a552010-04-25 21:00:44 +000010144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010145$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010146else
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10148$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010149
10150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010152
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010153# check for openpty and forkpty
10154
10155for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010156do :
10157 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010158if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010160#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010161_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010162
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010163else
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10165$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010166if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010168else
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010170LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174/* Override any GCC internal prototype to avoid an error.
10175 Use char because int might match the return type of a GCC
10176 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010177#ifdef __cplusplus
10178extern "C"
10179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010180char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010181int
10182main ()
10183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ;
10186 return 0;
10187}
10188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010189if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010191else
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010194rm -f core conftest.err conftest.$ac_objext \
10195 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010196LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10199$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010200if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010202 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010203else
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10205$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010206if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010208else
10209 ac_check_lib_save_LIBS=$LIBS
10210LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010212/* end confdefs.h. */
10213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214/* Override any GCC internal prototype to avoid an error.
10215 Use char because int might match the return type of a GCC
10216 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010217#ifdef __cplusplus
10218extern "C"
10219#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010220char openpty ();
10221int
10222main ()
10223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010225 ;
10226 return 0;
10227}
10228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010230 ac_cv_lib_bsd_openpty=yes
10231else
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010234rm -f core conftest.err conftest.$ac_objext \
10235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010236LIBS=$ac_check_lib_save_LIBS
10237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10239$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010240if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010242 LIBS="$LIBS -lbsd"
10243fi
10244
10245
10246fi
10247
Fred Drake8cef4cf2000-06-28 16:40:38 +000010248
10249fi
10250done
10251
10252for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010253do :
10254 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010255if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010257#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010258_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010259
Fred Drake8cef4cf2000-06-28 16:40:38 +000010260else
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10262$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010263if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010265else
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010267LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271/* Override any GCC internal prototype to avoid an error.
10272 Use char because int might match the return type of a GCC
10273 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010274#ifdef __cplusplus
10275extern "C"
10276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010277char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010278int
10279main ()
10280{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ;
10283 return 0;
10284}
10285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010288else
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010291rm -f core conftest.err conftest.$ac_objext \
10292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010293LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10296$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010297if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010299 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010300else
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10302$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010303if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010305else
10306 ac_check_lib_save_LIBS=$LIBS
10307LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010309/* end confdefs.h. */
10310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311/* Override any GCC internal prototype to avoid an error.
10312 Use char because int might match the return type of a GCC
10313 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010314#ifdef __cplusplus
10315extern "C"
10316#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010317char forkpty ();
10318int
10319main ()
10320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010322 ;
10323 return 0;
10324}
10325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010327 ac_cv_lib_bsd_forkpty=yes
10328else
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010331rm -f core conftest.err conftest.$ac_objext \
10332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010333LIBS=$ac_check_lib_save_LIBS
10334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10336$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010337if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010339 LIBS="$LIBS -lbsd"
10340fi
10341
10342
10343fi
10344
Fred Drake8cef4cf2000-06-28 16:40:38 +000010345
10346fi
10347done
10348
Jack Jansendd19cf82001-12-06 22:36:17 +000010349
Christian Heimesb186d002008-03-18 15:15:01 +000010350# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010351for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010352do :
10353 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010354if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010355 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010357_ACEOF
10358
10359fi
10360done
10361
10362
Michael W. Hudson54241132001-12-07 15:38:26 +000010363# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010364for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010365do :
10366 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10367ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010368if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010370#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010371_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010372
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010373fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010374done
10375
Michael W. Hudson54241132001-12-07 15:38:26 +000010376
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010377ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010378if test "x$ac_cv_func_dup2" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010379 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010380
Martin v. Löwis1142de32002-03-29 16:28:31 +000010381else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010383 *" dup2.$ac_objext "* ) ;;
10384 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010386esac
10387
Martin v. Löwis1142de32002-03-29 16:28:31 +000010388fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010389
10390ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010391if test "x$ac_cv_func_getcwd" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010392 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10393
10394else
10395 case " $LIBOBJS " in
10396 *" getcwd.$ac_objext "* ) ;;
10397 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10398 ;;
10399esac
10400
10401fi
10402
10403ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010404if test "x$ac_cv_func_strdup" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010405 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10406
10407else
10408 case " $LIBOBJS " in
10409 *" strdup.$ac_objext "* ) ;;
10410 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10411 ;;
10412esac
10413
10414fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010415
10416
10417for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010418do :
10419 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010420if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010422#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010425/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010426#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010427int
10428main ()
10429{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010430getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 ;
10432 return 0;
10433}
10434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010436
Matthias Kloseb9621712010-04-24 17:59:49 +000010437$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010438
Guido van Rossum627b2d71993-12-24 10:39:16 +000010439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010441
Guido van Rossum627b2d71993-12-24 10:39:16 +000010442fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010443done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010444
Jack Jansen150753c2003-03-29 22:07:47 +000010445for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010446do :
10447 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010448if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010449 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010450#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010453/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010454#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010455int
10456main ()
10457{
10458setpgrp(0,0);
10459 ;
10460 return 0;
10461}
10462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010463if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010464
Matthias Kloseb9621712010-04-24 17:59:49 +000010465$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010466
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010469
10470fi
10471done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010472
Thomas Wouters3a584202000-08-05 23:28:51 +000010473for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010474do :
10475 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010476if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010478#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010481/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010482#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010483int
10484main ()
10485{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010486gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 ;
10488 return 0;
10489}
10490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010491if ac_fn_c_try_compile "$LINENO"; then :
10492
Guido van Rossum627b2d71993-12-24 10:39:16 +000010493else
Skip Montanaro6dead952003-09-25 14:50:04 +000010494
Matthias Kloseb9621712010-04-24 17:59:49 +000010495$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010496
Martin v. Löwis11437992002-04-12 09:54:03 +000010497
Guido van Rossum627b2d71993-12-24 10:39:16 +000010498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010500
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010501fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010502done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010503
Michael W. Hudson54241132001-12-07 15:38:26 +000010504
Matthias Kloseb9621712010-04-24 17:59:49 +000010505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10506$as_echo_n "checking for major... " >&6; }
10507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010508/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010509
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010510#if defined(MAJOR_IN_MKDEV)
10511#include <sys/mkdev.h>
10512#elif defined(MAJOR_IN_SYSMACROS)
10513#include <sys/sysmacros.h>
10514#else
10515#include <sys/types.h>
10516#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010517
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010518int
10519main ()
10520{
10521
10522 makedev(major(0),minor(0));
10523
10524 ;
10525 return 0;
10526}
10527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010529
10530
Matthias Kloseb9621712010-04-24 17:59:49 +000010531$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010532
Matthias Kloseb9621712010-04-24 17:59:49 +000010533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10534$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010535
10536else
Skip Montanaro6dead952003-09-25 14:50:04 +000010537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10539$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010540
10541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010542rm -f core conftest.err conftest.$ac_objext \
10543 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010544
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010545# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010546# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10548$as_echo_n "checking for getaddrinfo... " >&6; }
10549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010550/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010551
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010552#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010553#include <sys/socket.h>
10554#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010555#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010556
Martin v. Löwis11437992002-04-12 09:54:03 +000010557int
10558main ()
10559{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010560getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010561 ;
10562 return 0;
10563}
10564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010565if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010566 have_getaddrinfo=yes
10567else
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010570rm -f core conftest.err conftest.$ac_objext \
10571 conftest$ac_exeext conftest.$ac_ext
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10573$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010574if test $have_getaddrinfo = yes
10575then
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10577$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010578 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580else
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010582 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010583else
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010585/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010586
10587#include <sys/types.h>
10588#include <netdb.h>
10589#include <string.h>
10590#include <sys/socket.h>
10591#include <netinet/in.h>
10592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010593int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010594{
10595 int passive, gaierr, inet4 = 0, inet6 = 0;
10596 struct addrinfo hints, *ai, *aitop;
10597 char straddr[INET6_ADDRSTRLEN], strport[16];
10598
10599 for (passive = 0; passive <= 1; passive++) {
10600 memset(&hints, 0, sizeof(hints));
10601 hints.ai_family = AF_UNSPEC;
10602 hints.ai_flags = passive ? AI_PASSIVE : 0;
10603 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010604 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010605 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10606 (void)gai_strerror(gaierr);
10607 goto bad;
10608 }
10609 for (ai = aitop; ai; ai = ai->ai_next) {
10610 if (ai->ai_addr == NULL ||
10611 ai->ai_addrlen == 0 ||
10612 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10613 straddr, sizeof(straddr), strport, sizeof(strport),
10614 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10615 goto bad;
10616 }
10617 switch (ai->ai_family) {
10618 case AF_INET:
10619 if (strcmp(strport, "54321") != 0) {
10620 goto bad;
10621 }
10622 if (passive) {
10623 if (strcmp(straddr, "0.0.0.0") != 0) {
10624 goto bad;
10625 }
10626 } else {
10627 if (strcmp(straddr, "127.0.0.1") != 0) {
10628 goto bad;
10629 }
10630 }
10631 inet4++;
10632 break;
10633 case AF_INET6:
10634 if (strcmp(strport, "54321") != 0) {
10635 goto bad;
10636 }
10637 if (passive) {
10638 if (strcmp(straddr, "::") != 0) {
10639 goto bad;
10640 }
10641 } else {
10642 if (strcmp(straddr, "::1") != 0) {
10643 goto bad;
10644 }
10645 }
10646 inet6++;
10647 break;
10648 case AF_UNSPEC:
10649 goto bad;
10650 break;
10651 default:
10652 /* another family support? */
10653 break;
10654 }
10655 }
10656 }
10657
10658 if (!(inet4 == 0 || inet4 == 2))
10659 goto bad;
10660 if (!(inet6 == 0 || inet6 == 2))
10661 goto bad;
10662
10663 if (aitop)
10664 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010665 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010666
10667 bad:
10668 if (aitop)
10669 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010670 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010671}
10672
Martin v. Löwis11437992002-04-12 09:54:03 +000010673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010674if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010675 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010676else
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010683fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010684
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10688$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10689
Mark Dickinson2df5d282009-12-31 21:22:50 +000010690if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010691then
10692 if test $ipv6 = yes
10693 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010694 echo 'Fatal: You must get working getaddrinfo() function.'
10695 echo ' or you can specify "--disable-ipv6"'.
10696 exit 1
10697 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010698else
Martin v. Löwis11437992002-04-12 09:54:03 +000010699
Matthias Kloseb9621712010-04-24 17:59:49 +000010700$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010701
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010702fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010703
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010704for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010705do :
10706 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010707if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010708 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010709#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010710_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010711
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010712fi
10713done
10714
Michael W. Hudson54241132001-12-07 15:38:26 +000010715
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010716# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10718$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 +020010719if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010721else
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010723/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010724#include <sys/types.h>
10725#include <sys/time.h>
10726#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
Martin v. Löwis11437992002-04-12 09:54:03 +000010728int
10729main ()
10730{
10731if ((struct tm *) 0)
10732return 0;
10733 ;
10734 return 0;
10735}
10736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010737if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010738 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739else
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10745$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010746if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010747
Matthias Kloseb9621712010-04-24 17:59:49 +000010748$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749
10750fi
10751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10753$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 +020010754if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010756else
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010758/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010759#include <sys/types.h>
10760#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010761
Martin v. Löwis11437992002-04-12 09:54:03 +000010762int
10763main ()
10764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010765struct tm tm;
10766 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 ;
10769 return 0;
10770}
10771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010772if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010773 ac_cv_struct_tm=time.h
10774else
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10780$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010781if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010782
Matthias Kloseb9621712010-04-24 17:59:49 +000010783$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010784
10785fi
10786
Matthias Kloseb9621712010-04-24 17:59:49 +000010787ac_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 +000010788#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010791if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010792
10793cat >>confdefs.h <<_ACEOF
10794#define HAVE_STRUCT_TM_TM_ZONE 1
10795_ACEOF
10796
10797
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010798fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010799
Martin v. Löwis11437992002-04-12 09:54:03 +000010800if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010803
10804else
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10806"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010807if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809else
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010811fi
10812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010814#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010815_ACEOF
10816
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10818$as_echo_n "checking for tzname... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010819if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821else
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010823/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010824#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010825#if !HAVE_DECL_TZNAME
10826extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010828
Martin v. Löwis11437992002-04-12 09:54:03 +000010829int
10830main ()
10831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010832return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 ;
10834 return 0;
10835}
10836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010837if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010838 ac_cv_var_tzname=yes
10839else
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010842rm -f core conftest.err conftest.$ac_objext \
10843 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10846$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010847 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010848
Matthias Kloseb9621712010-04-24 17:59:49 +000010849$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010850
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010851 fi
10852fi
10853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854ac_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 +020010855if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010856
10857cat >>confdefs.h <<_ACEOF
10858#define HAVE_STRUCT_STAT_ST_RDEV 1
10859_ACEOF
10860
10861
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010862fi
10863
Matthias Kloseb9621712010-04-24 17:59:49 +000010864ac_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 +020010865if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010866
Martin v. Löwis11437992002-04-12 09:54:03 +000010867cat >>confdefs.h <<_ACEOF
10868#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10869_ACEOF
10870
10871
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010872fi
10873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874ac_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 +020010875if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010876
10877cat >>confdefs.h <<_ACEOF
10878#define HAVE_STRUCT_STAT_ST_FLAGS 1
10879_ACEOF
10880
10881
10882fi
10883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884ac_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 +020010885if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010886
10887cat >>confdefs.h <<_ACEOF
10888#define HAVE_STRUCT_STAT_ST_GEN 1
10889_ACEOF
10890
10891
10892fi
10893
Matthias Kloseb9621712010-04-24 17:59:49 +000010894ac_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 +020010895if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010896
10897cat >>confdefs.h <<_ACEOF
10898#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10899_ACEOF
10900
10901
10902fi
10903
Matthias Kloseb9621712010-04-24 17:59:49 +000010904ac_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 +020010905if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010906
Martin v. Löwis11437992002-04-12 09:54:03 +000010907cat >>confdefs.h <<_ACEOF
10908#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10909_ACEOF
10910
10911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010913
10914else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010916 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010917 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10918 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010919esac
10920
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010921fi
10922
Michael W. Hudson54241132001-12-07 15:38:26 +000010923
Martin v. Löwis11437992002-04-12 09:54:03 +000010924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10926$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010927if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010929else
Matthias Kloseb159a552010-04-25 21:00:44 +000010930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010932/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010933#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010934int
10935main ()
10936{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010937return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010938 ;
10939 return 0;
10940}
10941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010942if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010943 ac_cv_header_time_altzone=yes
10944else
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949fi
10950
Matthias Kloseb9621712010-04-24 17:59:49 +000010951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10952$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010953if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010954
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956
10957fi
10958
Guido van Rossumda88dad1995-01-26 00:46:29 +000010959was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10961$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010963/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010964
10965#include <sys/types.h>
10966#include <sys/select.h>
10967#include <sys/time.h>
10968
Martin v. Löwis11437992002-04-12 09:54:03 +000010969int
10970main ()
10971{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010972;
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 ;
10974 return 0;
10975}
10976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010977if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010978
10979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010981
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010982 was_it_defined=yes
10983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10987$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10990$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010991if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010993else
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010995/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010996#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010997int
10998main ()
10999{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011000struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 ;
11002 return 0;
11003}
11004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011006 ac_cv_struct_addrinfo=yes
11007else
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011fi
11012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11014$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011015if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011016
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011018
11019fi
11020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11022$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011023if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011025else
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011027/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011028
11029# include <sys/types.h>
11030# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011031int
11032main ()
11033{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011034struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011035 ;
11036 return 0;
11037}
11038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011039if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011040 ac_cv_struct_sockaddr_storage=yes
11041else
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11045fi
11046
Matthias Kloseb9621712010-04-24 17:59:49 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11048$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011049if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011052
11053fi
11054
Guido van Rossum627b2d71993-12-24 10:39:16 +000011055# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011056
Matthias Kloseb9621712010-04-24 17:59:49 +000011057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11058$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011059if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011061else
Matthias Kloseb9621712010-04-24 17:59:49 +000011062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011064$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011065int
11066main ()
11067{
11068static int test_array [1 - 2 * !(((char) -1) < 0)];
11069test_array [0] = 0
11070
11071 ;
11072 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011073}
Martin v. Löwis11437992002-04-12 09:54:03 +000011074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011075if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011076 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011077else
Matthias Kloseb9621712010-04-24 17:59:49 +000011078 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11083$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011084if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011086
11087fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011088
Matthias Kloseb9621712010-04-24 17:59:49 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11090$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011091if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011093else
Matthias Kloseb9621712010-04-24 17:59:49 +000011094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011095/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097int
11098main ()
11099{
11100/* FIXME: Include the comments suggested by Paul. */
11101#ifndef __cplusplus
11102 /* Ultrix mips cc rejects this. */
11103 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011104 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011105 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011106 char const *const *pcpcc;
11107 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 /* NEC SVR4.0.2 mips cc rejects this. */
11109 struct point {int x, y;};
11110 static struct point const zero = {0,0};
11111 /* AIX XL C 1.02.0.0 rejects this.
11112 It does not let you subtract one const X* pointer from another in
11113 an arm of an if-expression whose if-part is not a constant
11114 expression */
11115 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118 ++pcpcc;
11119 ppc = (char**) pcpcc;
11120 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 { /* SCO 3.2v4 cc rejects this. */
11122 char *t;
11123 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011124
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 }
11128 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11129 int x[] = {25, 17};
11130 const int *foo = &x[0];
11131 ++foo;
11132 }
11133 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11134 typedef const int *iptr;
11135 iptr p = 0;
11136 ++p;
11137 }
11138 { /* AIX XL C 1.02.0.0 rejects this saying
11139 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11140 struct s { int j; const int *ap[3]; };
11141 struct s *b; b->j = 5;
11142 }
11143 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11144 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011148#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011149
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 ;
11151 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011152}
Martin v. Löwis11437992002-04-12 09:54:03 +000011153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011154if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155 ac_cv_c_const=yes
11156else
Matthias Kloseb9621712010-04-24 17:59:49 +000011157 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11162$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011164
Matthias Kloseb9621712010-04-24 17:59:49 +000011165$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011166
11167fi
11168
Michael W. Hudson54241132001-12-07 15:38:26 +000011169
Guido van Rossumda88dad1995-01-26 00:46:29 +000011170works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11172$as_echo_n "checking for working volatile... " >&6; }
11173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011174/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011175
Martin v. Löwis11437992002-04-12 09:54:03 +000011176int
11177main ()
11178{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011179volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 ;
11181 return 0;
11182}
11183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011184if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011185 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011186else
Skip Montanaro6dead952003-09-25 14:50:04 +000011187
Matthias Kloseb9621712010-04-24 17:59:49 +000011188$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011189
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011190
Guido van Rossum627b2d71993-12-24 10:39:16 +000011191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11194$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011195
Guido van Rossumda88dad1995-01-26 00:46:29 +000011196works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11198$as_echo_n "checking for working signed char... " >&6; }
11199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011200/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011201
Martin v. Löwis11437992002-04-12 09:54:03 +000011202int
11203main ()
11204{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011205signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011206 ;
11207 return 0;
11208}
11209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011210if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011211 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011212else
Skip Montanaro6dead952003-09-25 14:50:04 +000011213
Matthias Kloseb9621712010-04-24 17:59:49 +000011214$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011215
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011216
Guido van Rossum7f43da71994-08-01 12:15:30 +000011217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11220$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011221
Guido van Rossumda88dad1995-01-26 00:46:29 +000011222have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11224$as_echo_n "checking for prototypes... " >&6; }
11225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011226/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011227int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011228int
11229main ()
11230{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011231return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 ;
11233 return 0;
11234}
11235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011236if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
Matthias Kloseb9621712010-04-24 17:59:49 +000011238$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Matthias Kloseb159a552010-04-25 21:00:44 +000011240 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11244$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011245
Guido van Rossumda88dad1995-01-26 00:46:29 +000011246works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11248$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011250/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011251
11252#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011253int foo(int x, ...) {
11254 va_list va;
11255 va_start(va, x);
11256 va_arg(va, int);
11257 va_arg(va, char *);
11258 va_arg(va, double);
11259 return 0;
11260}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011261
Martin v. Löwis11437992002-04-12 09:54:03 +000011262int
11263main ()
11264{
Guido van Rossum90eea071996-08-30 20:58:57 +000011265return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 ;
11267 return 0;
11268}
11269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011270if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011271
11272
Matthias Kloseb9621712010-04-24 17:59:49 +000011273$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011274
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011275 works=yes
11276
Guido van Rossum627b2d71993-12-24 10:39:16 +000011277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11280$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011281
Martin v. Löwisd6320502004-08-12 13:45:08 +000011282# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11284$as_echo_n "checking for socketpair... " >&6; }
11285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011286/* end confdefs.h. */
11287
11288#include <sys/types.h>
11289#include <sys/socket.h>
11290
11291int
11292main ()
11293{
11294void *x=socketpair
11295 ;
11296 return 0;
11297}
11298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011300
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011302
Matthias Kloseb159a552010-04-25 21:00:44 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011304$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011305else
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011308
11309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011311
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011312# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11314$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011316/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011317#include <sys/types.h>
11318#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011319int
11320main ()
11321{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011322struct sockaddr x;
11323x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ;
11325 return 0;
11326}
11327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011328if ac_fn_c_try_compile "$LINENO"; then :
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11330$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011333
11334else
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011337
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011340
Guido van Rossumda88dad1995-01-26 00:46:29 +000011341va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11343$as_echo_n "checking whether va_list is an array... " >&6; }
11344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011345/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011346
11347#ifdef HAVE_STDARG_PROTOTYPES
11348#include <stdarg.h>
11349#else
11350#include <varargs.h>
11351#endif
11352
Martin v. Löwis11437992002-04-12 09:54:03 +000011353int
11354main ()
11355{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011356va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 ;
11358 return 0;
11359}
11360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011361if ac_fn_c_try_compile "$LINENO"; then :
11362
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011363else
Skip Montanaro6dead952003-09-25 14:50:04 +000011364
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011367
Guido van Rossumda88dad1995-01-26 00:46:29 +000011368 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011369
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11373$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011375# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
11377
Matthias Kloseb9621712010-04-24 17:59:49 +000011378ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011379if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11384$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011385 OLD_CFLAGS=$CFLAGS
11386 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011388/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011389
11390# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011391
Martin v. Löwis11437992002-04-12 09:54:03 +000011392int
11393main ()
11394{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011395
11396 char *name;
11397 struct hostent *he, *res;
11398 char buffer[2048];
11399 int buflen = 2048;
11400 int h_errnop;
11401
11402 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011403
11404 ;
11405 return 0;
11406}
11407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011411
Martin v. Löwis11437992002-04-12 09:54:03 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11416$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011417
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011418else
Skip Montanaro6dead952003-09-25 14:50:04 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11421$as_echo "no" >&6; }
11422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11423$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011425/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011426
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011427# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011432
11433 char *name;
11434 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011435 char buffer[2048];
11436 int buflen = 2048;
11437 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011438
Matthias Kloseb159a552010-04-25 21:00:44 +000011439 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011440
11441 ;
11442 return 0;
11443}
11444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011446
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011448
Martin v. Löwis11437992002-04-12 09:54:03 +000011449
Matthias Kloseb159a552010-04-25 21:00:44 +000011450$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011451
Matthias Kloseb9621712010-04-24 17:59:49 +000011452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11453$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011455else
Skip Montanaro6dead952003-09-25 14:50:04 +000011456
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11458$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11460$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11462/* end confdefs.h. */
11463
11464# include <netdb.h>
11465
11466int
11467main ()
11468{
11469
11470 char *name;
11471 struct hostent *he;
11472 struct hostent_data data;
11473
11474 (void) gethostbyname_r(name, he, &data);
11475
11476 ;
11477 return 0;
11478}
11479_ACEOF
11480if ac_fn_c_try_compile "$LINENO"; then :
11481
11482 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11483
11484
11485$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11486
11487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11488$as_echo "yes" >&6; }
11489
11490else
11491
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11493$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011494
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011503 CFLAGS=$OLD_CFLAGS
11504
11505else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011506
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 for ac_func in gethostbyname
11508do :
11509 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011510if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011512#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011513_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011514
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011515fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011516done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011517
Michael W. Hudson54241132001-12-07 15:38:26 +000011518
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011519fi
11520
Michael W. Hudson54241132001-12-07 15:38:26 +000011521
11522
11523
11524
11525
11526
Guido van Rossum627b2d71993-12-24 10:39:16 +000011527# checks for system services
11528# (none yet)
11529
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011530# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011531ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011532if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011533
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011534else
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11536$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011537if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011538 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011539else
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011541LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545/* Override any GCC internal prototype to avoid an error.
11546 Use char because int might match the return type of a GCC
11547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011548#ifdef __cplusplus
11549extern "C"
11550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011551char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011552int
11553main ()
11554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 ;
11557 return 0;
11558}
11559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011560if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011562else
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011565rm -f core conftest.err conftest.$ac_objext \
11566 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011567LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11570$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011571if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 cat >>confdefs.h <<_ACEOF
11573#define HAVE_LIBIEEE 1
11574_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011575
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011576 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011577
Guido van Rossum627b2d71993-12-24 10:39:16 +000011578fi
11579
Michael W. Hudson54241132001-12-07 15:38:26 +000011580
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011581fi
11582
Michael W. Hudson54241132001-12-07 15:38:26 +000011583
Guido van Rossum7f253911997-05-09 02:42:48 +000011584# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11586$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011589if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011591if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011592then
11593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011595
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11597$as_echo "yes" >&6; }
11598else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011600fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011601else
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11603$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011604fi
11605
Guido van Rossum7f253911997-05-09 02:42:48 +000011606
Guido van Rossum7f43da71994-08-01 12:15:30 +000011607# check for --with-libm=...
11608
Guido van Rossum563e7081996-09-10 18:20:48 +000011609case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011610Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011611*) LIBM=-lm
11612esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11614$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011616# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011618 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011619if test "$withval" = no
11620then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11622$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011623elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011624then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11626$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011627else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011628fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011629else
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11631$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011632fi
11633
Guido van Rossum7f43da71994-08-01 12:15:30 +000011634
11635# check for --with-libc=...
11636
Matthias Kloseb9621712010-04-24 17:59:49 +000011637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11638$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011643if test "$withval" = no
11644then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11646$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011647elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011648then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11650$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011651else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011652fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011653else
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11655$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656fi
11657
Guido van Rossum7f43da71994-08-01 12:15:30 +000011658
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011659# **************************************************
11660# * Check for various properties of floating point *
11661# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11664$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011665if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011667else
11668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011670 ac_cv_little_endian_double=no
11671else
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011673/* end confdefs.h. */
11674
11675#include <string.h>
11676int main() {
11677 double x = 9006104071832581.0;
11678 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11679 return 0;
11680 else
11681 return 1;
11682}
11683
11684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011685if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686 ac_cv_little_endian_double=yes
11687else
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11691 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692fi
11693
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694fi
11695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11697$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698if test "$ac_cv_little_endian_double" = yes
11699then
11700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702
11703fi
11704
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11706$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011707if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011708 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011709else
11710
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011712 ac_cv_big_endian_double=no
11713else
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011715/* end confdefs.h. */
11716
11717#include <string.h>
11718int main() {
11719 double x = 9006104071832581.0;
11720 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11721 return 0;
11722 else
11723 return 1;
11724}
11725
11726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011727if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728 ac_cv_big_endian_double=yes
11729else
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734fi
11735
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736fi
11737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11739$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740if test "$ac_cv_big_endian_double" = yes
11741then
11742
Matthias Kloseb9621712010-04-24 17:59:49 +000011743$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011744
11745fi
11746
11747# Some ARM platforms use a mixed-endian representation for doubles.
11748# While Python doesn't currently have full support for these platforms
11749# (see e.g., issue 1762561), we can at least make sure that float <-> string
11750# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11752$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011753if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011755else
11756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758 ac_cv_mixed_endian_double=no
11759else
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761/* end confdefs.h. */
11762
11763#include <string.h>
11764int main() {
11765 double x = 9006104071832581.0;
11766 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11767 return 0;
11768 else
11769 return 1;
11770}
11771
11772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011773if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011774 ac_cv_mixed_endian_double=yes
11775else
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780fi
11781
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011782fi
11783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11785$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786if test "$ac_cv_mixed_endian_double" = yes
11787then
11788
Matthias Kloseb9621712010-04-24 17:59:49 +000011789$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011790
11791fi
11792
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011793# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011794# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011795# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011796# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011797# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011798# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011799
11800# This inline assembler syntax may also work for suncc and icc,
11801# so we try it on all platforms.
11802
Matthias Kloseb9621712010-04-24 17:59:49 +000011803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11804$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011806/* end confdefs.h. */
11807
11808int
11809main ()
11810{
11811
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011812 unsigned short cw;
11813 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11814 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011815
11816 ;
11817 return 0;
11818}
11819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011820if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011821 have_gcc_asm_for_x87=yes
11822else
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011824fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11827$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011828if test "$have_gcc_asm_for_x87" = yes
11829then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830
Matthias Kloseb9621712010-04-24 17:59:49 +000011831$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011832
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011834
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011835# Detect whether system arithmetic is subject to x87-style double
11836# rounding issues. The result of this test has little meaning on non
11837# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11838# mode is round-to-nearest and double rounding issues are present, and
11839# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11841$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011842# $BASECFLAGS may affect the result
11843ac_save_cc="$CC"
11844CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011845if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011846 ac_cv_x87_double_rounding=no
11847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011849/* end confdefs.h. */
11850
11851#include <stdlib.h>
11852#include <math.h>
11853int main() {
11854 volatile double x, y, z;
11855 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11856 x = 0.99999999999999989; /* 1-2**-53 */
11857 y = 1./x;
11858 if (y != 1.)
11859 exit(0);
11860 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11861 x = 1e16;
11862 y = 2.99999;
11863 z = x + y;
11864 if (z != 1e16+4.)
11865 exit(0);
11866 /* both tests show evidence of double rounding */
11867 exit(1);
11868}
11869
11870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011871if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011872 ac_cv_x87_double_rounding=no
11873else
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011878fi
11879
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011880CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11882$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011883if test "$ac_cv_x87_double_rounding" = yes
11884then
11885
Matthias Kloseb9621712010-04-24 17:59:49 +000011886$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011887
11888fi
11889
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011890# ************************************
11891# * Check for mathematical functions *
11892# ************************************
11893
11894LIBS_SAVE=$LIBS
11895LIBS="$LIBS $LIBM"
11896
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011897for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11898do :
11899 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11900ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011901if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011902 cat >>confdefs.h <<_ACEOF
11903#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11904_ACEOF
11905
11906fi
11907done
11908
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011909for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011910do :
11911 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11912ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011913if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011914 cat >>confdefs.h <<_ACEOF
11915#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11916_ACEOF
11917
11918fi
11919done
11920
11921ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11922"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011923if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011924 ac_have_decl=1
11925else
11926 ac_have_decl=0
11927fi
11928
11929cat >>confdefs.h <<_ACEOF
11930#define HAVE_DECL_ISINF $ac_have_decl
11931_ACEOF
11932ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11933"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011934if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011935 ac_have_decl=1
11936else
11937 ac_have_decl=0
11938fi
11939
11940cat >>confdefs.h <<_ACEOF
11941#define HAVE_DECL_ISNAN $ac_have_decl
11942_ACEOF
11943ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11944"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011945if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011946 ac_have_decl=1
11947else
11948 ac_have_decl=0
11949fi
11950
11951cat >>confdefs.h <<_ACEOF
11952#define HAVE_DECL_ISFINITE $ac_have_decl
11953_ACEOF
11954
11955
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011956# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11957# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11959$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011960if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011962else
11963
Matthias Kloseb9621712010-04-24 17:59:49 +000011964if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011965 ac_cv_tanh_preserves_zero_sign=no
11966else
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011968/* end confdefs.h. */
11969
11970#include <math.h>
11971#include <stdlib.h>
11972int main() {
11973 /* return 0 if either negative zeros don't exist
11974 on this platform or if negative zeros exist
11975 and tanh(-0.) == -0. */
11976 if (atan2(0., -1.) == atan2(-0., -1.) ||
11977 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11978 else exit(1);
11979}
11980
11981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011982if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011983 ac_cv_tanh_preserves_zero_sign=yes
11984else
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011989fi
11990
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011991fi
11992
Matthias Kloseb9621712010-04-24 17:59:49 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11994$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011995if test "$ac_cv_tanh_preserves_zero_sign" = yes
11996then
11997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011999
12000fi
12001
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012002if test "$ac_cv_func_log1p" = yes
12003then
12004 # On some versions of AIX, log1p(-0.) returns 0. instead of
12005 # -0. See issue #9920.
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12007$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012008 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012009 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012010else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012011
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012012 if test "$cross_compiling" = yes; then :
12013 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012014else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12016/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012017
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012018 #include <math.h>
12019 #include <stdlib.h>
12020 int main() {
12021 /* Fail if the signs of log1p(-0.) and -0. can be
12022 distinguished. */
12023 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12024 return 0;
12025 else
12026 return 1;
12027 }
12028
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012029_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012030if ac_fn_c_try_run "$LINENO"; then :
12031 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012032else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012033 ac_cv_log1p_drops_zero_sign=yes
12034fi
12035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012037fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012038
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012039fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012040
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12042$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12043fi
12044if test "$ac_cv_log1p_drops_zero_sign" = yes
12045then
12046
12047$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12048
12049fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012050
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012051LIBS=$LIBS_SAVE
12052
Mark Dickinsona614f042009-11-28 12:48:43 +000012053# For multiprocessing module, check that sem_open
12054# actually works. For FreeBSD versions <= 7.2,
12055# the kernel module that provides POSIX semaphores
12056# isn't loaded by default, so an attempt to call
12057# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12059$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012060if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012064 ac_cv_posix_semaphores_enabled=yes
12065else
Matthias Kloseb9621712010-04-24 17:59:49 +000012066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012067/* end confdefs.h. */
12068
12069#include <unistd.h>
12070#include <fcntl.h>
12071#include <stdio.h>
12072#include <semaphore.h>
12073#include <sys/stat.h>
12074
12075int main(void) {
12076 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12077 if (a == SEM_FAILED) {
12078 perror("sem_open");
12079 return 1;
12080 }
12081 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012082 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012083 return 0;
12084}
12085
12086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012087if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012088 ac_cv_posix_semaphores_enabled=yes
12089else
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012094fi
12095
12096
Mark Dickinsona614f042009-11-28 12:48:43 +000012097fi
12098
Matthias Kloseb9621712010-04-24 17:59:49 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12100$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012101if test $ac_cv_posix_semaphores_enabled = no
12102then
12103
Matthias Kloseb9621712010-04-24 17:59:49 +000012104$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012105
12106fi
12107
Mark Dickinson10683072009-04-18 21:18:19 +000012108# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12110$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012111if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012113else
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012115 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012118/* end confdefs.h. */
12119
12120#include <unistd.h>
12121#include <fcntl.h>
12122#include <stdio.h>
12123#include <semaphore.h>
12124#include <sys/stat.h>
12125
12126int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012127 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012128 int count;
12129 int res;
12130 if(a==SEM_FAILED){
12131 perror("sem_open");
12132 return 1;
12133
12134 }
12135 res = sem_getvalue(a, &count);
12136 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012137 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012138 return res==-1 ? 1 : 0;
12139}
12140
Mark Dickinson10683072009-04-18 21:18:19 +000012141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012142if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012143 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12148 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012149fi
12150
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012151
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012152fi
12153
Matthias Kloseb9621712010-04-24 17:59:49 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12155$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012156if test $ac_cv_broken_sem_getvalue = yes
12157then
12158
Matthias Kloseb9621712010-04-24 17:59:49 +000012159$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012160
12161fi
12162
Mark Dickinsonbd792642009-03-18 20:06:12 +000012163# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12165$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012166# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012167if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012168 enableval=$enable_big_digits; case $enable_big_digits in
12169yes)
12170 enable_big_digits=30 ;;
12171no)
12172 enable_big_digits=15 ;;
1217315|30)
12174 ;;
12175*)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012176 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 +000012177esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12179$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012180
12181cat >>confdefs.h <<_ACEOF
12182#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12183_ACEOF
12184
12185
12186else
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12188$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012189fi
12190
12191
Guido van Rossumef2255b2000-03-10 22:30:29 +000012192# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012193ac_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 +020012194if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012195
12196
Matthias Kloseb9621712010-04-24 17:59:49 +000012197$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012198
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012199 wchar_h="yes"
12200
Guido van Rossumef2255b2000-03-10 22:30:29 +000012201else
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012203
12204fi
12205
Michael W. Hudson54241132001-12-07 15:38:26 +000012206
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012208# determine wchar_t size
12209if test "$wchar_h" = yes
12210then
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12213# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12214# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12216$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012217if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012219else
Matthias Kloseb9621712010-04-24 17:59:49 +000012220 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12221"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012222
Martin v. Löwis11437992002-04-12 09:54:03 +000012223else
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 if test "$ac_cv_type_wchar_t" = yes; then
12225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012227as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012228See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229 else
12230 ac_cv_sizeof_wchar_t=0
12231 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233
Martin v. Löwis11437992002-04-12 09:54:03 +000012234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12236$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012237
12238
12239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012241#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012242_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012243
Michael W. Hudson54241132001-12-07 15:38:26 +000012244
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012245fi
12246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12248$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012249have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012252
12253#include <tcl.h>
12254#if TCL_UTF_MAX != 6
12255# error "NOT UCS4_TCL"
12256#endif
12257int
12258main ()
12259{
12260
12261 ;
12262 return 0;
12263}
12264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012266
12267
Matthias Kloseb9621712010-04-24 17:59:49 +000012268$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012269
12270 have_ucs4_tcl=yes
12271
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12275$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012276
Skip Montanaro6dead952003-09-25 14:50:04 +000012277# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012278if test "$wchar_h" = yes
12279then
12280 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12282$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012283 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012285else
12286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012288 ac_cv_wchar_t_signed=yes
12289else
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012291/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012292
12293 #include <wchar.h>
12294 int main()
12295 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012296 /* Success: exit code 0 */
12297 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012298 }
12299
12300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012301if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012302 ac_cv_wchar_t_signed=yes
12303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012308fi
12309
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012310fi
12311
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12313$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314fi
12315
Matthias Kloseb9621712010-04-24 17:59:49 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12317$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012318
12319# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012320if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012321 withval=$with_wide_unicode;
12322if test "$withval" != no
12323then unicode_size="4"
12324else unicode_size="2"
12325fi
12326
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012327else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328
Georg Brandl52d168a2008-01-07 18:10:24 +000012329case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012330 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012331 *) unicode_size="2" ;;
12332esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012333
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012334fi
12335
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012336
12337
Georg Brandl52d168a2008-01-07 18:10:24 +000012338case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012339 4)
12340 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12341
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012342 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012343 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012345 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012346esac
12347
Michael W. Hudson54241132001-12-07 15:38:26 +000012348
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
Georg Brandl52d168a2008-01-07 18:10:24 +000012350# wchar_t is only usable if it maps to an unsigned type
12351if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012352 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012353then
12354 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012357
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012359
Georg Brandl52d168a2008-01-07 18:10:24 +000012360elif test "$ac_cv_sizeof_short" = "$unicode_size"
12361then
12362 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012364
Georg Brandl52d168a2008-01-07 18:10:24 +000012365elif test "$ac_cv_sizeof_long" = "$unicode_size"
12366then
12367 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012369
Georg Brandl52d168a2008-01-07 18:10:24 +000012370else
12371 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12374$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012375
12376# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12378$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012379if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012381else
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 ac_cv_c_bigendian=unknown
12383 # See if we're dealing with a universal compiler.
12384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12385/* end confdefs.h. */
12386#ifndef __APPLE_CC__
12387 not a universal capable compiler
12388 #endif
12389 typedef int dummy;
12390
Skip Montanaro6dead952003-09-25 14:50:04 +000012391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012392if ac_fn_c_try_compile "$LINENO"; then :
12393
12394 # Check for potential -arch flags. It is not universal unless
12395 # there are at least two -arch flags with different values.
12396 ac_arch=
12397 ac_prev=
12398 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12399 if test -n "$ac_prev"; then
12400 case $ac_word in
12401 i?86 | x86_64 | ppc | ppc64)
12402 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12403 ac_arch=$ac_word
12404 else
12405 ac_cv_c_bigendian=universal
12406 break
12407 fi
12408 ;;
12409 esac
12410 ac_prev=
12411 elif test "x$ac_word" = "x-arch"; then
12412 ac_prev=arch
12413 fi
12414 done
12415fi
12416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12417 if test $ac_cv_c_bigendian = unknown; then
12418 # See if sys/param.h defines the BYTE_ORDER macro.
12419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012420/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012421#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012422 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012423
Martin v. Löwis11437992002-04-12 09:54:03 +000012424int
12425main ()
12426{
Matthias Kloseb9621712010-04-24 17:59:49 +000012427#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12428 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12429 && LITTLE_ENDIAN)
12430 bogus endian macros
12431 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012432
12433 ;
12434 return 0;
12435}
12436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012437if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012438 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012440/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012441#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012442 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012443
Martin v. Löwis11437992002-04-12 09:54:03 +000012444int
12445main ()
12446{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012447#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 not big endian
12449 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
12451 ;
12452 return 0;
12453}
12454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012455if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012456 ac_cv_c_bigendian=yes
12457else
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012461fi
12462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12463 fi
12464 if test $ac_cv_c_bigendian = unknown; then
12465 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012467/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012468#include <limits.h>
12469
Martin v. Löwis11437992002-04-12 09:54:03 +000012470int
12471main ()
12472{
Matthias Kloseb9621712010-04-24 17:59:49 +000012473#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12474 bogus endian macros
12475 #endif
12476
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_compile "$LINENO"; then :
12482 # It does; now see whether it defined to _BIG_ENDIAN or not.
12483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12484/* end confdefs.h. */
12485#include <limits.h>
12486
12487int
12488main ()
12489{
12490#ifndef _BIG_ENDIAN
12491 not big endian
12492 #endif
12493
12494 ;
12495 return 0;
12496}
12497_ACEOF
12498if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012499 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012500else
Matthias Kloseb9621712010-04-24 17:59:49 +000012501 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12504fi
12505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12506 fi
12507 if test $ac_cv_c_bigendian = unknown; then
12508 # Compile a test program.
12509 if test "$cross_compiling" = yes; then :
12510 # Try to guess by grepping values from an object file.
12511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12512/* end confdefs.h. */
12513short int ascii_mm[] =
12514 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12515 short int ascii_ii[] =
12516 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12517 int use_ascii (int i) {
12518 return ascii_mm[i] + ascii_ii[i];
12519 }
12520 short int ebcdic_ii[] =
12521 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12522 short int ebcdic_mm[] =
12523 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12524 int use_ebcdic (int i) {
12525 return ebcdic_mm[i] + ebcdic_ii[i];
12526 }
12527 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528
Matthias Kloseb9621712010-04-24 17:59:49 +000012529int
12530main ()
12531{
12532return use_ascii (foo) == use_ebcdic (foo);
12533 ;
12534 return 0;
12535}
12536_ACEOF
12537if ac_fn_c_try_compile "$LINENO"; then :
12538 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12539 ac_cv_c_bigendian=yes
12540 fi
12541 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12542 if test "$ac_cv_c_bigendian" = unknown; then
12543 ac_cv_c_bigendian=no
12544 else
12545 # finding both strings is unlikely to happen, but who knows?
12546 ac_cv_c_bigendian=unknown
12547 fi
12548 fi
12549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012553/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012554$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012555int
12556main ()
12557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 /* Are we little or big endian? From Harbison&Steele. */
12560 union
12561 {
12562 long int l;
12563 char c[sizeof (long int)];
12564 } u;
12565 u.l = 1;
12566 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567
12568 ;
12569 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012570}
Martin v. Löwis11437992002-04-12 09:54:03 +000012571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012573 ac_cv_c_bigendian=no
12574else
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12584$as_echo "$ac_cv_c_bigendian" >&6; }
12585 case $ac_cv_c_bigendian in #(
12586 yes)
12587 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12588;; #(
12589 no)
12590 ;; #(
12591 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012592
Matthias Kloseb9621712010-04-24 17:59:49 +000012593$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 ;; #(
12596 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012597 as_fn_error $? "unknown endianness
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012598 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012600
Michael W. Hudson54241132001-12-07 15:38:26 +000012601
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012602# ABI version string for Python extension modules. This appears between the
12603# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12604# from the following attributes which affect the ABI of this Python build (in
12605# this order):
12606#
12607# * The Python implementation (always 'cpython-' for us)
12608# * The major and minor version numbers
12609# * --with-pydebug (adds a 'd')
12610# * --with-pymalloc (adds a 'm')
12611# * --with-wide-unicode (adds a 'u')
12612#
12613# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012614# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12615# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012616
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12618$as_echo_n "checking ABIFLAGS... " >&6; }
12619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12620$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12622$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012623SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12625$as_echo "$SOABI" >&6; }
12626
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12628$as_echo_n "checking LDVERSION... " >&6; }
12629LDVERSION='$(VERSION)$(ABIFLAGS)'
12630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12631$as_echo "$LDVERSION" >&6; }
12632
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012633# SO is the extension of shared libraries `(including the dot!)
12634# -- usually .so, .sl on HP-UX, .dll on Cygwin
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12636$as_echo_n "checking SO... " >&6; }
12637if test -z "$SO"
12638then
12639 case $ac_sys_system in
12640 hp*|HP*)
12641 case `uname -m` in
12642 ia64) SO=.so;;
12643 *) SO=.sl;;
12644 esac
12645 ;;
12646 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012647 Linux*|GNU*)
12648 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012649 *) SO=.so;;
12650 esac
12651else
12652 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012653 echo
12654 echo '====================================================================='
12655 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012656 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012657 echo '+ Do you really mean to change the extension for shared libraries? +'
12658 echo '+ Continuing in 10 seconds to let you to ponder. +'
12659 echo '+ +'
12660 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012661 sleep 10
12662fi
12663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12664$as_echo "$SO" >&6; }
12665
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012666# Check whether right shifting a negative integer extends the sign bit
12667# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12669$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012670if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012672else
Martin v. Löwis11437992002-04-12 09:54:03 +000012673
Matthias Kloseb9621712010-04-24 17:59:49 +000012674if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012675 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012676else
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012678/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012679
12680int main()
12681{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012682 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012683}
12684
Martin v. Löwis11437992002-04-12 09:54:03 +000012685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012686if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012687 ac_cv_rshift_extends_sign=yes
12688else
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012693fi
12694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695fi
12696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12698$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012699if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012700then
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012703
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012704fi
12705
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012706# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12708$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012709if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012710 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012711else
Martin v. Löwis11437992002-04-12 09:54:03 +000012712
Matthias Kloseb9621712010-04-24 17:59:49 +000012713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012714/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012715#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012716int
12717main ()
12718{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012719
12720 FILE *f = fopen("/dev/null", "r");
12721 flockfile(f);
12722 getc_unlocked(f);
12723 funlockfile(f);
12724
Martin v. Löwis11437992002-04-12 09:54:03 +000012725 ;
12726 return 0;
12727}
12728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012729if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012730 ac_cv_have_getc_unlocked=yes
12731else
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 ac_cv_have_getc_unlocked=no
12733fi
12734rm -f core conftest.err conftest.$ac_objext \
12735 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12739$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012740if test "$ac_cv_have_getc_unlocked" = yes
12741then
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012744
12745fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012746
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012747# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012748# save the value of LIBS so we don't actually link Python with readline
12749LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012750
Gregory P. Smith18820942008-09-07 06:24:49 +000012751# On some systems we need to link readline to a termcap compatible
12752# library. NOTE: Keep the precedence of listed libraries synchronised
12753# with setup.py.
12754py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12756$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012757for py_libtermcap in "" ncursesw ncurses curses termcap; do
12758 if test -z "$py_libtermcap"; then
12759 READLINE_LIBS="-lreadline"
12760 else
12761 READLINE_LIBS="-lreadline -l$py_libtermcap"
12762 fi
12763 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012765/* end confdefs.h. */
12766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012767/* Override any GCC internal prototype to avoid an error.
12768 Use char because int might match the return type of a GCC
12769 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012770#ifdef __cplusplus
12771extern "C"
12772#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012773char readline ();
12774int
12775main ()
12776{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012778 ;
12779 return 0;
12780}
12781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012782if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012783 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012785rm -f core conftest.err conftest.$ac_objext \
12786 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012787 if test $py_cv_lib_readline = yes; then
12788 break
12789 fi
12790done
12791# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12792#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012793if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12795$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012796else
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12798$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012801
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012802fi
12803
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012804# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12806$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012807if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012809else
12810 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012811LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012813/* end confdefs.h. */
12814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815/* Override any GCC internal prototype to avoid an error.
12816 Use char because int might match the return type of a GCC
12817 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012818#ifdef __cplusplus
12819extern "C"
12820#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012821char rl_callback_handler_install ();
12822int
12823main ()
12824{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012825return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012826 ;
12827 return 0;
12828}
12829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012830if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012831 ac_cv_lib_readline_rl_callback_handler_install=yes
12832else
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012835rm -f core conftest.err conftest.$ac_objext \
12836 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012837LIBS=$ac_check_lib_save_LIBS
12838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12840$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012841if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012844
12845fi
12846
12847
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012848# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012850/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012851#include <readline/readline.h>
12852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012853if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012854 have_readline=yes
12855else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012856 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012857
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012858fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012859rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012860if test $have_readline = yes
12861then
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012863/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012864#include <readline/readline.h>
12865
12866_ACEOF
12867if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012869
Matthias Kloseb9621712010-04-24 17:59:49 +000012870$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012871
12872fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012873rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012876/* end confdefs.h. */
12877#include <readline/readline.h>
12878
12879_ACEOF
12880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012884
12885fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012886rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012887
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012888fi
12889
Martin v. Löwis0daad592001-09-30 21:09:59 +000012890# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12892$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012893if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012895else
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012897LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901/* Override any GCC internal prototype to avoid an error.
12902 Use char because int might match the return type of a GCC
12903 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012904#ifdef __cplusplus
12905extern "C"
12906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012907char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012908int
12909main ()
12910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 ;
12913 return 0;
12914}
12915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012916if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012918else
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012921rm -f core conftest.err conftest.$ac_objext \
12922 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012923LIBS=$ac_check_lib_save_LIBS
12924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12926$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012927if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012930
Martin v. Löwis0daad592001-09-30 21:09:59 +000012931fi
12932
Michael W. Hudson54241132001-12-07 15:38:26 +000012933
Thomas Wouters89d996e2007-09-08 17:39:28 +000012934# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12936$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012937if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012939else
12940 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012941LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012943/* end confdefs.h. */
12944
12945/* Override any GCC internal prototype to avoid an error.
12946 Use char because int might match the return type of a GCC
12947 builtin and then its argument prototype would still apply. */
12948#ifdef __cplusplus
12949extern "C"
12950#endif
12951char rl_completion_display_matches_hook ();
12952int
12953main ()
12954{
12955return rl_completion_display_matches_hook ();
12956 ;
12957 return 0;
12958}
12959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012960if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012961 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12962else
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012965rm -f core conftest.err conftest.$ac_objext \
12966 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012967LIBS=$ac_check_lib_save_LIBS
12968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12970$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012971if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012974
12975fi
12976
12977
Martin v. Löwis0daad592001-09-30 21:09:59 +000012978# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12980$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020012981if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012982 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012983else
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012985LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012989/* Override any GCC internal prototype to avoid an error.
12990 Use char because int might match the return type of a GCC
12991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012992#ifdef __cplusplus
12993extern "C"
12994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012995char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012996int
12997main ()
12998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 ;
13001 return 0;
13002}
13003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013006else
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013009rm -f core conftest.err conftest.$ac_objext \
13010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013011LIBS=$ac_check_lib_save_LIBS
13012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13014$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013015if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013016
Matthias Kloseb9621712010-04-24 17:59:49 +000013017$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013018
Guido van Rossum353ae582001-07-10 16:45:32 +000013019fi
13020
Jack Jansendd19cf82001-12-06 22:36:17 +000013021
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013022# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013024/* end confdefs.h. */
13025#include <readline/readline.h>
13026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013027if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013028 have_readline=yes
13029else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013030 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013031
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013032fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013033rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013034if test $have_readline = yes
13035then
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013037/* end confdefs.h. */
13038#include <readline/readline.h>
13039
13040_ACEOF
13041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013043
Matthias Kloseb9621712010-04-24 17:59:49 +000013044$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013045
13046fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013047rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013048
13049fi
13050
Martin v. Löwis82bca632006-02-10 20:49:30 +000013051# End of readline checks: restore LIBS
13052LIBS=$LIBS_no_readline
13053
Matthias Kloseb9621712010-04-24 17:59:49 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13055$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013056if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013058else
Martin v. Löwis11437992002-04-12 09:54:03 +000013059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013061 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013062else
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013064/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013065
13066int main()
13067{
13068 int val1 = nice(1);
13069 if (val1 != -1 && val1 == nice(2))
13070 exit(0);
13071 exit(1);
13072}
13073
Martin v. Löwis11437992002-04-12 09:54:03 +000013074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013076 ac_cv_broken_nice=yes
13077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13081 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013082fi
13083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013084fi
13085
Matthias Kloseb9621712010-04-24 17:59:49 +000013086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13087$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013088if test "$ac_cv_broken_nice" = yes
13089then
Martin v. Löwis11437992002-04-12 09:54:03 +000013090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013092
13093fi
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13096$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013097if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013099else
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013101 ac_cv_broken_poll=no
13102else
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013104/* end confdefs.h. */
13105
13106#include <poll.h>
13107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013108int main()
13109{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013110 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013111 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013112
13113 close (42);
13114
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013115 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013116 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013117 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013118 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013119 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013120 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121 return 1;
13122}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013123
13124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013125if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013126 ac_cv_broken_poll=yes
13127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013134fi
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13137$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013138if test "$ac_cv_broken_poll" = yes
13139then
13140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013142
13143fi
13144
Brett Cannon43802422005-02-10 20:48:03 +000013145# 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 +000013146# (which is not required by ISO C or UNIX spec) and/or if we support
13147# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013148ac_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 +000013149#include <$ac_cv_struct_tm>
13150
Matthias Kloseb9621712010-04-24 17:59:49 +000013151"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013152if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013153
13154cat >>confdefs.h <<_ACEOF
13155#define HAVE_STRUCT_TM_TM_ZONE 1
13156_ACEOF
13157
13158
13159fi
13160
13161if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13162
Matthias Kloseb9621712010-04-24 17:59:49 +000013163$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013164
13165else
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13167"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013168if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170else
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172fi
13173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013174cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013175#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013176_ACEOF
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13179$as_echo_n "checking for tzname... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013180if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182else
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013184/* end confdefs.h. */
13185#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186#if !HAVE_DECL_TZNAME
13187extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013188#endif
13189
13190int
13191main ()
13192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013194 ;
13195 return 0;
13196}
13197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013198if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013199 ac_cv_var_tzname=yes
13200else
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013203rm -f core conftest.err conftest.$ac_objext \
13204 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13207$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013208 if test $ac_cv_var_tzname = yes; then
13209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013211
13212 fi
13213fi
13214
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013215
Martin v. Löwis1d459062005-03-14 21:23:33 +000013216# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13218$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013219if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013221else
13222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013224 ac_cv_working_tzset=no
13225else
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013227/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013228
13229#include <stdlib.h>
13230#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013231#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013232
13233#if HAVE_TZNAME
13234extern char *tzname[];
13235#endif
13236
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013237int main()
13238{
Brett Cannon18367812003-09-19 00:59:16 +000013239 /* Note that we need to ensure that not only does tzset(3)
13240 do 'something' with localtime, but it works as documented
13241 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013242 This includes making sure that tzname is set properly if
13243 tm->tm_zone does not exist since it is the alternative way
13244 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013245
13246 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013247 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013248 */
13249
Martin v. Löwis1d459062005-03-14 21:23:33 +000013250 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013251 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13252
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013253 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013254 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013255 if (localtime(&groundhogday)->tm_hour != 0)
13256 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013257#if HAVE_TZNAME
13258 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13259 if (strcmp(tzname[0], "UTC") ||
13260 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13261 exit(1);
13262#endif
Brett Cannon18367812003-09-19 00:59:16 +000013263
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013264 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013265 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013266 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013267 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013268#if HAVE_TZNAME
13269 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13270 exit(1);
13271#endif
Brett Cannon18367812003-09-19 00:59:16 +000013272
13273 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13274 tzset();
13275 if (localtime(&groundhogday)->tm_hour != 11)
13276 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013277#if HAVE_TZNAME
13278 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13279 exit(1);
13280#endif
13281
13282#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013283 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13284 exit(1);
13285 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13286 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013287#endif
Brett Cannon18367812003-09-19 00:59:16 +000013288
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013289 exit(0);
13290}
13291
13292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013293if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013294 ac_cv_working_tzset=yes
13295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13299 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013300fi
13301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013302fi
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13305$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013306if test "$ac_cv_working_tzset" = yes
13307then
13308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013310
13311fi
13312
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013313# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13315$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013316if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013320/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013321#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013322int
13323main ()
13324{
13325
13326struct stat st;
13327st.st_mtim.tv_nsec = 1;
13328
13329 ;
13330 return 0;
13331}
13332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013334 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13339fi
13340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13342$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013343if test "$ac_cv_stat_tv_nsec" = yes
13344then
13345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013347
13348fi
13349
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013350# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13352$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013353if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013355else
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013357/* end confdefs.h. */
13358#include <sys/stat.h>
13359int
13360main ()
13361{
13362
13363struct stat st;
13364st.st_mtimespec.tv_nsec = 1;
13365
13366 ;
13367 return 0;
13368}
13369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013371 ac_cv_stat_tv_nsec2=yes
13372else
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13376fi
13377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13379$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013380if test "$ac_cv_stat_tv_nsec2" = yes
13381then
13382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013384
13385fi
13386
Jack Jansen666b1e72001-10-31 12:11:48 +000013387# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13389$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013390if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013392else
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013394/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013395#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013396int
13397main ()
13398{
Jack Jansen666b1e72001-10-31 12:11:48 +000013399
13400 int rtn;
13401 rtn = mvwdelch(0,0,0);
13402
Martin v. Löwis11437992002-04-12 09:54:03 +000013403 ;
13404 return 0;
13405}
13406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013407if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013408 ac_cv_mvwdelch_is_expression=yes
13409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13413fi
13414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13416$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013417
13418if test "$ac_cv_mvwdelch_is_expression" = yes
13419then
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013422
13423fi
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13426$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013427if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013431/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013432#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013433int
13434main ()
13435{
Jack Jansen666b1e72001-10-31 12:11:48 +000013436
13437 WINDOW *w;
13438 w->_flags = 0;
13439
Martin v. Löwis11437992002-04-12 09:54:03 +000013440 ;
13441 return 0;
13442}
13443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013444if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013445 ac_cv_window_has_flags=yes
13446else
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13450fi
13451
Matthias Kloseb9621712010-04-24 17:59:49 +000013452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13453$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013454
Jack Jansen666b1e72001-10-31 12:11:48 +000013455
13456if test "$ac_cv_window_has_flags" = yes
13457then
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013460
13461fi
13462
Matthias Kloseb9621712010-04-24 17:59:49 +000013463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13464$as_echo_n "checking for is_term_resized... " >&6; }
13465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013466/* end confdefs.h. */
13467#include <curses.h>
13468int
13469main ()
13470{
13471void *x=is_term_resized
13472 ;
13473 return 0;
13474}
13475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013476if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013477
Matthias Kloseb9621712010-04-24 17:59:49 +000013478$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013479
Matthias Kloseb159a552010-04-25 21:00:44 +000013480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013481$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013482else
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13484$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013485
13486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13490$as_echo_n "checking for resize_term... " >&6; }
13491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013492/* end confdefs.h. */
13493#include <curses.h>
13494int
13495main ()
13496{
13497void *x=resize_term
13498 ;
13499 return 0;
13500}
13501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013502if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013503
Matthias Kloseb9621712010-04-24 17:59:49 +000013504$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013505
Matthias Kloseb159a552010-04-25 21:00:44 +000013506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013507$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013508else
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13510$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013511
13512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13516$as_echo_n "checking for resizeterm... " >&6; }
13517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013518/* end confdefs.h. */
13519#include <curses.h>
13520int
13521main ()
13522{
13523void *x=resizeterm
13524 ;
13525 return 0;
13526}
13527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013528if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013531
Matthias Kloseb159a552010-04-25 21:00:44 +000013532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013533$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013534else
Matthias Kloseb9621712010-04-24 17:59:49 +000013535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13536$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013537
13538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13542$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013543
13544if test -r /dev/ptmx
13545then
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13547$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013550
Thomas Wouters89f507f2006-12-13 04:49:30 +000013551else
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13553$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013554fi
13555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13557$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013558
13559if test -r /dev/ptc
13560then
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13562$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013565
Thomas Wouters89f507f2006-12-13 04:49:30 +000013566else
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13568$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013569fi
13570
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013571if test "$have_long_long" = yes
13572then
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13574$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013575 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013579 ac_cv_have_long_long_format=no
13580else
Matthias Kloseb9621712010-04-24 17:59:49 +000013581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013582/* end confdefs.h. */
13583
13584 #include <stdio.h>
13585 #include <stddef.h>
13586 #include <string.h>
13587
13588 #ifdef HAVE_SYS_TYPES_H
13589 #include <sys/types.h>
13590 #endif
13591
13592 int main()
13593 {
13594 char buffer[256];
13595
13596 if (sprintf(buffer, "%lld", (long long)123) < 0)
13597 return 1;
13598 if (strcmp(buffer, "123"))
13599 return 1;
13600
13601 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13602 return 1;
13603 if (strcmp(buffer, "-123"))
13604 return 1;
13605
13606 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13607 return 1;
13608 if (strcmp(buffer, "123"))
13609 return 1;
13610
13611 return 0;
13612 }
13613
13614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013615if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013616 ac_cv_have_long_long_format=yes
13617else
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013622fi
13623
13624
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013625fi
13626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13628$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013629fi
13630
Mark Dickinson89d7d412009-12-31 20:50:59 +000013631if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013632then
13633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013635
13636fi
13637
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013638if test $ac_sys_system = Darwin
13639then
13640 LIBS="$LIBS -framework CoreFoundation"
13641fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13644$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013645if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013649 ac_cv_have_size_t_format="cross -- assuming yes"
13650
Thomas Wouters477c8d52006-05-27 19:21:47 +000013651else
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013653/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013654
Thomas Wouters477c8d52006-05-27 19:21:47 +000013655#include <stdio.h>
13656#include <stddef.h>
13657#include <string.h>
13658
Christian Heimes2c181612007-12-17 20:04:13 +000013659#ifdef HAVE_SYS_TYPES_H
13660#include <sys/types.h>
13661#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013662
13663#ifdef HAVE_SSIZE_T
13664typedef ssize_t Py_ssize_t;
13665#elif SIZEOF_VOID_P == SIZEOF_LONG
13666typedef long Py_ssize_t;
13667#else
13668typedef int Py_ssize_t;
13669#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013670
Christian Heimes2c181612007-12-17 20:04:13 +000013671int main()
13672{
13673 char buffer[256];
13674
Thomas Wouters477c8d52006-05-27 19:21:47 +000013675 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13676 return 1;
13677
Thomas Wouters89f507f2006-12-13 04:49:30 +000013678 if (strcmp(buffer, "123"))
13679 return 1;
13680
13681 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13682 return 1;
13683
13684 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013685 return 1;
13686
13687 return 0;
13688}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013689
Thomas Wouters477c8d52006-05-27 19:21:47 +000013690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013691if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013692 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013693else
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013698fi
13699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13702$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013703if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013706
13707fi
13708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013710#ifdef HAVE_SYS_TYPES_H
13711#include <sys/types.h>
13712#endif
13713#ifdef HAVE_SYS_SOCKET_H
13714#include <sys/socket.h>
13715#endif
13716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013718if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013719
Martin v. Löwis11437992002-04-12 09:54:03 +000013720else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013723
13724fi
13725
Michael W. Hudson54241132001-12-07 15:38:26 +000013726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13728$as_echo_n "checking for broken mbstowcs... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013729if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013731else
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013733 ac_cv_broken_mbstowcs=no
13734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013736/* end confdefs.h. */
13737
13738#include<stdlib.h>
13739int main() {
13740 size_t len = -1;
13741 const char *str = "text";
13742 len = mbstowcs(NULL, str, 0);
13743 return (len != 4);
13744}
13745
13746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013747if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013748 ac_cv_broken_mbstowcs=no
13749else
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013754fi
13755
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013756fi
13757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13759$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013760if test "$ac_cv_broken_mbstowcs" = yes
13761then
13762
Matthias Kloseb9621712010-04-24 17:59:49 +000013763$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013764
13765fi
13766
Antoine Pitrou042b1282010-08-13 21:15:58 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13768$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013769if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013770 $as_echo_n "(cached) " >&6
13771else
13772 if test "$cross_compiling" = yes; then :
13773 ac_cv_computed_gotos=no
13774else
13775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776/* end confdefs.h. */
13777
13778int main(int argc, char **argv)
13779{
13780 static void *targets[1] = { &&LABEL1 };
13781 goto LABEL2;
13782LABEL1:
13783 return 0;
13784LABEL2:
13785 goto *targets[0];
13786 return 1;
13787}
13788
13789_ACEOF
13790if ac_fn_c_try_run "$LINENO"; then :
13791 ac_cv_computed_gotos=yes
13792else
13793 ac_cv_computed_gotos=no
13794fi
13795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13796 conftest.$ac_objext conftest.beam conftest.$ac_ext
13797fi
13798
13799fi
13800
13801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13802$as_echo "$ac_cv_computed_gotos" >&6; }
13803if test "$ac_cv_computed_gotos" = yes
13804then
13805
13806$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13807
13808fi
13809
Antoine Pitroub52ec782009-01-25 16:34:23 +000013810# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13812$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013813
13814# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013815if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013816 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013817if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013818then
13819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013821
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13823$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013824fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013825if test "$withval" = no
13826then
13827
13828$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13829
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13831$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013832fi
13833
Antoine Pitrou042b1282010-08-13 21:15:58 +000013834else
13835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13836$as_echo "no value specified" >&6; }
13837fi
13838
Antoine Pitroub52ec782009-01-25 16:34:23 +000013839
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013840case $ac_sys_system in
13841AIX*)
13842
13843$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13844 ;;
13845esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013846
Michael W. Hudson54241132001-12-07 15:38:26 +000013847
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013848
13849
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013850for h in `(cd $srcdir;echo Python/thread_*.h)`
13851do
13852 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13853done
13854
Michael W. Hudson54241132001-12-07 15:38:26 +000013855
Neal Norwitzd24499d2005-12-18 21:36:39 +000013856SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13858$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013859for dir in $SRCDIRS; do
13860 if test ! -d $dir; then
13861 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013862 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013863done
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13865$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013866
Guido van Rossum627b2d71993-12-24 10:39:16 +000013867# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013868ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013869
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013870ac_config_files="$ac_config_files Modules/ld_so_aix"
13871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013873# This file is a shell script that caches the results of configure
13874# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013875# scripts and configure runs, see configure's option --config-cache.
13876# It is not useful on other systems. If it contains results you don't
13877# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013878#
Martin v. Löwis11437992002-04-12 09:54:03 +000013879# config.status only pays attention to the cache file if you give it
13880# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881#
Skip Montanaro6dead952003-09-25 14:50:04 +000013882# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013883# loading this file, other *unset* `ac_cv_foo' will be assigned the
13884# following values.
13885
13886_ACEOF
13887
Guido van Rossumf78abae1997-01-21 22:02:36 +000013888# The following way of writing the cache mishandles newlines in values,
13889# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013891# Ultrix sh set writes to stderr and can't be redirected directly,
13892# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893(
13894 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13895 eval ac_val=\$$ac_var
13896 case $ac_val in #(
13897 *${as_nl}*)
13898 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13900$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901 esac
13902 case $ac_var in #(
13903 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13905 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906 esac ;;
13907 esac
13908 done
13909
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13912 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 # `set' does not quote correctly, so add quotes: double-quote
13914 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013916 "s/'/'\\\\''/g;
13917 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 *)
13920 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923 esac |
13924 sort
13925) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13931 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13933 :end' >>confcache
13934if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13935 if test -w "$cache_file"; then
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013936 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13938$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013939 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013940 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13942$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013943 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013944fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013945rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013946
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013947test "x$prefix" = xNONE && prefix=$ac_default_prefix
13948# Let make expand exec_prefix.
13949test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013950
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013951DEFS=-DHAVE_CONFIG_H
13952
Skip Montanaro6dead952003-09-25 14:50:04 +000013953ac_libobjs=
13954ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013955U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013956for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13957 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13961 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13963 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013964done
13965LIBOBJS=$ac_libobjs
13966
13967LTLIBOBJS=$ac_ltlibobjs
13968
13969
Martin v. Löwis11437992002-04-12 09:54:03 +000013970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020013972: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013973ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013974ac_clean_files_save=$ac_clean_files
13975ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013976{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13977$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13978as_write_fail=0
13979cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013980#! $SHELL
13981# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013982# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013983# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013984# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013985
Martin v. Löwis11437992002-04-12 09:54:03 +000013986debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013987ac_cs_recheck=false
13988ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990SHELL=\${CONFIG_SHELL-$SHELL}
13991export SHELL
13992_ASEOF
13993cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13994## -------------------- ##
13995## M4sh Initialization. ##
13996## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998# Be more Bourne compatible
13999DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014000if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 emulate sh
14002 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014004 # is contrary to our usage. Disable this feature.
14005 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014006 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014007else
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 case `(set -o) 2>/dev/null` in #(
14009 *posix*) :
14010 set -o posix ;; #(
14011 *) :
14012 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014013esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014014fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014015
14016
Matthias Kloseb9621712010-04-24 17:59:49 +000014017as_nl='
14018'
14019export as_nl
14020# Printing a long string crashes Solaris 7 /usr/bin/printf.
14021as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14022as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14023as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14024# Prefer a ksh shell builtin over an external printf program on Solaris,
14025# but without wasting forks for bash or zsh.
14026if test -z "$BASH_VERSION$ZSH_VERSION" \
14027 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14028 as_echo='print -r --'
14029 as_echo_n='print -rn --'
14030elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14031 as_echo='printf %s\n'
14032 as_echo_n='printf %s'
14033else
14034 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14035 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14036 as_echo_n='/usr/ucb/echo -n'
14037 else
14038 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14039 as_echo_n_body='eval
14040 arg=$1;
14041 case $arg in #(
14042 *"$as_nl"*)
14043 expr "X$arg" : "X\\(.*\\)$as_nl";
14044 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14045 esac;
14046 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14047 '
14048 export as_echo_n_body
14049 as_echo_n='sh -c $as_echo_n_body as_echo'
14050 fi
14051 export as_echo_body
14052 as_echo='sh -c $as_echo_body as_echo'
14053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014054
14055# The user is always right.
14056if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014057 PATH_SEPARATOR=:
14058 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14059 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14060 PATH_SEPARATOR=';'
14061 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064
14065# IFS
14066# We need space, tab and new line, in precisely that order. Quoting is
14067# there to prevent editors from complaining about space-tab.
14068# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14069# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014070IFS=" "" $as_nl"
14071
14072# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014073case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074 *[\\/]* ) as_myself=$0 ;;
14075 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014076for as_dir in $PATH
14077do
14078 IFS=$as_save_IFS
14079 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14081 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084 ;;
14085esac
14086# We did not find ourselves, most probably we were run as `sh COMMAND'
14087# in which case we are not to be found in the path.
14088if test "x$as_myself" = x; then
14089 as_myself=$0
14090fi
14091if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14093 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094fi
14095
Matthias Kloseb9621712010-04-24 17:59:49 +000014096# Unset variables that we do not need and which cause bugs (e.g. in
14097# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14098# suppresses any "Segmentation fault" message there. '((' could
14099# trigger a bug in pdksh 5.2.14.
14100for as_var in BASH_ENV ENV MAIL MAILPATH
14101do eval test x\${$as_var+set} = xset \
14102 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103done
14104PS1='$ '
14105PS2='> '
14106PS4='+ '
14107
14108# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014109LC_ALL=C
14110export LC_ALL
14111LANGUAGE=C
14112export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114# CDPATH.
14115(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14116
14117
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014118# as_fn_error STATUS ERROR [LINENO LOG_FD]
14119# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014120# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14121# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014122# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014123as_fn_error ()
14124{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014125 as_status=$1; test $as_status -eq 0 && as_status=1
14126 if test "$4"; then
14127 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14128 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014129 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014130 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 as_fn_exit $as_status
14132} # as_fn_error
14133
14134
14135# as_fn_set_status STATUS
14136# -----------------------
14137# Set $? to STATUS, without forking.
14138as_fn_set_status ()
14139{
14140 return $1
14141} # as_fn_set_status
14142
14143# as_fn_exit STATUS
14144# -----------------
14145# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14146as_fn_exit ()
14147{
14148 set +e
14149 as_fn_set_status $1
14150 exit $1
14151} # as_fn_exit
14152
14153# as_fn_unset VAR
14154# ---------------
14155# Portably unset VAR.
14156as_fn_unset ()
14157{
14158 { eval $1=; unset $1;}
14159}
14160as_unset=as_fn_unset
14161# as_fn_append VAR VALUE
14162# ----------------------
14163# Append the text in VALUE to the end of the definition contained in VAR. Take
14164# advantage of any shell optimizations that allow amortized linear growth over
14165# repeated appends, instead of the typical quadratic growth present in naive
14166# implementations.
14167if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14168 eval 'as_fn_append ()
14169 {
14170 eval $1+=\$2
14171 }'
14172else
14173 as_fn_append ()
14174 {
14175 eval $1=\$$1\$2
14176 }
14177fi # as_fn_append
14178
14179# as_fn_arith ARG...
14180# ------------------
14181# Perform arithmetic evaluation on the ARGs, and store the result in the
14182# global $as_val. Take advantage of shells that can avoid forks. The arguments
14183# must be portable across $(()) and expr.
14184if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14185 eval 'as_fn_arith ()
14186 {
14187 as_val=$(( $* ))
14188 }'
14189else
14190 as_fn_arith ()
14191 {
14192 as_val=`expr "$@" || test $? -eq 1`
14193 }
14194fi # as_fn_arith
14195
14196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197if expr a : '\(a\)' >/dev/null 2>&1 &&
14198 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14199 as_expr=expr
14200else
14201 as_expr=false
14202fi
14203
14204if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14205 as_basename=basename
14206else
14207 as_basename=false
14208fi
14209
Matthias Kloseb9621712010-04-24 17:59:49 +000014210if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14211 as_dirname=dirname
14212else
14213 as_dirname=false
14214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216as_me=`$as_basename -- "$0" ||
14217$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14218 X"$0" : 'X\(//\)$' \| \
14219 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014220$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221 sed '/^.*\/\([^/][^/]*\)\/*$/{
14222 s//\1/
14223 q
14224 }
14225 /^X\/\(\/\/\)$/{
14226 s//\1/
14227 q
14228 }
14229 /^X\/\(\/\).*/{
14230 s//\1/
14231 q
14232 }
14233 s/.*/./; q'`
14234
Matthias Kloseb9621712010-04-24 17:59:49 +000014235# Avoid depending upon Character Ranges.
14236as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14237as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14238as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14239as_cr_digits='0123456789'
14240as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241
14242ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014243case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 xy) ECHO_C='\c';;
14248 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14249 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250 esac;;
14251*)
14252 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014254
Martin v. Löwis11437992002-04-12 09:54:03 +000014255rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014256if test -d conf$$.dir; then
14257 rm -f conf$$.dir/conf$$.file
14258else
14259 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014260 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014262if (echo >conf$$.file) 2>/dev/null; then
14263 if ln -s conf$$.file conf$$ 2>/dev/null; then
14264 as_ln_s='ln -s'
14265 # ... but there are two gotchas:
14266 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14267 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14268 # In both cases, we have to default to `cp -p'.
14269 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14270 as_ln_s='cp -p'
14271 elif ln conf$$.file conf$$ 2>/dev/null; then
14272 as_ln_s=ln
14273 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014274 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014276else
14277 as_ln_s='cp -p'
14278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14280rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
Matthias Kloseb9621712010-04-24 17:59:49 +000014282
14283# as_fn_mkdir_p
14284# -------------
14285# Create "$as_dir" as a directory, including parents if necessary.
14286as_fn_mkdir_p ()
14287{
14288
14289 case $as_dir in #(
14290 -*) as_dir=./$as_dir;;
14291 esac
14292 test -d "$as_dir" || eval $as_mkdir_p || {
14293 as_dirs=
14294 while :; do
14295 case $as_dir in #(
14296 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14297 *) as_qdir=$as_dir;;
14298 esac
14299 as_dirs="'$as_qdir' $as_dirs"
14300 as_dir=`$as_dirname -- "$as_dir" ||
14301$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14302 X"$as_dir" : 'X\(//\)[^/]' \| \
14303 X"$as_dir" : 'X\(//\)$' \| \
14304 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14305$as_echo X"$as_dir" |
14306 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14307 s//\1/
14308 q
14309 }
14310 /^X\(\/\/\)[^/].*/{
14311 s//\1/
14312 q
14313 }
14314 /^X\(\/\/\)$/{
14315 s//\1/
14316 q
14317 }
14318 /^X\(\/\).*/{
14319 s//\1/
14320 q
14321 }
14322 s/.*/./; q'`
14323 test -d "$as_dir" && break
14324 done
14325 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014326 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014327
14328
14329} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014330if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014332else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014333 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014334 as_mkdir_p=false
14335fi
14336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337if test -x / >/dev/null 2>&1; then
14338 as_test_x='test -x'
14339else
14340 if ls -dL / >/dev/null 2>&1; then
14341 as_ls_L_option=L
14342 else
14343 as_ls_L_option=
14344 fi
14345 as_test_x='
14346 eval sh -c '\''
14347 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 case $1 in #(
14351 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354 ???[sx]*):;;*)false;;esac;fi
14355 '\'' sh
14356 '
14357fi
14358as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014359
14360# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014361as_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 +000014362
14363# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014364as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014365
14366
Martin v. Löwis11437992002-04-12 09:54:03 +000014367exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014368## ----------------------------------- ##
14369## Main body of $CONFIG_STATUS script. ##
14370## ----------------------------------- ##
14371_ASEOF
14372test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14375# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014376# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014377# values after options handling.
14378ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014379This file was extended by python $as_me 3.3, which was
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014380generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
14382 CONFIG_FILES = $CONFIG_FILES
14383 CONFIG_HEADERS = $CONFIG_HEADERS
14384 CONFIG_LINKS = $CONFIG_LINKS
14385 CONFIG_COMMANDS = $CONFIG_COMMANDS
14386 $ $0 $@
14387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014388on `(hostname || uname -n) 2>/dev/null | sed 1q`
14389"
14390
Martin v. Löwis11437992002-04-12 09:54:03 +000014391_ACEOF
14392
Matthias Kloseb9621712010-04-24 17:59:49 +000014393case $ac_config_files in *"
14394"*) set x $ac_config_files; shift; ac_config_files=$*;;
14395esac
14396
14397case $ac_config_headers in *"
14398"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14399esac
14400
14401
14402cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014403# Files that config.status was made for.
Benjamin Peterson94b580d2011-08-02 17:30:04 -050014404config_files="$ac_config_files"
14405config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014410ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014411\`$as_me' instantiates files and other configuration actions
14412from templates according to the current configuration. Unless the files
14413and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014416
14417 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 --config print configuration, then exit
14420 -q, --quiet, --silent
14421 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 -d, --debug don't remove temporary files
14423 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 --file=FILE[:TEMPLATE]
14425 instantiate the configuration file FILE
14426 --header=FILE[:TEMPLATE]
14427 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014428
14429Configuration files:
14430$config_files
14431
14432Configuration headers:
14433$config_headers
14434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014438cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14439ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014440ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014441python config.status 3.3
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014442configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014444
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014445Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014446This config.status script is free software; the Free Software Foundation
14447gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448
14449ac_pwd='$ac_pwd'
14450srcdir='$srcdir'
14451INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014452test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014453_ACEOF
14454
Matthias Kloseb9621712010-04-24 17:59:49 +000014455cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14456# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014457ac_need_defaults=:
14458while test $# != 0
14459do
14460 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014461 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14463 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014464 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014466 --*=)
14467 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14468 ac_optarg=
14469 ac_shift=:
14470 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014472 ac_option=$1
14473 ac_optarg=$2
14474 ac_shift=shift
14475 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 esac
14477
Skip Montanaro6dead952003-09-25 14:50:04 +000014478 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014479 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014480 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14481 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014483 $as_echo "$ac_cs_version"; exit ;;
14484 --config | --confi | --conf | --con | --co | --c )
14485 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014486 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 debug=: ;;
14488 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014489 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 case $ac_optarg in
14491 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014492 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 esac
14494 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 ac_need_defaults=false;;
14496 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014497 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 case $ac_optarg in
14499 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14500 esac
14501 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503 --he | --h)
14504 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014505 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014506Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14510 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14511 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014512
14513 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014514 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014515Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
14520 esac
14521 shift
14522done
14523
Skip Montanaro6dead952003-09-25 14:50:04 +000014524ac_configure_extra_args=
14525
14526if $ac_cs_silent; then
14527 exec 6>/dev/null
14528 ac_configure_extra_args="$ac_configure_extra_args --silent"
14529fi
14530
14531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014532cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014533if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14535 shift
14536 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14537 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014539 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014540fi
14541
Martin v. Löwis11437992002-04-12 09:54:03 +000014542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014543cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544exec 5>>config.log
14545{
14546 echo
14547 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14548## Running $as_me. ##
14549_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014551} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014556
Matthias Kloseb9621712010-04-24 17:59:49 +000014557cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558
14559# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014560for ac_config_target in $ac_config_targets
14561do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562 case $ac_config_target in
14563 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14564 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14565 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014566 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14567 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14569 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014570 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014571 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014573 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 esac
14575done
14576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577
Martin v. Löwis11437992002-04-12 09:54:03 +000014578# If the user did not use the arguments to specify the items to instantiate,
14579# then the envvar interface is used. Set only those that are not.
14580# We use the long form for the default assignment because of an extremely
14581# bizarre bug on SunOS 4.1.3.
14582if $ac_need_defaults; then
14583 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14584 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14585fi
14586
Skip Montanaro6dead952003-09-25 14:50:04 +000014587# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014589# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590# Hook for its removal unless debugging.
14591# Note that there is a small window in which the directory will not be cleaned:
14592# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014593$debug ||
14594{
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014595 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596 trap 'exit_status=$?
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014597 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014600}
Martin v. Löwis11437992002-04-12 09:54:03 +000014601# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014602
Martin v. Löwis11437992002-04-12 09:54:03 +000014603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014604 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014605 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014606} ||
14607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608 tmp=./conf$$-$RANDOM
14609 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014610} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
Matthias Kloseb9621712010-04-24 17:59:49 +000014612# Set up the scripts for CONFIG_FILES section.
14613# No need to generate them if there are no CONFIG_FILES.
14614# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014616
Matthias Kloseb9621712010-04-24 17:59:49 +000014617
14618ac_cr=`echo X | tr X '\015'`
14619# On cygwin, bash can eat \r inside `` if the user requested igncr.
14620# But we know of no other shell where ac_cr would be empty at this
14621# point, so we can use a bashism as a fallback.
14622if test "x$ac_cr" = x; then
14623 eval ac_cr=\$\'\\r\'
14624fi
14625ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14626if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014627 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014628else
14629 ac_cs_awk_cr=$ac_cr
14630fi
14631
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014632echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014633_ACEOF
14634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636{
14637 echo "cat >conf$$subs.awk <<_ACEOF" &&
14638 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14639 echo "_ACEOF"
14640} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014641 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14642ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643ac_delim='%!_!# '
14644for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014646 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647
Matthias Kloseb9621712010-04-24 17:59:49 +000014648 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14649 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650 break
14651 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014652 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653 else
14654 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656done
Matthias Kloseb9621712010-04-24 17:59:49 +000014657rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658
Matthias Kloseb9621712010-04-24 17:59:49 +000014659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014660cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014662sed -n '
14663h
14664s/^/S["/; s/!.*/"]=/
14665p
14666g
14667s/^[^!]*!//
14668:repl
14669t repl
14670s/'"$ac_delim"'$//
14671t delim
14672:nl
14673h
14674s/\(.\{148\}\)..*/\1/
14675t more1
14676s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14677p
14678n
14679b repl
14680:more1
14681s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14682p
14683g
14684s/.\{148\}//
14685t nl
14686:delim
14687h
14688s/\(.\{148\}\)..*/\1/
14689t more2
14690s/["\\]/\\&/g; s/^/"/; s/$/"/
14691p
14692b
14693:more2
14694s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14695p
14696g
14697s/.\{148\}//
14698t delim
14699' <conf$$subs.awk | sed '
14700/^[^""]/{
14701 N
14702 s/\n//
14703}
14704' >>$CONFIG_STATUS || ac_write_fail=1
14705rm -f conf$$subs.awk
14706cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14707_ACAWK
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014708cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 for (key in S) S_is_set[key] = 1
14710 FS = ""
14711
14712}
14713{
14714 line = $ 0
14715 nfields = split(line, field, "@")
14716 substed = 0
14717 len = length(field[1])
14718 for (i = 2; i < nfields; i++) {
14719 key = field[i]
14720 keylen = length(key)
14721 if (S_is_set[key]) {
14722 value = S[key]
14723 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14724 len += length(value) + length(field[++i])
14725 substed = 1
14726 } else
14727 len += 1 + keylen
14728 }
14729
14730 print line
14731}
14732
14733_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14736if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14737 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14738else
14739 cat
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014740fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014741 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014742_ACEOF
14743
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014744# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14745# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746# trailing colons and then remove the whole line if VPATH becomes empty
14747# (actually we leave an empty line to preserve line numbers).
14748if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014749 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14750h
14751s///
14752s/^/:/
14753s/[ ]*$/:/
14754s/:\$(srcdir):/:/g
14755s/:\${srcdir}:/:/g
14756s/:@srcdir@:/:/g
14757s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014758s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014759x
14760s/\(=[ ]*\).*/\1/
14761G
14762s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763s/^[^=]*=[ ]*$//
14764}'
14765fi
14766
Matthias Kloseb9621712010-04-24 17:59:49 +000014767cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014768fi # test -n "$CONFIG_FILES"
14769
Matthias Kloseb9621712010-04-24 17:59:49 +000014770# Set up the scripts for CONFIG_HEADERS section.
14771# No need to generate them if there are no CONFIG_HEADERS.
14772# This happens for instance with `./config.status Makefile'.
14773if test -n "$CONFIG_HEADERS"; then
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014774cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014775BEGIN {
14776_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777
Matthias Kloseb9621712010-04-24 17:59:49 +000014778# Transform confdefs.h into an awk script `defines.awk', embedded as
14779# here-document in config.status, that substitutes the proper values into
14780# config.h.in to produce config.h.
14781
14782# Create a delimiter string that does not exist in confdefs.h, to ease
14783# handling of long lines.
14784ac_delim='%!_!# '
14785for ac_last_try in false false :; do
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014786 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14787 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 break
14789 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014790 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 else
14792 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14793 fi
14794done
14795
14796# For the awk script, D is an array of macro values keyed by name,
14797# likewise P contains macro parameters if any. Preserve backslash
14798# newline sequences.
14799
14800ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14801sed -n '
14802s/.\{148\}/&'"$ac_delim"'/g
14803t rset
14804:rset
14805s/^[ ]*#[ ]*define[ ][ ]*/ /
14806t def
14807d
14808:def
14809s/\\$//
14810t bsnl
14811s/["\\]/\\&/g
14812s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14813D["\1"]=" \3"/p
14814s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14815d
14816:bsnl
14817s/["\\]/\\&/g
14818s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14819D["\1"]=" \3\\\\\\n"\\/p
14820t cont
14821s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14822t cont
14823d
14824:cont
14825n
14826s/.\{148\}/&'"$ac_delim"'/g
14827t clear
14828:clear
14829s/\\$//
14830t bsnlc
14831s/["\\]/\\&/g; s/^/"/; s/$/"/p
14832d
14833:bsnlc
14834s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14835b cont
14836' <confdefs.h | sed '
14837s/'"$ac_delim"'/"\\\
14838"/g' >>$CONFIG_STATUS || ac_write_fail=1
14839
14840cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14841 for (key in D) D_is_set[key] = 1
14842 FS = ""
14843}
14844/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14845 line = \$ 0
14846 split(line, arg, " ")
14847 if (arg[1] == "#") {
14848 defundef = arg[2]
14849 mac1 = arg[3]
14850 } else {
14851 defundef = substr(arg[1], 2)
14852 mac1 = arg[2]
14853 }
14854 split(mac1, mac2, "(") #)
14855 macro = mac2[1]
14856 prefix = substr(line, 1, index(line, defundef) - 1)
14857 if (D_is_set[macro]) {
14858 # Preserve the white space surrounding the "#".
14859 print prefix "define", macro P[macro] D[macro]
14860 next
14861 } else {
14862 # Replace #undef with comments. This is necessary, for example,
14863 # in the case of _POSIX_SOURCE, which is predefined and required
14864 # on some systems where configure will not decide to define it.
14865 if (defundef == "undef") {
14866 print "/*", prefix defundef, macro, "*/"
14867 next
14868 }
14869 }
14870}
14871{ print }
14872_ACAWK
14873_ACEOF
14874cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014875 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014876fi # test -n "$CONFIG_HEADERS"
14877
14878
14879eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14880shift
14881for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882do
14883 case $ac_tag in
14884 :[FHLC]) ac_mode=$ac_tag; continue;;
14885 esac
14886 case $ac_mode$ac_tag in
14887 :[FHL]*:*);;
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014888 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 :[FH]-) ac_tag=-:-;;
14890 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14891 esac
14892 ac_save_IFS=$IFS
14893 IFS=:
14894 set x $ac_tag
14895 IFS=$ac_save_IFS
14896 shift
14897 ac_file=$1
14898 shift
14899
14900 case $ac_mode in
14901 :L) ac_source=$1;;
14902 :[FH])
14903 ac_file_inputs=
14904 for ac_f
14905 do
14906 case $ac_f in
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014907 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908 *) # Look for the file first in the build tree, then in the source tree
14909 # (if the path is not absolute). The absolute path cannot be DOS-style,
14910 # because $ac_f cannot contain `:'.
14911 test -f "$ac_f" ||
14912 case $ac_f in
14913 [\\/$]*) false;;
14914 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14915 esac ||
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014916 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14919 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920 done
14921
14922 # Let's still pretend it is `configure' which instantiates (i.e., don't
14923 # use $as_me), people would be surprised to read:
14924 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 configure_input='Generated from '`
14926 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14927 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928 if test x"$ac_file" != x-; then
14929 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14931$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 # Neutralize special characters interpreted by sed in replacement strings.
14934 case $configure_input in #(
14935 *\&* | *\|* | *\\* )
14936 ac_sed_conf_input=`$as_echo "$configure_input" |
14937 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14938 *) ac_sed_conf_input=$configure_input;;
14939 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940
14941 case $ac_tag in
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020014942 *:-:* | *:-) cat >"$tmp/stdin" \
14943 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944 esac
14945 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 esac
14947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014949$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014950 X"$ac_file" : 'X\(//\)[^/]' \| \
14951 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014953$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14955 s//\1/
14956 q
14957 }
14958 /^X\(\/\/\)[^/].*/{
14959 s//\1/
14960 q
14961 }
14962 /^X\(\/\/\)$/{
14963 s//\1/
14964 q
14965 }
14966 /^X\(\/\).*/{
14967 s//\1/
14968 q
14969 }
14970 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ac_builddir=.
14973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974case "$ac_dir" in
14975.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14976*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980 case $ac_top_builddir_sub in
14981 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14982 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14983 esac ;;
14984esac
14985ac_abs_top_builddir=$ac_pwd
14986ac_abs_builddir=$ac_pwd$ac_dir_suffix
14987# for backward compatibility:
14988ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014989
14990case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993 ac_top_srcdir=$ac_top_builddir_sub
14994 ac_abs_top_srcdir=$ac_pwd ;;
14995 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997 ac_top_srcdir=$srcdir
14998 ac_abs_top_srcdir=$srcdir ;;
14999 *) # Relative name.
15000 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15001 ac_top_srcdir=$ac_top_build_prefix$srcdir
15002 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015003esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015005
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007 case $ac_mode in
15008 :F)
15009 #
15010 # CONFIG_FILE
15011 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015012
15013 case $INSTALL in
15014 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015017_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020# If the template does not know about datarootdir, expand it.
15021# FIXME: This hack should be removed a few years after 2.60.
15022ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015023ac_sed_dataroot='
15024/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025 p
15026 q
15027}
15028/@datadir@/p
15029/@docdir@/p
15030/@infodir@/p
15031/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015032/@mandir@/p'
15033case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034*datarootdir*) ac_datarootdir_seen=yes;;
15035*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15037$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040 ac_datarootdir_hack='
15041 s&@datadir@&$datadir&g
15042 s&@docdir@&$docdir&g
15043 s&@infodir@&$infodir&g
15044 s&@localedir@&$localedir&g
15045 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047esac
15048_ACEOF
15049
15050# Neutralize VPATH when `$srcdir' = `.'.
15051# Shell code in configure.ac might set extrasub.
15052# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015053cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15054ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015055$extrasub
15056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015057cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015058:t
15059/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015060s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015062s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015063s&@srcdir@&$ac_srcdir&;t t
15064s&@abs_srcdir@&$ac_abs_srcdir&;t t
15065s&@top_srcdir@&$ac_top_srcdir&;t t
15066s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15067s&@builddir@&$ac_builddir&;t t
15068s&@abs_builddir@&$ac_abs_builddir&;t t
15069s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15070s&@INSTALL@&$ac_INSTALL&;t t
15071$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015072"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015073eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15074 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015077 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15078 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015080which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015081$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015082which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015083
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015084 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 case $ac_file in
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015086 -) cat "$tmp/out" && rm -f "$tmp/out";;
15087 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015089 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090 ;;
15091 :H)
15092 #
15093 # CONFIG_HEADER
15094 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 {
15097 $as_echo "/* $configure_input */" \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015098 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15099 } >"$tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015100 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015101 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15103$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015105 rm -f "$ac_file"
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015106 mv "$tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015107 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 fi
15109 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015110 $as_echo "/* $configure_input */" \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020015111 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015112 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116
15117 esac
15118
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015119
15120 case $ac_file$ac_mode in
15121 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15122
15123 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124done # for ac_tag
15125
Guido van Rossum627b2d71993-12-24 10:39:16 +000015126
Matthias Kloseb9621712010-04-24 17:59:49 +000015127as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015128_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015129ac_clean_files=$ac_clean_files_save
15130
Matthias Kloseb9621712010-04-24 17:59:49 +000015131test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015132 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015133
Martin v. Löwis11437992002-04-12 09:54:03 +000015134
15135# configure is writing to config.log, and then calls config.status.
15136# config.status does its own redirection, appending to config.log.
15137# Unfortunately, on DOS this fails, as config.log is still kept open
15138# by configure, so config.status won't be able to write to it; its
15139# output is simply discarded. So we exec the FD to /dev/null,
15140# effectively closing config.log, so it can be properly (re)opened and
15141# appended to by config.status. When coming back to configure, we
15142# need to make the FD available again.
15143if test "$no_create" != yes; then
15144 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015145 ac_config_status_args=
15146 test "$silent" = yes &&
15147 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015149 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015150 exec 5>>config.log
15151 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15152 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015153 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015154fi
15155if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15157$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015158fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015159
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015160
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015161echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015162if test ! -f Modules/Setup
15163then
15164 cp $srcdir/Modules/Setup.dist Modules/Setup
15165fi
15166
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015167echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015168if test ! -f Modules/Setup.local
15169then
15170 echo "# Edit this file for local setup changes" >Modules/Setup.local
15171fi
15172
15173echo "creating Makefile"
15174$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15175 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015176 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015177mv config.c Modules