blob: b5788dc40f70cbefc224e5684ff5a8687afe02d6 [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 Natali47413c12011-10-06 19:47:44 +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 Natali47413c12011-10-06 19:47:44 +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
Matthias Kloseb9621712010-04-24 17:59:49 +0000762with_computed_gotos
763'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000764 ac_precious_vars='build_alias
765host_alias
766target_alias
767CC
768CFLAGS
769LDFLAGS
770LIBS
771CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200772CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773
Guido van Rossum627b2d71993-12-24 10:39:16 +0000774
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000776ac_init_help=
777ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000778ac_unrecognized_opts=
779ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780# The variables have the same names as the options, with
781# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785no_recursion=
786prefix=NONE
787program_prefix=NONE
788program_suffix=NONE
789program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794x_includes=NONE
795x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000796
797# Installation directory options.
798# These are left unexpanded so users can "make install exec_prefix=/foo"
799# and all the variables that are supposed to be based on exec_prefix
800# by default will actually change.
801# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803bindir='${exec_prefix}/bin'
804sbindir='${exec_prefix}/sbin'
805libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806datarootdir='${prefix}/share'
807datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808sysconfdir='${prefix}/etc'
809sharedstatedir='${prefix}/com'
810localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811includedir='${prefix}/include'
812oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
814infodir='${datarootdir}/info'
815htmldir='${docdir}'
816dvidir='${docdir}'
817pdfdir='${docdir}'
818psdir='${docdir}'
819libdir='${exec_prefix}/lib'
820localedir='${datarootdir}/locale'
821mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827 # If the previous option needs an argument, assign it.
828 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830 ac_prev=
831 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000832 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200835 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
836 *=) ac_optarg= ;;
837 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840 # Accept the important Cygnus configure options, so we can diagnose typos.
841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 case $ac_dashdash$ac_option in
843 --)
844 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846 -bindir | --bindir | --bindi | --bind | --bin | --bi)
847 ac_prev=bindir ;;
848 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850
851 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856 -cache-file | --cache-file | --cache-fil | --cache-fi \
857 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
858 ac_prev=cache_file ;;
859 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
860 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 cache_file=$ac_optarg ;;
862
863 --config-cache | -C)
864 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
872 | --dataroo | --dataro | --datar)
873 ac_prev=datarootdir ;;
874 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
875 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
876 datarootdir=$ac_optarg ;;
877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000879 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000881 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200882 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000883 ac_useropt_orig=$ac_useropt
884 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
885 case $ac_user_opts in
886 *"
887"enable_$ac_useropt"
888"*) ;;
889 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
890 ac_unrecognized_sep=', ';;
891 esac
892 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893
894 -docdir | --docdir | --docdi | --doc | --do)
895 ac_prev=docdir ;;
896 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
897 docdir=$ac_optarg ;;
898
899 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
900 ac_prev=dvidir ;;
901 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
902 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
904 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000907 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200908 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000909 ac_useropt_orig=$ac_useropt
910 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
911 case $ac_user_opts in
912 *"
913"enable_$ac_useropt"
914"*) ;;
915 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
916 ac_unrecognized_sep=', ';;
917 esac
918 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
921 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
922 | --exec | --exe | --ex)
923 ac_prev=exec_prefix ;;
924 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
925 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
926 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
929 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Obsolete; use --with-gas.
931 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 -help | --help | --hel | --he | -h)
934 ac_init_help=long ;;
935 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
936 ac_init_help=recursive ;;
937 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
938 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
940 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
946 ac_prev=htmldir ;;
947 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
948 | --ht=*)
949 htmldir=$ac_optarg ;;
950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 -includedir | --includedir | --includedi | --included | --include \
952 | --includ | --inclu | --incl | --inc)
953 ac_prev=includedir ;;
954 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
955 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -infodir | --infodir | --infodi | --infod | --info | --inf)
959 ac_prev=infodir ;;
960 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libdir | --libdir | --libdi | --libd)
964 ac_prev=libdir ;;
965 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
969 | --libexe | --libex | --libe)
970 ac_prev=libexecdir ;;
971 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
972 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 -localedir | --localedir | --localedi | --localed | --locale)
976 ac_prev=localedir ;;
977 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
978 localedir=$ac_optarg ;;
979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982 ac_prev=localstatedir ;;
983 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
988 ac_prev=mandir ;;
989 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Obsolete; use --without-fp.
994 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 no_create=yes ;;
999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1002 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1005 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1006 | --oldin | --oldi | --old | --ol | --o)
1007 ac_prev=oldincludedir ;;
1008 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1009 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1010 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1014 ac_prev=prefix ;;
1015 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1019 | --program-pre | --program-pr | --program-p)
1020 ac_prev=program_prefix ;;
1021 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1022 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1026 | --program-suf | --program-su | --program-s)
1027 ac_prev=program_suffix ;;
1028 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1029 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -program-transform-name | --program-transform-name \
1033 | --program-transform-nam | --program-transform-na \
1034 | --program-transform-n | --program-transform- \
1035 | --program-transform | --program-transfor \
1036 | --program-transfo | --program-transf \
1037 | --program-trans | --program-tran \
1038 | --progr-tra | --program-tr | --program-t)
1039 ac_prev=program_transform_name ;;
1040 -program-transform-name=* | --program-transform-name=* \
1041 | --program-transform-nam=* | --program-transform-na=* \
1042 | --program-transform-n=* | --program-transform-=* \
1043 | --program-transform=* | --program-transfor=* \
1044 | --program-transfo=* | --program-transf=* \
1045 | --program-trans=* | --program-tran=* \
1046 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1050 ac_prev=pdfdir ;;
1051 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1052 pdfdir=$ac_optarg ;;
1053
1054 -psdir | --psdir | --psdi | --psd | --ps)
1055 ac_prev=psdir ;;
1056 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1057 psdir=$ac_optarg ;;
1058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1060 | -silent | --silent | --silen | --sile | --sil)
1061 silent=yes ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1064 ac_prev=sbindir ;;
1065 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1066 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1070 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1071 | --sharedst | --shareds | --shared | --share | --shar \
1072 | --sha | --sh)
1073 ac_prev=sharedstatedir ;;
1074 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1075 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1076 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1077 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 -site | --site | --sit)
1081 ac_prev=site ;;
1082 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1086 ac_prev=srcdir ;;
1087 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1091 | --syscon | --sysco | --sysc | --sys | --sy)
1092 ac_prev=sysconfdir ;;
1093 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1094 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1103 verbose=yes ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 -version | --version | --versio | --versi | --vers | -V)
1106 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001109 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001111 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001112 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001113 ac_useropt_orig=$ac_useropt
1114 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115 case $ac_user_opts in
1116 *"
1117"with_$ac_useropt"
1118"*) ;;
1119 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1120 ac_unrecognized_sep=', ';;
1121 esac
1122 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
1124 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001126 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001127 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001128 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001129 ac_useropt_orig=$ac_useropt
1130 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131 case $ac_user_opts in
1132 *"
1133"with_$ac_useropt"
1134"*) ;;
1135 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1136 ac_unrecognized_sep=', ';;
1137 esac
1138 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 --x)
1141 # Obsolete; use --with-x.
1142 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1145 | --x-incl | --x-inc | --x-in | --x-i)
1146 ac_prev=x_includes ;;
1147 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1148 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1152 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1153 ac_prev=x_libraries ;;
1154 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1155 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001158 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1159Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 ;;
1161
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 *=*)
1163 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1164 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 case $ac_envvar in #(
1166 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001167 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001169 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 export $ac_envvar ;;
1171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Charles-François Natali47413c12011-10-06 19:47:44 +02001177 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 ;;
1179
1180 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181done
1182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001185 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186fi
1187
Matthias Kloseb9621712010-04-24 17:59:49 +00001188if test -n "$ac_unrecognized_opts"; then
1189 case $enable_option_checking in
1190 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001191 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1193 esac
1194fi
1195
1196# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001197for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1198 datadir sysconfdir sharedstatedir localstatedir includedir \
1199 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1200 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 # Remove trailing slashes.
1204 case $ac_val in
1205 */ )
1206 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1207 eval $ac_var=\$ac_val;;
1208 esac
1209 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 [\\/$]* | ?:[\\/]* ) continue;;
1212 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001215done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217# There might be people who depend on the old broken behavior: `$host'
1218# used to hold the argument of --host etc.
1219# FIXME: To remove some day.
1220build=$build_alias
1221host=$host_alias
1222target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224# FIXME: To remove some day.
1225if test "x$host_alias" != x; then
1226 if test "x$build_alias" = x; then
1227 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001228 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1229 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 elif test "x$build_alias" != "x$host_alias"; then
1231 cross_compiling=yes
1232 fi
1233fi
1234
1235ac_tool_prefix=
1236test -n "$host_alias" && ac_tool_prefix=$host_alias-
1237
1238test "$silent" = yes && exec 6>/dev/null
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241ac_pwd=`pwd` && test -n "$ac_pwd" &&
1242ac_ls_di=`ls -di .` &&
1243ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249# Find the source files, if location was not specified.
1250if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 ac_confdir=`$as_dirname -- "$as_myself" ||
1254$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1255 X"$as_myself" : 'X\(//\)[^/]' \| \
1256 X"$as_myself" : 'X\(//\)$' \| \
1257 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1258$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)[^/].*/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\).*/{
1272 s//\1/
1273 q
1274 }
1275 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278 srcdir=..
1279 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280else
1281 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283if test ! -r "$srcdir/$ac_unique_file"; then
1284 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001285 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1288ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 pwd)`
1291# When building in place, set srcdir=.
1292if test "$ac_abs_confdir" = "$ac_pwd"; then
1293 srcdir=.
1294fi
1295# Remove unnecessary trailing slashes from srcdir.
1296# Double slashes in file names in object file debugging info
1297# mess up M-x gdb in Emacs.
1298case $srcdir in
1299*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1300esac
1301for ac_var in $ac_precious_vars; do
1302 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1303 eval ac_env_${ac_var}_value=\$${ac_var}
1304 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1305 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1306done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308#
1309# Report the --help message.
1310#
1311if test "$ac_init_help" = "long"; then
1312 # Omit some internal or obsolete options to make the list less imposing.
1313 # This message is too long to be a string in the A/UX 3.1 sh.
1314 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001315\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001316
1317Usage: $0 [OPTION]... [VAR=VALUE]...
1318
1319To assign environment variables (e.g., CC, CFLAGS...), specify them as
1320VAR=VALUE. See below for descriptions of some of the useful variables.
1321
1322Defaults for the options are specified in brackets.
1323
1324Configuration:
1325 -h, --help display this help and exit
1326 --help=short display options specific to this package
1327 --help=recursive display the short help of all the included packages
1328 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --cache-file=FILE cache test results in FILE [disabled]
1331 -C, --config-cache alias for \`--cache-file=config.cache'
1332 -n, --no-create do not create output files
1333 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1334
Martin v. Löwis11437992002-04-12 09:54:03 +00001335Installation directories:
1336 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341By default, \`make install' will install all the files in
1342\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1343an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1344for instance \`--prefix=\$HOME'.
1345
1346For better control, use the options below.
1347
1348Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 --bindir=DIR user executables [EPREFIX/bin]
1350 --sbindir=DIR system admin executables [EPREFIX/sbin]
1351 --libexecdir=DIR program executables [EPREFIX/libexec]
1352 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1353 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1354 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1355 --libdir=DIR object code libraries [EPREFIX/lib]
1356 --includedir=DIR C header files [PREFIX/include]
1357 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1358 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1359 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1360 --infodir=DIR info documentation [DATAROOTDIR/info]
1361 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1362 --mandir=DIR man documentation [DATAROOTDIR/man]
1363 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1364 --htmldir=DIR html documentation [DOCDIR]
1365 --dvidir=DIR dvi documentation [DOCDIR]
1366 --pdfdir=DIR pdf documentation [DOCDIR]
1367 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001368_ACEOF
1369
1370 cat <<\_ACEOF
1371_ACEOF
1372fi
1373
1374if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001375 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001376 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001377 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 cat <<\_ACEOF
1379
1380Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001381 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1383 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001384 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001385 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001386 --enable-framework[=INSTALLDIR]
1387 Build (MacOSX|Darwin) framework
1388 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001389 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001390 --enable-loadable-sqlite-extensions
1391 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001392 --enable-ipv6 Enable ipv6 (with ipv4) support
1393 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001394 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397Optional Packages:
1398 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1399 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001400 --with-universal-archs=ARCH
1401 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001402 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001403 --with-framework-name=FRAMEWORK
1404 specify an alternate name of the framework built
1405 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001407 --with-cxx-main=<compiler>
1408 compile main() and link python executable with C++
1409 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --with-suffix=.exe set executable suffix
1411 --with-pydebug build with Py_DEBUG defined
1412 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001413 --with-system-expat build pyexpat module using an installed expat
1414 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001415 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001416 --with-dbmliborder=db1:db2:...
1417 order to check db backends for dbm. Valid value is a
1418 colon separated string with the backend names
1419 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with(out)-threads[=DIRECTORY]
1422 disable/enable thread support
1423 --with(out)-thread[=DIRECTORY]
1424 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001426 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001427 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001428 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-fpectl enable SIGFPE catching
1430 --with-libm=STRING math library
1431 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001432 --with(out)-computed-gotos
1433 Use computed gotos in evaluation loop (enabled by
1434 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436Some influential environment variables:
1437 CC C compiler command
1438 CFLAGS C compiler flags
1439 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1440 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 CPP C preprocessor
1445
1446Use these variables to override the choices made by `configure' or to help
1447it to find libraries and programs with nonstandard names/locations.
1448
Georg Brandle2e15612009-05-20 18:25:10 +00001449Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001452fi
1453
1454if test "$ac_init_help" = "recursive"; then
1455 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001456 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 test -d "$ac_dir" ||
1458 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1459 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001460 ac_builddir=.
1461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001462case "$ac_dir" in
1463.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1464*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001468 case $ac_top_builddir_sub in
1469 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1470 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1471 esac ;;
1472esac
1473ac_abs_top_builddir=$ac_pwd
1474ac_abs_builddir=$ac_pwd$ac_dir_suffix
1475# for backward compatibility:
1476ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001477
1478case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481 ac_top_srcdir=$ac_top_builddir_sub
1482 ac_abs_top_srcdir=$ac_pwd ;;
1483 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 ac_top_srcdir=$srcdir
1486 ac_abs_top_srcdir=$srcdir ;;
1487 *) # Relative name.
1488 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1489 ac_top_srcdir=$ac_top_build_prefix$srcdir
1490 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001491esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 cd "$ac_dir" || { ac_status=$?; continue; }
1495 # Check for guested configure.
1496 if test -f "$ac_srcdir/configure.gnu"; then
1497 echo &&
1498 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1499 elif test -f "$ac_srcdir/configure"; then
1500 echo &&
1501 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001502 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001503 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 fi || ac_status=$?
1505 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001506 done
1507fi
1508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001510if $ac_init_version; then
1511 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001512python configure 3.3
Charles-François Natali47413c12011-10-06 19:47:44 +02001513generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001514
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001515Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516This configure script is free software; the Free Software Foundation
1517gives unlimited permission to copy, distribute and modify it.
1518_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001521
1522## ------------------------ ##
1523## Autoconf initialization. ##
1524## ------------------------ ##
1525
1526# ac_fn_c_try_compile LINENO
1527# --------------------------
1528# Try to compile conftest.$ac_ext, and return whether this succeeded.
1529ac_fn_c_try_compile ()
1530{
1531 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1532 rm -f conftest.$ac_objext
1533 if { { ac_try="$ac_compile"
1534case "(($ac_try" in
1535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1536 *) ac_try_echo=$ac_try;;
1537esac
1538eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1539$as_echo "$ac_try_echo"; } >&5
1540 (eval "$ac_compile") 2>conftest.err
1541 ac_status=$?
1542 if test -s conftest.err; then
1543 grep -v '^ *+' conftest.err >conftest.er1
1544 cat conftest.er1 >&5
1545 mv -f conftest.er1 conftest.err
1546 fi
1547 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1548 test $ac_status = 0; } && {
1549 test -z "$ac_c_werror_flag" ||
1550 test ! -s conftest.err
1551 } && test -s conftest.$ac_objext; then :
1552 ac_retval=0
1553else
1554 $as_echo "$as_me: failed program was:" >&5
1555sed 's/^/| /' conftest.$ac_ext >&5
1556
1557 ac_retval=1
1558fi
Charles-François Natali47413c12011-10-06 19:47:44 +02001559 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001560 as_fn_set_status $ac_retval
1561
1562} # ac_fn_c_try_compile
1563
Matthias Kloseb9621712010-04-24 17:59:49 +00001564# ac_fn_c_try_link LINENO
1565# -----------------------
1566# Try to link conftest.$ac_ext, and return whether this succeeded.
1567ac_fn_c_try_link ()
1568{
1569 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1570 rm -f conftest.$ac_objext conftest$ac_exeext
1571 if { { ac_try="$ac_link"
1572case "(($ac_try" in
1573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1574 *) ac_try_echo=$ac_try;;
1575esac
1576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1577$as_echo "$ac_try_echo"; } >&5
1578 (eval "$ac_link") 2>conftest.err
1579 ac_status=$?
1580 if test -s conftest.err; then
1581 grep -v '^ *+' conftest.err >conftest.er1
1582 cat conftest.er1 >&5
1583 mv -f conftest.er1 conftest.err
1584 fi
1585 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1586 test $ac_status = 0; } && {
1587 test -z "$ac_c_werror_flag" ||
1588 test ! -s conftest.err
1589 } && test -s conftest$ac_exeext && {
1590 test "$cross_compiling" = yes ||
1591 $as_test_x conftest$ac_exeext
1592 }; then :
1593 ac_retval=0
1594else
1595 $as_echo "$as_me: failed program was:" >&5
1596sed 's/^/| /' conftest.$ac_ext >&5
1597
1598 ac_retval=1
1599fi
1600 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1601 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1602 # interfere with the next link command; also delete a directory that is
1603 # left behind by Apple's compiler. We do this before executing the actions.
1604 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali47413c12011-10-06 19:47:44 +02001605 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001606 as_fn_set_status $ac_retval
1607
1608} # ac_fn_c_try_link
1609
Matthias Kloseb9621712010-04-24 17:59:49 +00001610# ac_fn_c_try_cpp LINENO
1611# ----------------------
1612# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1613ac_fn_c_try_cpp ()
1614{
1615 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1616 if { { ac_try="$ac_cpp conftest.$ac_ext"
1617case "(($ac_try" in
1618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1619 *) ac_try_echo=$ac_try;;
1620esac
1621eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1622$as_echo "$ac_try_echo"; } >&5
1623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1624 ac_status=$?
1625 if test -s conftest.err; then
1626 grep -v '^ *+' conftest.err >conftest.er1
1627 cat conftest.er1 >&5
1628 mv -f conftest.er1 conftest.err
1629 fi
1630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001631 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1633 test ! -s conftest.err
1634 }; then :
1635 ac_retval=0
1636else
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=1
1641fi
Charles-François Natali47413c12011-10-06 19:47:44 +02001642 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001643 as_fn_set_status $ac_retval
1644
1645} # ac_fn_c_try_cpp
1646
1647# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1648# -------------------------------------------------------
1649# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1650# the include files in INCLUDES and setting the cache variable VAR
1651# accordingly.
1652ac_fn_c_check_header_mongrel ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Charles-François Natali47413c12011-10-06 19:47:44 +02001655 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1657$as_echo_n "checking for $2... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001658if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001659 $as_echo_n "(cached) " >&6
1660fi
1661eval ac_res=\$$3
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1663$as_echo "$ac_res" >&6; }
1664else
1665 # Is the header compilable?
1666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1667$as_echo_n "checking $2 usability... " >&6; }
1668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1669/* end confdefs.h. */
1670$4
1671#include <$2>
1672_ACEOF
1673if ac_fn_c_try_compile "$LINENO"; then :
1674 ac_header_compiler=yes
1675else
1676 ac_header_compiler=no
1677fi
1678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1680$as_echo "$ac_header_compiler" >&6; }
1681
1682# Is the header present?
1683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1684$as_echo_n "checking $2 presence... " >&6; }
1685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1686/* end confdefs.h. */
1687#include <$2>
1688_ACEOF
1689if ac_fn_c_try_cpp "$LINENO"; then :
1690 ac_header_preproc=yes
1691else
1692 ac_header_preproc=no
1693fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001694rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1696$as_echo "$ac_header_preproc" >&6; }
1697
1698# So? What about this header?
1699case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1700 yes:no: )
1701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1702$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1704$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1705 ;;
1706 no:yes:* )
1707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1708$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1710$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1712$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1714$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1716$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001717( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001718## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001719## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001720 ) | sed "s/^/$as_me: WARNING: /" >&2
1721 ;;
1722esac
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1724$as_echo_n "checking for $2... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001725if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001726 $as_echo_n "(cached) " >&6
1727else
1728 eval "$3=\$ac_header_compiler"
1729fi
1730eval ac_res=\$$3
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1732$as_echo "$ac_res" >&6; }
1733fi
Charles-François Natali47413c12011-10-06 19:47:44 +02001734 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001735
1736} # ac_fn_c_check_header_mongrel
1737
1738# ac_fn_c_try_run LINENO
1739# ----------------------
1740# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1741# that executables *can* be run.
1742ac_fn_c_try_run ()
1743{
1744 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1745 if { { ac_try="$ac_link"
1746case "(($ac_try" in
1747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1748 *) ac_try_echo=$ac_try;;
1749esac
1750eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1751$as_echo "$ac_try_echo"; } >&5
1752 (eval "$ac_link") 2>&5
1753 ac_status=$?
1754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1756 { { case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_try") 2>&5
1763 ac_status=$?
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; }; }; then :
1766 ac_retval=0
1767else
1768 $as_echo "$as_me: program exited with status $ac_status" >&5
1769 $as_echo "$as_me: failed program was:" >&5
1770sed 's/^/| /' conftest.$ac_ext >&5
1771
1772 ac_retval=$ac_status
1773fi
1774 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali47413c12011-10-06 19:47:44 +02001775 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 as_fn_set_status $ac_retval
1777
1778} # ac_fn_c_try_run
1779
1780# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1781# -------------------------------------------------------
1782# Tests whether HEADER exists and can be compiled using the include files in
1783# INCLUDES, setting the cache variable VAR accordingly.
1784ac_fn_c_check_header_compile ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1788$as_echo_n "checking for $2... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001789if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001790 $as_echo_n "(cached) " >&6
1791else
1792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1793/* end confdefs.h. */
1794$4
1795#include <$2>
1796_ACEOF
1797if ac_fn_c_try_compile "$LINENO"; then :
1798 eval "$3=yes"
1799else
1800 eval "$3=no"
1801fi
1802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1803fi
1804eval ac_res=\$$3
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1806$as_echo "$ac_res" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001807 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001808
1809} # ac_fn_c_check_header_compile
1810
Matthias Kloseb9621712010-04-24 17:59:49 +00001811# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1812# -------------------------------------------
1813# Tests whether TYPE exists after having included INCLUDES, setting cache
1814# variable VAR accordingly.
1815ac_fn_c_check_type ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819$as_echo_n "checking for $2... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001820if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 $as_echo_n "(cached) " >&6
1822else
1823 eval "$3=no"
1824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1825/* end confdefs.h. */
1826$4
1827int
1828main ()
1829{
1830if (sizeof ($2))
1831 return 0;
1832 ;
1833 return 0;
1834}
1835_ACEOF
1836if ac_fn_c_try_compile "$LINENO"; then :
1837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838/* end confdefs.h. */
1839$4
1840int
1841main ()
1842{
1843if (sizeof (($2)))
1844 return 0;
1845 ;
1846 return 0;
1847}
1848_ACEOF
1849if ac_fn_c_try_compile "$LINENO"; then :
1850
1851else
1852 eval "$3=yes"
1853fi
1854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001861 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001862
1863} # ac_fn_c_check_type
1864
1865# ac_fn_c_find_uintX_t LINENO BITS VAR
1866# ------------------------------------
1867# Finds an unsigned integer type with width BITS, setting cache variable VAR
1868# accordingly.
1869ac_fn_c_find_uintX_t ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1873$as_echo_n "checking for uint$2_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001874if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=no"
1878 # Order is important - never check a type that is potentially smaller
1879 # than half of the expected target width.
1880 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1881 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884$ac_includes_default
1885int
1886main ()
1887{
1888static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1889test_array [0] = 0
1890
1891 ;
1892 return 0;
1893}
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"; then :
1896 case $ac_type in #(
1897 uint$2_t) :
1898 eval "$3=yes" ;; #(
1899 *) :
1900 eval "$3=\$ac_type" ;;
1901esac
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001904 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001905
1906else
1907 break
1908fi
1909 done
1910fi
1911eval ac_res=\$$3
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1913$as_echo "$ac_res" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001914 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001915
1916} # ac_fn_c_find_uintX_t
1917
1918# ac_fn_c_find_intX_t LINENO BITS VAR
1919# -----------------------------------
1920# Finds a signed integer type with width BITS, setting cache variable VAR
1921# accordingly.
1922ac_fn_c_find_intX_t ()
1923{
1924 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1926$as_echo_n "checking for int$2_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001927if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001928 $as_echo_n "(cached) " >&6
1929else
1930 eval "$3=no"
1931 # Order is important - never check a type that is potentially smaller
1932 # than half of the expected target width.
1933 for ac_type in int$2_t 'int' 'long int' \
1934 'long long int' 'short int' 'signed char'; do
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001938 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001939int
1940main ()
1941{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001942static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001943test_array [0] = 0
1944
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001953 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001954int
1955main ()
1956{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001957static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001958 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1959test_array [0] = 0
1960
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966
1967else
1968 case $ac_type in #(
1969 int$2_t) :
1970 eval "$3=yes" ;; #(
1971 *) :
1972 eval "$3=\$ac_type" ;;
1973esac
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001978 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980else
1981 break
1982fi
1983 done
1984fi
1985eval ac_res=\$$3
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987$as_echo "$ac_res" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02001988 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990} # ac_fn_c_find_intX_t
1991
1992# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1993# --------------------------------------------
1994# Tries to find the compile-time value of EXPR in a program that includes
1995# INCLUDES, setting VAR accordingly. Returns whether the value could be
1996# computed
1997ac_fn_c_compute_int ()
1998{
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 if test "$cross_compiling" = yes; then
2001 # Depending upon the size, compute the lo and hi bounds.
2002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$4
2005int
2006main ()
2007{
2008static int test_array [1 - 2 * !(($2) >= 0)];
2009test_array [0] = 0
2010
2011 ;
2012 return 0;
2013}
2014_ACEOF
2015if ac_fn_c_try_compile "$LINENO"; then :
2016 ac_lo=0 ac_mid=0
2017 while :; do
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$4
2021int
2022main ()
2023{
2024static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2025test_array [0] = 0
2026
2027 ;
2028 return 0;
2029}
2030_ACEOF
2031if ac_fn_c_try_compile "$LINENO"; then :
2032 ac_hi=$ac_mid; break
2033else
2034 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2035 if test $ac_lo -le $ac_mid; then
2036 ac_lo= ac_hi=
2037 break
2038 fi
2039 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2040fi
2041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2042 done
2043else
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045/* end confdefs.h. */
2046$4
2047int
2048main ()
2049{
2050static int test_array [1 - 2 * !(($2) < 0)];
2051test_array [0] = 0
2052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=-1 ac_mid=-1
2059 while :; do
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063int
2064main ()
2065{
2066static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2067test_array [0] = 0
2068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=$ac_mid; break
2075else
2076 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2077 if test $ac_mid -le $ac_hi; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 ac_lo= ac_hi=
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091# Binary search between lo and hi bounds.
2092while test "x$ac_lo" != "x$ac_hi"; do
2093 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2101test_array [0] = 0
2102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Charles-François Natali47413c12011-10-06 19:47:44 +02002165 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02002178if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02002233 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
2237# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2238# ----------------------------------------------------
2239# Tries to find if the field MEMBER exists in type AGGR, after including
2240# INCLUDES, setting cache variable VAR accordingly.
2241ac_fn_c_check_member ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2245$as_echo_n "checking for $2.$3... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02002246if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002247 $as_echo_n "(cached) " >&6
2248else
2249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250/* end confdefs.h. */
2251$5
2252int
2253main ()
2254{
2255static $2 ac_aggr;
2256if (ac_aggr.$3)
2257return 0;
2258 ;
2259 return 0;
2260}
2261_ACEOF
2262if ac_fn_c_try_compile "$LINENO"; then :
2263 eval "$4=yes"
2264else
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
2267$5
2268int
2269main ()
2270{
2271static $2 ac_aggr;
2272if (sizeof ac_aggr.$3)
2273return 0;
2274 ;
2275 return 0;
2276}
2277_ACEOF
2278if ac_fn_c_try_compile "$LINENO"; then :
2279 eval "$4=yes"
2280else
2281 eval "$4=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287eval ac_res=\$$4
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02002290 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002291
2292} # ac_fn_c_check_member
2293
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002294# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2295# ---------------------------------------------
2296# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2297# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002298ac_fn_c_check_decl ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002301 as_decl_name=`echo $2|sed 's/ *(.*//'`
2302 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2304$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02002305if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002306 $as_echo_n "(cached) " >&6
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$4
2311int
2312main ()
2313{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002314#ifndef $as_decl_name
2315#ifdef __cplusplus
2316 (void) $as_decl_use;
2317#else
2318 (void) $as_decl_name;
2319#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002320#endif
2321
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_compile "$LINENO"; then :
2327 eval "$3=yes"
2328else
2329 eval "$3=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$3
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02002336 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002343It was created by python $as_me 3.3, which was
Charles-François Natali47413c12011-10-06 19:47:44 +02002344generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# 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 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Charles-François Natali47413c12011-10-06 19:47:44 +02002602See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$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 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002692
2693
2694
2695
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002696if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002697then
2698# Extract the first word of "hg", so it can be a program name with args.
2699set dummy hg; ac_word=$2
2700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2701$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02002702if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703 $as_echo_n "(cached) " >&6
2704else
2705 if test -n "$HAS_HG"; then
2706 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2707else
2708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2709for as_dir in $PATH
2710do
2711 IFS=$as_save_IFS
2712 test -z "$as_dir" && as_dir=.
2713 for ac_exec_ext in '' $ac_executable_extensions; do
2714 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2715 ac_cv_prog_HAS_HG="found"
2716 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2717 break 2
2718 fi
2719done
2720 done
2721IFS=$as_save_IFS
2722
2723 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2724fi
2725fi
2726HAS_HG=$ac_cv_prog_HAS_HG
2727if test -n "$HAS_HG"; then
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2729$as_echo "$HAS_HG" >&6; }
2730else
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2732$as_echo "no" >&6; }
2733fi
2734
2735
2736else
2737HAS_HG=no-repository
2738fi
2739if test $HAS_HG = found
2740then
2741 HGVERSION="hg id -i \$(srcdir)"
2742 HGTAG="hg id -t \$(srcdir)"
2743 HGBRANCH="hg id -b \$(srcdir)"
2744else
2745 HGVERSION=""
2746 HGTAG=""
2747 HGBRANCH=""
2748fi
2749
2750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002751ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002752
2753
Martin v. Löwis11437992002-04-12 09:54:03 +00002754
Benjamin Petersond23f8222009-04-05 19:13:16 +00002755if test "$prefix" != "/"; then
2756 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2757fi
2758
2759
Martin v. Löwis11437992002-04-12 09:54:03 +00002760
2761
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002762# We don't use PACKAGE_ variables, and they cause conflicts
2763# with other autoconf-based packages that include Python.h
2764grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2765rm confdefs.h
2766mv confdefs.h.new confdefs.h
2767
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002768
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002769VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002770
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002771# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002772
2773SOVERSION=1.0
2774
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002775# The later defininition of _XOPEN_SOURCE disables certain features
2776# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2777
Matthias Kloseb9621712010-04-24 17:59:49 +00002778$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002779
2780
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002781# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2782# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2783# them.
2784
Matthias Kloseb9621712010-04-24 17:59:49 +00002785$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002786
2787
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002788# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2789# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2790# them.
2791
Matthias Kloseb9621712010-04-24 17:59:49 +00002792$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002793
2794
Martin v. Löwisd6320502004-08-12 13:45:08 +00002795# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2796# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2797
Matthias Kloseb9621712010-04-24 17:59:49 +00002798$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002799
2800
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002801# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2802# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2803# them.
2804
Matthias Kloseb9621712010-04-24 17:59:49 +00002805$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806
2807
2808
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002809define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002810
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002811# Arguments passed to configure.
2812
2813CONFIG_ARGS="$ac_configure_args"
2814
Matthias Kloseb9621712010-04-24 17:59:49 +00002815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2816$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002817# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002818if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002819 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002820 case $enableval in
2821 yes)
2822 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002823 if test ! -d "${enableval}"
2824 then
2825 enableval=/
2826 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002827 ;;
2828 esac
2829 case $enableval in
2830 no)
2831 UNIVERSALSDK=
2832 enable_universalsdk=
2833 ;;
2834 *)
2835 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002836 if test ! -d "${UNIVERSALSDK}"
2837 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002838 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002839 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002840 ;;
2841 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002842
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002843
Thomas Wouters477c8d52006-05-27 19:21:47 +00002844else
2845
2846 UNIVERSALSDK=
2847 enable_universalsdk=
2848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002849fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002851if test -n "${UNIVERSALSDK}"
2852then
Matthias Kloseb9621712010-04-24 17:59:49 +00002853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2854$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002855else
Matthias Kloseb9621712010-04-24 17:59:49 +00002856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2857$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002858fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002860
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002861
2862
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002863UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002864
Matthias Kloseb9621712010-04-24 17:59:49 +00002865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2866$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002867
2868# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002869if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002870 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2872$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002873 UNIVERSAL_ARCHS="$withval"
2874
2875else
2876
Matthias Kloseb9621712010-04-24 17:59:49 +00002877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2878$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002879
2880fi
2881
2882
2883
2884
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002885
2886# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002887if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002888 withval=$with_framework_name;
2889 PYTHONFRAMEWORK=${withval}
2890 PYTHONFRAMEWORKDIR=${withval}.framework
2891 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2892
2893else
2894
2895 PYTHONFRAMEWORK=Python
2896 PYTHONFRAMEWORKDIR=Python.framework
2897 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2898
2899fi
2900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002901# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002902if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002903 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002904 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002906 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002907 esac
2908 case $enableval in
2909 no)
2910 PYTHONFRAMEWORK=
2911 PYTHONFRAMEWORKDIR=no-framework
2912 PYTHONFRAMEWORKPREFIX=
2913 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002914 FRAMEWORKINSTALLFIRST=
2915 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002916 FRAMEWORKALTINSTALLFIRST=
2917 FRAMEWORKALTINSTALLLAST=
2918 if test "x${prefix}" = "xNONE"; then
2919 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2920 else
2921 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2922 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002923 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002924 ;;
2925 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002926 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002927 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002928 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002929 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002930 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2931 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002932 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002933
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002934 if test "x${prefix}" = "xNONE" ; then
2935 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002936
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002937 else
2938 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2939 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002940
2941 case "${enableval}" in
2942 /System*)
2943 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2944 if test "${prefix}" = "NONE" ; then
2945 # See below
2946 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2947 fi
2948 ;;
2949
2950 /Library*)
2951 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2952 ;;
2953
2954 */Library/Frameworks)
2955 MDIR="`dirname "${enableval}"`"
2956 MDIR="`dirname "${MDIR}"`"
2957 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2958
2959 if test "${prefix}" = "NONE"; then
2960 # User hasn't specified the
2961 # --prefix option, but wants to install
2962 # the framework in a non-default location,
2963 # ensure that the compatibility links get
2964 # installed relative to that prefix as well
2965 # instead of in /usr/local.
2966 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2967 fi
2968 ;;
2969
2970 *)
2971 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2972 ;;
2973 esac
2974
Jack Jansen127e56e2001-09-11 14:41:54 +00002975 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002976
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002977 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002978 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002979 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002981 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002982
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002983 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2984
2985 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2986
Jack Jansene578a632001-08-15 01:27:14 +00002987 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002988
Guido van Rossum563e7081996-09-10 18:20:48 +00002989else
Martin v. Löwis11437992002-04-12 09:54:03 +00002990
Jack Jansene578a632001-08-15 01:27:14 +00002991 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002992 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002993 PYTHONFRAMEWORKPREFIX=
2994 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002995 FRAMEWORKINSTALLFIRST=
2996 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002997 FRAMEWORKALTINSTALLFIRST=
2998 FRAMEWORKALTINSTALLLAST=
2999 if test "x${prefix}" = "xNONE" ; then
3000 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3001 else
3002 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3003 fi
Jack Jansene578a632001-08-15 01:27:14 +00003004 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003005
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007fi
3008
Thomas Wouters477c8d52006-05-27 19:21:47 +00003009
3010
Michael W. Hudson54241132001-12-07 15:38:26 +00003011
3012
3013
3014
Jack Jansene578a632001-08-15 01:27:14 +00003015
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003016
3017
3018
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003019
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003020
Jack Jansene578a632001-08-15 01:27:14 +00003021##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003022## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003023## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003024##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003025# Set name for machine-dependent library files
3026
Matthias Kloseb9621712010-04-24 17:59:49 +00003027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3028$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003029if test -z "$MACHDEP"
3030then
Guido van Rossum563e7081996-09-10 18:20:48 +00003031 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003032 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003033 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003034 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003035 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003036 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003037 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003038 ac_md_system=`echo $ac_sys_system |
3039 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3040 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003041 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003042 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003043
Guido van Rossum07397971997-04-29 21:49:50 +00003044 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003045 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003046 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003047 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003048 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003049 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003050 esac
3051fi
Guido van Rossum91922671997-10-09 20:24:13 +00003052
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003053# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3054# disable features if it is defined, without any means to access these
3055# features as extensions. For these systems, we skip the definition of
3056# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3057# some feature, make sure there is no alternative way to access this
3058# feature. Also, when using wildcards, make sure you have verified the
3059# need for not defining _XOPEN_SOURCE on all systems matching the
3060# wildcard, and that the wildcard does not include future systems
3061# (which may remove their limitations).
3062case $ac_sys_system/$ac_sys_release in
3063 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3064 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003065 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003066 # In addition, Stefan Krah confirms that issue #1244610 exists through
3067 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003068 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003069 define_xopen_source=no
3070 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3071 # also defined. This can be overridden by defining _BSD_SOURCE
3072 # As this has a different meaning on Linux, only define it on OpenBSD
3073
Matthias Kloseb9621712010-04-24 17:59:49 +00003074$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003075
3076 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003077 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003078 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3079 # also defined. This can be overridden by defining _BSD_SOURCE
3080 # As this has a different meaning on Linux, only define it on OpenBSD
3081
Matthias Kloseb9621712010-04-24 17:59:49 +00003082$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003083
3084 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003085 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3086 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3087 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003088 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 +00003089 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003090 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3091 # request to enable features supported by the standard as a request
3092 # to disable features not supported by the standard. The best way
3093 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3094 # entirely and define __EXTENSIONS__ instead.
3095 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003096 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003097 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3098 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003099 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003100 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003101 define_xopen_source=no;;
3102 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003103 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003104 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003105 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003106 # On FreeBSD 4, the math functions C89 does not cover are never defined
3107 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3108 FreeBSD/4.*)
3109 define_xopen_source=no;;
3110 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3111 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3112 # identifies itself as Darwin/7.*
3113 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3114 # disables platform specific features beyond repair.
3115 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3116 # has no effect, don't bother defining them
3117 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003118 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003119 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003120 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003121 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3122 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3123 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003124 AIX/4)
3125 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003126 AIX/5)
3127 if test `uname -r` -eq 1; then
3128 define_xopen_source=no
3129 fi
3130 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003131 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3132 # defining NI_NUMERICHOST.
3133 QNX/6.3.2)
3134 define_xopen_source=no
3135 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003136
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003137esac
3138
3139if test $define_xopen_source = yes
3140then
Victor Stinner14d098d2011-09-07 22:29:43 +02003141 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003142
Victor Stinner14d098d2011-09-07 22:29:43 +02003143$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003144
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003145
3146 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3147 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3148 # several APIs are not declared. Since this is also needed in some
3149 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003150
Matthias Kloseb9621712010-04-24 17:59:49 +00003151$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003152
3153
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003154
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003155$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003156
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003157fi
3158
Guido van Rossum91922671997-10-09 20:24:13 +00003159#
3160# SGI compilers allow the specification of the both the ABI and the
3161# ISA on the command line. Depending on the values of these switches,
3162# different and often incompatable code will be generated.
3163#
3164# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3165# thus supply support for various ABI/ISA combinations. The MACHDEP
3166# variable is also adjusted.
3167#
3168
3169if test ! -z "$SGI_ABI"
3170then
3171 CC="cc $SGI_ABI"
3172 LDFLAGS="$SGI_ABI $LDFLAGS"
3173 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3176$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003177
Jack Jansen6b08a402004-06-03 12:41:45 +00003178# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3179# it may influence the way we can build extensions, so distutils
3180# needs to check it
3181
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
Jack Jansen6b08a402004-06-03 12:41:45 +00003183CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003185
Matthias Kloseb9621712010-04-24 17:59:49 +00003186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3187$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003188ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3190$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003191
Guido van Rossum627b2d71993-12-24 10:39:16 +00003192# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003193
3194# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3195# for debug/optimization stuff. BASECFLAGS is for flags that are required
3196# just to get things to compile and link. Users are free to override OPT
3197# when running configure or make. The build should not break if they do.
3198# BASECFLAGS should generally not be messed with, however.
3199
3200# XXX shouldn't some/most/all of this code be merged with the stuff later
3201# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3203$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003206if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003208 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003209 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003210 without_gcc=yes;;
3211 yes) CC=gcc
3212 without_gcc=no;;
3213 *) CC=$withval
3214 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003215 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003216else
Martin v. Löwis11437992002-04-12 09:54:03 +00003217
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003218 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003219 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003220 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003221 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003222 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223fi
3224
Matthias Kloseb9621712010-04-24 17:59:49 +00003225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3226$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003227
Guido van Rossum8b131c51995-03-09 14:10:13 +00003228# If the user switches compilers, we can't believe the cache
3229if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3230then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003231 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003232(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003233fi
3234
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003235# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3236# when the compiler supports them, but we don't always want -O2, and
3237# we set -g later.
3238if test -z "$CFLAGS"; then
3239 CFLAGS=
3240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003241ac_ext=c
3242ac_cpp='$CPP $CPPFLAGS'
3243ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3244ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3245ac_compiler_gnu=$ac_cv_c_compiler_gnu
3246if test -n "$ac_tool_prefix"; then
3247 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3248set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3250$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003251if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003253else
3254 if test -n "$CC"; then
3255 ac_cv_prog_CC="$CC" # Let the user override the test.
3256else
Martin v. Löwis11437992002-04-12 09:54:03 +00003257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3258for as_dir in $PATH
3259do
3260 IFS=$as_save_IFS
3261 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003262 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003263 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 +00003264 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003265 $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 +00003266 break 2
3267 fi
3268done
Matthias Kloseb9621712010-04-24 17:59:49 +00003269 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003271
Jack Jansendd19cf82001-12-06 22:36:17 +00003272fi
3273fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003274CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003275if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3277$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003278else
Matthias Kloseb9621712010-04-24 17:59:49 +00003279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3280$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003281fi
3282
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003283
Martin v. Löwis11437992002-04-12 09:54:03 +00003284fi
3285if test -z "$ac_cv_prog_CC"; then
3286 ac_ct_CC=$CC
3287 # Extract the first word of "gcc", so it can be a program name with args.
3288set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3290$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003291if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003293else
3294 if test -n "$ac_ct_CC"; then
3295 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3296else
3297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3298for as_dir in $PATH
3299do
3300 IFS=$as_save_IFS
3301 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003303 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 +00003304 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 $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 +00003306 break 2
3307 fi
3308done
Matthias Kloseb9621712010-04-24 17:59:49 +00003309 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003311
3312fi
3313fi
3314ac_ct_CC=$ac_cv_prog_ac_ct_CC
3315if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3317$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003318else
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3320$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003321fi
3322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 if test "x$ac_ct_CC" = x; then
3324 CC=""
3325 else
3326 case $cross_compiling:$ac_tool_warned in
3327yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003328{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3329$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003330ac_tool_warned=yes ;;
3331esac
3332 CC=$ac_ct_CC
3333 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003334else
3335 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003336fi
3337
Jack Jansendd19cf82001-12-06 22:36:17 +00003338if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339 if test -n "$ac_tool_prefix"; then
3340 # 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 +00003341set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3343$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003344if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003345 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003346else
3347 if test -n "$CC"; then
3348 ac_cv_prog_CC="$CC" # Let the user override the test.
3349else
Martin v. Löwis11437992002-04-12 09:54:03 +00003350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3351for as_dir in $PATH
3352do
3353 IFS=$as_save_IFS
3354 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003355 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003356 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 +00003357 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003358 $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 +00003359 break 2
3360 fi
3361done
Matthias Kloseb9621712010-04-24 17:59:49 +00003362 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003363IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003364
3365fi
3366fi
3367CC=$ac_cv_prog_CC
3368if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3370$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003371else
Matthias Kloseb9621712010-04-24 17:59:49 +00003372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3373$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003374fi
3375
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003376
Martin v. Löwis11437992002-04-12 09:54:03 +00003377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003378fi
3379if test -z "$CC"; then
3380 # Extract the first word of "cc", so it can be a program name with args.
3381set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3383$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003384if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003385 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003386else
3387 if test -n "$CC"; then
3388 ac_cv_prog_CC="$CC" # Let the user override the test.
3389else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003390 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3392for as_dir in $PATH
3393do
3394 IFS=$as_save_IFS
3395 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003397 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 +00003398 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3399 ac_prog_rejected=yes
3400 continue
3401 fi
3402 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003403 $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 +00003404 break 2
3405 fi
3406done
Matthias Kloseb9621712010-04-24 17:59:49 +00003407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003408IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003409
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003410if test $ac_prog_rejected = yes; then
3411 # We found a bogon in the path, so make sure we never use it.
3412 set dummy $ac_cv_prog_CC
3413 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003415 # We chose a different compiler from the bogus one.
3416 # However, it has the same basename, so the bogon will be chosen
3417 # first if we set CC to just the basename; use the full file name.
3418 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003419 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003420 fi
3421fi
3422fi
3423fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003424CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003425if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3427$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003428else
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3430$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003431fi
3432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433
Martin v. Löwis11437992002-04-12 09:54:03 +00003434fi
3435if test -z "$CC"; then
3436 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003437 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 do
3439 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3440set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3442$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003443if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003444 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003445else
3446 if test -n "$CC"; then
3447 ac_cv_prog_CC="$CC" # Let the user override the test.
3448else
Martin v. Löwis11437992002-04-12 09:54:03 +00003449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3450for as_dir in $PATH
3451do
3452 IFS=$as_save_IFS
3453 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455 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 +00003456 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003457 $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 +00003458 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003459 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003460done
Matthias Kloseb9621712010-04-24 17:59:49 +00003461 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003463
3464fi
3465fi
3466CC=$ac_cv_prog_CC
3467if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3469$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003470else
Matthias Kloseb9621712010-04-24 17:59:49 +00003471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3472$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003473fi
3474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 test -n "$CC" && break
3477 done
3478fi
3479if test -z "$CC"; then
3480 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003482do
3483 # Extract the first word of "$ac_prog", so it can be a program name with args.
3484set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3486$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003487if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003488 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003489else
3490 if test -n "$ac_ct_CC"; then
3491 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3492else
3493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3494for as_dir in $PATH
3495do
3496 IFS=$as_save_IFS
3497 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003498 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003499 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 +00003500 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003501 $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 +00003502 break 2
3503 fi
3504done
Matthias Kloseb9621712010-04-24 17:59:49 +00003505 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003507
Martin v. Löwis11437992002-04-12 09:54:03 +00003508fi
3509fi
3510ac_ct_CC=$ac_cv_prog_ac_ct_CC
3511if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3513$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003514else
Matthias Kloseb9621712010-04-24 17:59:49 +00003515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3516$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003519
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 test -n "$ac_ct_CC" && break
3521done
Michael W. Hudson54241132001-12-07 15:38:26 +00003522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523 if test "x$ac_ct_CC" = x; then
3524 CC=""
3525 else
3526 case $cross_compiling:$ac_tool_warned in
3527yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003528{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3529$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530ac_tool_warned=yes ;;
3531esac
3532 CC=$ac_ct_CC
3533 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003534fi
3535
3536fi
3537
3538
Matthias Kloseb9621712010-04-24 17:59:49 +00003539test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003541as_fn_error $? "no acceptable C compiler found in \$PATH
Charles-François Natali47413c12011-10-06 19:47:44 +02003542See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003543
3544# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003545$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3546set X $ac_compile
3547ac_compiler=$2
3548for ac_option in --version -v -V -qversion; do
3549 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550case "(($ac_try" in
3551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3552 *) ac_try_echo=$ac_try;;
3553esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003554eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3555$as_echo "$ac_try_echo"; } >&5
3556 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003558 if test -s conftest.err; then
3559 sed '10a\
3560... rest of stderr output deleted ...
3561 10q' conftest.err >conftest.er1
3562 cat conftest.er1 >&5
3563 fi
3564 rm -f conftest.er1 conftest.err
3565 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3566 test $ac_status = 0; }
3567done
Martin v. Löwis11437992002-04-12 09:54:03 +00003568
Matthias Kloseb9621712010-04-24 17:59:49 +00003569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003570/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003571
Martin v. Löwis11437992002-04-12 09:54:03 +00003572int
3573main ()
3574{
3575
3576 ;
3577 return 0;
3578}
3579_ACEOF
3580ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003581ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003582# Try to create an executable without -o first, disregard a.out.
3583# It will help us diagnose broken compilers, and finding out an intuition
3584# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3586$as_echo_n "checking whether the C compiler works... " >&6; }
3587ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3588
3589# The possible output files:
3590ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592ac_rmfiles=
3593for ac_file in $ac_files
3594do
3595 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3598 esac
3599done
3600rm -f $ac_rmfiles
3601
Matthias Kloseb9621712010-04-24 17:59:49 +00003602if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603case "(($ac_try" in
3604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3605 *) ac_try_echo=$ac_try;;
3606esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003607eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3608$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3612 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3614# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3615# in a Makefile. We should not override ac_cv_exeext if it was cached,
3616# so that the user can short-circuit this test for compilers unknown to
3617# Autoconf.
3618for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003619do
3620 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003623 ;;
3624 [ab].out )
3625 # We found the default executable, but exeext='' is most
3626 # certainly right.
3627 break;;
3628 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630 then :; else
3631 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3632 fi
3633 # We set ac_cv_exeext here because the later test for it is not
3634 # safe: cross compilers may not add the suffix if given an `-o'
3635 # argument, so we may need to know it at that point already.
3636 # Even if this section looks crufty: it has the advantage of
3637 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003638 break;;
3639 * )
3640 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 esac
3642done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643test "$ac_cv_exeext" = no && ac_cv_exeext=
3644
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003645else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646 ac_file=''
3647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003648if test -z "$ac_file"; then :
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3650$as_echo "no" >&6; }
3651$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003652sed 's/^/| /' conftest.$ac_ext >&5
3653
Matthias Kloseb9621712010-04-24 17:59:49 +00003654{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003656as_fn_error 77 "C compiler cannot create executables
Charles-François Natali47413c12011-10-06 19:47:44 +02003657See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003658else
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3660$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3663$as_echo_n "checking for C compiler default output file name... " >&6; }
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3665$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003666ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003667
Matthias Kloseb9621712010-04-24 17:59:49 +00003668rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003669ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3671$as_echo_n "checking for suffix of executables... " >&6; }
3672if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673case "(($ac_try" in
3674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3675 *) ac_try_echo=$ac_try;;
3676esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003677eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3678$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003680 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3682 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003683 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3684# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3685# work properly (i.e., refer to `conftest.exe'), while it won't with
3686# `rm'.
3687for ac_file in conftest.exe conftest conftest.*; do
3688 test -f "$ac_file" || continue
3689 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003691 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3692 break;;
3693 * ) break;;
3694 esac
3695done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003696else
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003699as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Charles-François Natali47413c12011-10-06 19:47:44 +02003700See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003702rm -f conftest conftest$ac_cv_exeext
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3704$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003705
3706rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003707EXEEXT=$ac_cv_exeext
3708ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3710/* end confdefs.h. */
3711#include <stdio.h>
3712int
3713main ()
3714{
3715FILE *f = fopen ("conftest.out", "w");
3716 return ferror (f) || fclose (f) != 0;
3717
3718 ;
3719 return 0;
3720}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003722ac_clean_files="$ac_clean_files conftest.out"
3723# Check that the compiler produces executables we can run. If not, either
3724# the compiler is broken, or we cross compile.
3725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3726$as_echo_n "checking whether we are cross compiling... " >&6; }
3727if test "$cross_compiling" != yes; then
3728 { { ac_try="$ac_link"
3729case "(($ac_try" in
3730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3731 *) ac_try_echo=$ac_try;;
3732esac
3733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3734$as_echo "$ac_try_echo"; } >&5
3735 (eval "$ac_link") 2>&5
3736 ac_status=$?
3737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3738 test $ac_status = 0; }
3739 if { ac_try='./conftest$ac_cv_exeext'
3740 { { case "(($ac_try" in
3741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3742 *) ac_try_echo=$ac_try;;
3743esac
3744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3745$as_echo "$ac_try_echo"; } >&5
3746 (eval "$ac_try") 2>&5
3747 ac_status=$?
3748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3749 test $ac_status = 0; }; }; then
3750 cross_compiling=no
3751 else
3752 if test "$cross_compiling" = maybe; then
3753 cross_compiling=yes
3754 else
3755 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003757as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758If you meant to cross compile, use \`--host'.
Charles-François Natali47413c12011-10-06 19:47:44 +02003759See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 fi
3761 fi
3762fi
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3764$as_echo "$cross_compiling" >&6; }
3765
3766rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3767ac_clean_files=$ac_clean_files_save
3768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3769$as_echo_n "checking for suffix of object files... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003770if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $as_echo_n "(cached) " >&6
3772else
3773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003774/* end confdefs.h. */
3775
3776int
3777main ()
3778{
3779
3780 ;
3781 return 0;
3782}
3783_ACEOF
3784rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003785if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786case "(($ac_try" in
3787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3788 *) ac_try_echo=$ac_try;;
3789esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003790eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3791$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3795 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_file in conftest.o conftest.obj conftest.*; do
3797 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3801 break;;
3802 esac
3803done
3804else
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003806sed 's/^/| /' conftest.$ac_ext >&5
3807
Matthias Kloseb9621712010-04-24 17:59:49 +00003808{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003810as_fn_error $? "cannot compute suffix of object files: cannot compile
Charles-François Natali47413c12011-10-06 19:47:44 +02003811See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003813rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3816$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003817OBJEXT=$ac_cv_objext
3818ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3820$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003821if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003823else
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003826
Martin v. Löwis11437992002-04-12 09:54:03 +00003827int
3828main ()
3829{
3830#ifndef __GNUC__
3831 choke me
3832#endif
3833
3834 ;
3835 return 0;
3836}
3837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 ac_compiler_gnu=yes
3840else
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003844ac_cv_c_compiler_gnu=$ac_compiler_gnu
3845
3846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3848$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3849if test $ac_compiler_gnu = yes; then
3850 GCC=yes
3851else
3852 GCC=
3853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003854ac_test_CFLAGS=${CFLAGS+set}
3855ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3857$as_echo_n "checking whether $CC accepts -g... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003858if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003860else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861 ac_save_c_werror_flag=$ac_c_werror_flag
3862 ac_c_werror_flag=yes
3863 ac_cv_prog_cc_g=no
3864 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868int
3869main ()
3870{
3871
3872 ;
3873 return 0;
3874}
3875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003876if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003877 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003878else
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 CFLAGS=""
3880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881/* end confdefs.h. */
3882
3883int
3884main ()
3885{
3886
3887 ;
3888 return 0;
3889}
3890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003891if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892
Matthias Kloseb9621712010-04-24 17:59:49 +00003893else
3894 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897/* end confdefs.h. */
3898
3899int
3900main ()
3901{
3902
3903 ;
3904 return 0;
3905}
3906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003907if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3915 ac_c_werror_flag=$ac_save_c_werror_flag
3916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3918$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003919if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921elif test $ac_cv_prog_cc_g = yes; then
3922 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003923 CFLAGS="-g -O2"
3924 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003925 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003926 fi
3927else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003928 if test "$GCC" = yes; then
3929 CFLAGS="-O2"
3930 else
3931 CFLAGS=
3932 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3935$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02003936if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003938else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003940ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003942/* end confdefs.h. */
3943#include <stdarg.h>
3944#include <stdio.h>
3945#include <sys/types.h>
3946#include <sys/stat.h>
3947/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3948struct buf { int x; };
3949FILE * (*rcsopen) (struct buf *, struct stat *, int);
3950static char *e (p, i)
3951 char **p;
3952 int i;
3953{
3954 return p[i];
3955}
3956static char *f (char * (*g) (char **, int), char **p, ...)
3957{
3958 char *s;
3959 va_list v;
3960 va_start (v,p);
3961 s = g (p, va_arg (v,int));
3962 va_end (v);
3963 return s;
3964}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003965
3966/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3967 function prototypes and stuff, but not '\xHH' hex character constants.
3968 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003970 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3971 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003973int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3976 inside strings and character constants. */
3977#define FOO(x) 'x'
3978int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3979
Skip Montanaro6dead952003-09-25 14:50:04 +00003980int test (int i, double x);
3981struct s1 {int (*f) (int a);};
3982struct s2 {int (*f) (double a);};
3983int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3984int argc;
3985char **argv;
3986int
3987main ()
3988{
3989return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3990 ;
3991 return 0;
3992}
3993_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3995 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003996do
3997 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003998 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001rm -f core conftest.err conftest.$ac_objext
4002 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004003done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004005CC=$ac_save_CC
4006
4007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008# AC_CACHE_VAL
4009case "x$ac_cv_prog_cc_c89" in
4010 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4012$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4015$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004016 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4019$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004020esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004021if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004022
Matthias Kloseb9621712010-04-24 17:59:49 +00004023fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004024
Martin v. Löwis11437992002-04-12 09:54:03 +00004025ac_ext=c
4026ac_cpp='$CPP $CPPFLAGS'
4027ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4028ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4029ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004030
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004031
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004032
4033
Matthias Kloseb9621712010-04-24 17:59:49 +00004034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4035$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004037# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004038if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004040
4041 case $withval in
4042 no) with_cxx_main=no
4043 MAINCC='$(CC)';;
4044 yes) with_cxx_main=yes
4045 MAINCC='$(CXX)';;
4046 *) with_cxx_main=yes
4047 MAINCC=$withval
4048 if test -z "$CXX"
4049 then
4050 CXX=$withval
4051 fi;;
4052 esac
4053else
4054
4055 with_cxx_main=no
4056 MAINCC='$(CC)'
4057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004058fi
4059
Matthias Kloseb9621712010-04-24 17:59:49 +00004060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4061$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004062
4063preset_cxx="$CXX"
4064if test -z "$CXX"
4065then
4066 case "$CC" in
4067 gcc) # Extract the first word of "g++", so it can be a program name with args.
4068set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4070$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02004071if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004072 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004073else
4074 case $CXX in
4075 [\\/]* | ?:[\\/]*)
4076 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4077 ;;
4078 *)
4079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080for as_dir in notfound
4081do
4082 IFS=$as_save_IFS
4083 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004085 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 +00004086 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004088 break 2
4089 fi
4090done
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004093
4094 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4095 ;;
4096esac
4097fi
4098CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004099if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4101$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004102else
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4104$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004107 ;;
4108 cc) # Extract the first word of "c++", so it can be a program name with args.
4109set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4111$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02004112if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004114else
4115 case $CXX in
4116 [\\/]* | ?:[\\/]*)
4117 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4118 ;;
4119 *)
4120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4121for as_dir in notfound
4122do
4123 IFS=$as_save_IFS
4124 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126 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 +00004127 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004129 break 2
4130 fi
4131done
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004134
4135 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4136 ;;
4137esac
4138fi
4139CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004140if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4142$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004143else
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4145$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004147
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148 ;;
4149 esac
4150 if test "$CXX" = "notfound"
4151 then
4152 CXX=""
4153 fi
4154fi
4155if test -z "$CXX"
4156then
4157 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4158do
4159 # Extract the first word of "$ac_prog", so it can be a program name with args.
4160set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4162$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02004163if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004165else
4166 if test -n "$CXX"; then
4167 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4168else
4169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4170for as_dir in $PATH
4171do
4172 IFS=$as_save_IFS
4173 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004175 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 +00004176 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004178 break 2
4179 fi
4180done
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004183
4184fi
4185fi
4186CXX=$ac_cv_prog_CXX
4187if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4189$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004190else
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4192$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004193fi
4194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004196 test -n "$CXX" && break
4197done
4198test -n "$CXX" || CXX="notfound"
4199
4200 if test "$CXX" = "notfound"
4201 then
4202 CXX=""
4203 fi
4204fi
4205if test "$preset_cxx" != "$CXX"
4206then
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004208
4209 By default, distutils will build C++ extension modules with \"$CXX\".
4210 If this is not intended, then set CXX on the configure command line.
4211 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004212$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004213
4214 By default, distutils will build C++ extension modules with \"$CXX\".
4215 If this is not intended, then set CXX on the configure command line.
4216 " >&2;}
4217fi
4218
4219
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4221$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4222save_LDFLAGS="$LDFLAGS"
4223LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004224
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4226/* end confdefs.h. */
4227
4228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
4236if ac_fn_c_try_link "$LINENO"; then :
4237 NO_AS_NEEDED="-Wl,--no-as-needed"
4238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4239$as_echo "yes" >&6; }
4240else
4241 NO_AS_NEEDED=""
4242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4243$as_echo "no" >&6; }
4244fi
4245rm -f core conftest.err conftest.$ac_objext \
4246 conftest$ac_exeext conftest.$ac_ext
4247LDFLAGS="$save_LDFLAGS"
4248
4249
4250
4251# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004252ac_ext=c
4253ac_cpp='$CPP $CPPFLAGS'
4254ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4255ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4256ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4258$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004259# On Suns, sometimes $CPP names a directory.
4260if test -n "$CPP" && test -d "$CPP"; then
4261 CPP=
4262fi
4263if test -z "$CPP"; then
Charles-François Natali47413c12011-10-06 19:47:44 +02004264 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004265 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004266else
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # Double quotes because CPP needs to be expanded
4268 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4269 do
4270 ac_preproc_ok=false
4271for ac_c_preproc_warn_flag in '' yes
4272do
4273 # Use a header file that comes with gcc, so configuring glibc
4274 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004275 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4276 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004277 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004278 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004280/* end confdefs.h. */
4281#ifdef __STDC__
4282# include <limits.h>
4283#else
4284# include <assert.h>
4285#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004286 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004288if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004289
Matthias Kloseb9621712010-04-24 17:59:49 +00004290else
Martin v. Löwis11437992002-04-12 09:54:03 +00004291 # Broken: fails on valid input.
4292continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004293fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004294rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004297 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004300#include <ac_nonexistent.h>
4301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004302if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 # Broken: success on invalid input.
4304continue
4305else
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # Passes both tests.
4307ac_preproc_ok=:
4308break
4309fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004310rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004311
4312done
4313# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004314rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004315if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004316 break
4317fi
4318
4319 done
4320 ac_cv_prog_CPP=$CPP
4321
4322fi
4323 CPP=$ac_cv_prog_CPP
4324else
4325 ac_cv_prog_CPP=$CPP
4326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4328$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004329ac_preproc_ok=false
4330for ac_c_preproc_warn_flag in '' yes
4331do
4332 # Use a header file that comes with gcc, so configuring glibc
4333 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004334 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4335 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004336 # On the NeXT, cc -E runs the code through the compiler's parser,
4337 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004339/* end confdefs.h. */
4340#ifdef __STDC__
4341# include <limits.h>
4342#else
4343# include <assert.h>
4344#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004345 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004347if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004348
Matthias Kloseb9621712010-04-24 17:59:49 +00004349else
Martin v. Löwis11437992002-04-12 09:54:03 +00004350 # Broken: fails on valid input.
4351continue
4352fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004353rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004354
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004356 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004359#include <ac_nonexistent.h>
4360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004361if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004362 # Broken: success on invalid input.
4363continue
4364else
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 # Passes both tests.
4366ac_preproc_ok=:
4367break
4368fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004369rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004370
4371done
4372# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004373rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004374if $ac_preproc_ok; then :
4375
Martin v. Löwis11437992002-04-12 09:54:03 +00004376else
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004379as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Charles-François Natali47413c12011-10-06 19:47:44 +02004380See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004381fi
4382
4383ac_ext=c
4384ac_cpp='$CPP $CPPFLAGS'
4385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4387ac_compiler_gnu=$ac_cv_c_compiler_gnu
4388
4389
Matthias Kloseb9621712010-04-24 17:59:49 +00004390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4391$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02004392if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004394else
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 # Loop through the user's path and test for each of PROGNAME-LIST
4398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4400do
4401 IFS=$as_save_IFS
4402 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 for ac_prog in grep ggrep; do
4404 for ac_exec_ext in '' $ac_executable_extensions; do
4405 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4406 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4407# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 # Check for GNU $ac_path_GREP
4409case `"$ac_path_GREP" --version 2>&1` in
4410*GNU*)
4411 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4412*)
4413 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004414 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004415 while :
4416 do
4417 cat "conftest.in" "conftest.in" >"conftest.tmp"
4418 mv "conftest.tmp" "conftest.in"
4419 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004420 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4422 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4425 # Best one so far, save it but keep looking for a better one
4426 ac_cv_path_GREP="$ac_path_GREP"
4427 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004428 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429 # 10*(2^10) chars as input seems more than enough
4430 test $ac_count -gt 10 && break
4431 done
4432 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4433esac
4434
Matthias Kloseb9621712010-04-24 17:59:49 +00004435 $ac_path_GREP_found && break 3
4436 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004437 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004440 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004441 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 +00004442 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004443else
4444 ac_cv_path_GREP=$GREP
4445fi
4446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4449$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450 GREP="$ac_cv_path_GREP"
4451
4452
Matthias Kloseb9621712010-04-24 17:59:49 +00004453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4454$as_echo_n "checking for egrep... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02004455if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004457else
4458 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4459 then ac_cv_path_EGREP="$GREP -E"
4460 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004461 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004462 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 # Loop through the user's path and test for each of PROGNAME-LIST
4464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004465for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4466do
4467 IFS=$as_save_IFS
4468 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004469 for ac_prog in egrep; do
4470 for ac_exec_ext in '' $ac_executable_extensions; do
4471 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4472 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4473# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474 # Check for GNU $ac_path_EGREP
4475case `"$ac_path_EGREP" --version 2>&1` in
4476*GNU*)
4477 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4478*)
4479 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004480 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004481 while :
4482 do
4483 cat "conftest.in" "conftest.in" >"conftest.tmp"
4484 mv "conftest.tmp" "conftest.in"
4485 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004486 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004487 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4488 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004490 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4491 # Best one so far, save it but keep looking for a better one
4492 ac_cv_path_EGREP="$ac_path_EGREP"
4493 ac_path_EGREP_max=$ac_count
4494 fi
4495 # 10*(2^10) chars as input seems more than enough
4496 test $ac_count -gt 10 && break
4497 done
4498 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4499esac
4500
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 $ac_path_EGREP_found && break 3
4502 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004503 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004504 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004505IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004506 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004507 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 +00004508 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004509else
4510 ac_cv_path_EGREP=$EGREP
4511fi
4512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004513 fi
4514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4516$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004517 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004518
4519
Matthias Kloseb9621712010-04-24 17:59:49 +00004520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4521$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02004522if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004523 $as_echo_n "(cached) " >&6
4524else
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004526/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004527#include <stdlib.h>
4528#include <stdarg.h>
4529#include <string.h>
4530#include <float.h>
4531
4532int
4533main ()
4534{
4535
4536 ;
4537 return 0;
4538}
4539_ACEOF
4540if ac_fn_c_try_compile "$LINENO"; then :
4541 ac_cv_header_stdc=yes
4542else
4543 ac_cv_header_stdc=no
4544fi
4545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4546
4547if test $ac_cv_header_stdc = yes; then
4548 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550/* end confdefs.h. */
4551#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004552
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004553_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004555 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004556
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004557else
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004559fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004560rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004561
Matthias Kloseb9621712010-04-24 17:59:49 +00004562fi
4563
4564if test $ac_cv_header_stdc = yes; then
4565 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4567/* end confdefs.h. */
4568#include <stdlib.h>
4569
4570_ACEOF
4571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4572 $EGREP "free" >/dev/null 2>&1; then :
4573
4574else
4575 ac_cv_header_stdc=no
4576fi
4577rm -f conftest*
4578
4579fi
4580
4581if test $ac_cv_header_stdc = yes; then
4582 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4583 if test "$cross_compiling" = yes; then :
4584 :
4585else
4586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4587/* end confdefs.h. */
4588#include <ctype.h>
4589#include <stdlib.h>
4590#if ((' ' & 0x0FF) == 0x020)
4591# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4592# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4593#else
4594# define ISLOWER(c) \
4595 (('a' <= (c) && (c) <= 'i') \
4596 || ('j' <= (c) && (c) <= 'r') \
4597 || ('s' <= (c) && (c) <= 'z'))
4598# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4599#endif
4600
4601#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4602int
4603main ()
4604{
4605 int i;
4606 for (i = 0; i < 256; i++)
4607 if (XOR (islower (i), ISLOWER (i))
4608 || toupper (i) != TOUPPER (i))
4609 return 2;
4610 return 0;
4611}
4612_ACEOF
4613if ac_fn_c_try_run "$LINENO"; then :
4614
4615else
4616 ac_cv_header_stdc=no
4617fi
4618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4619 conftest.$ac_objext conftest.beam conftest.$ac_ext
4620fi
4621
4622fi
4623fi
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4625$as_echo "$ac_cv_header_stdc" >&6; }
4626if test $ac_cv_header_stdc = yes; then
4627
4628$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4629
4630fi
4631
4632# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4633for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4634 inttypes.h stdint.h unistd.h
4635do :
4636 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4637ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4638"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004639if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004640 cat >>confdefs.h <<_ACEOF
4641#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4642_ACEOF
4643
4644fi
4645
4646done
4647
4648
4649
4650 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +02004651if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004652 MINIX=yes
4653else
4654 MINIX=
4655fi
4656
4657
4658 if test "$MINIX" = yes; then
4659
4660$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4661
4662
4663$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4664
4665
4666$as_echo "#define _MINIX 1" >>confdefs.h
4667
4668 fi
4669
4670
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4672$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02004673if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004674 $as_echo_n "(cached) " >&6
4675else
4676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4677/* end confdefs.h. */
4678
4679# define __EXTENSIONS__ 1
4680 $ac_includes_default
4681int
4682main ()
4683{
4684
4685 ;
4686 return 0;
4687}
4688_ACEOF
4689if ac_fn_c_try_compile "$LINENO"; then :
4690 ac_cv_safe_to_define___extensions__=yes
4691else
4692 ac_cv_safe_to_define___extensions__=no
4693fi
4694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4695fi
4696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4697$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4698 test $ac_cv_safe_to_define___extensions__ = yes &&
4699 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4700
4701 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4702
4703 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4704
4705 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4706
4707 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4708
4709
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004711# Check for unsupported systems
4712case $ac_sys_system/$ac_sys_release in
4713atheos*|Linux*/1*)
4714 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4715 echo See README for details.
4716 exit 1;;
4717esac
4718
4719
Matthias Kloseb9621712010-04-24 17:59:49 +00004720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4721$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004722
4723# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004724if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004725 withval=$with_suffix;
4726 case $withval in
4727 no) EXEEXT=;;
4728 yes) EXEEXT=.exe;;
4729 *) EXEEXT=$withval;;
4730 esac
4731fi
4732
Matthias Kloseb9621712010-04-24 17:59:49 +00004733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4734$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735
4736# Test whether we're running on a non-case-sensitive system, in which
4737# case we give a warning if no ext is given
4738
Matthias Kloseb9621712010-04-24 17:59:49 +00004739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4740$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741if test ! -d CaseSensitiveTestDir; then
4742mkdir CaseSensitiveTestDir
4743fi
4744
4745if test -d casesensitivetestdir
4746then
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4748$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004749 BUILDEXEEXT=.exe
4750else
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753 BUILDEXEEXT=$EXEEXT
4754fi
4755rmdir CaseSensitiveTestDir
4756
4757case $MACHDEP in
4758bsdos*)
4759 case $CC in
4760 gcc) CC="$CC -D_HAVE_BSDI";;
4761 esac;;
4762esac
4763
4764case $ac_sys_system in
4765hp*|HP*)
4766 case $CC in
4767 cc|*/cc) CC="$CC -Ae";;
4768 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769esac
4770
4771
4772
Matthias Kloseb9621712010-04-24 17:59:49 +00004773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4774$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775if test -z "$LIBRARY"
4776then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004777 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4780$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781
4782# LDLIBRARY is the name of the library to link against (as opposed to the
4783# name of the library into which to insert object files). BLDLIBRARY is also
4784# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4785# is blank as the main program is not linked directly against LDLIBRARY.
4786# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4787# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4788# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4789# DLLLIBRARY is the shared (i.e., DLL) library.
4790#
4791# RUNSHARED is used to run shared python without installed libraries
4792#
4793# INSTSONAME is the name of the shared library that will be use to install
4794# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004795#
4796# LDVERSION is the shared library version number, normally the Python version
4797# with the ABI build flags appended.
4798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004799
4800
4801
4802
4803
4804
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004805
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806LDLIBRARY="$LIBRARY"
4807BLDLIBRARY='$(LDLIBRARY)'
4808INSTSONAME='$(LDLIBRARY)'
4809DLLLIBRARY=''
4810LDLIBRARYDIR=''
4811RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004812LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004813
4814# LINKCC is the command that links the python executable -- default is $(CC).
4815# If CXX is set, and if it is needed to link a main function that was
4816# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4817# python might then depend on the C++ runtime
4818# This is altered for AIX in order to build the export list before
4819# linking.
4820
Matthias Kloseb9621712010-04-24 17:59:49 +00004821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4822$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823if test -z "$LINKCC"
4824then
4825 LINKCC='$(PURIFY) $(MAINCC)'
4826 case $ac_sys_system in
4827 AIX*)
4828 exp_extra="\"\""
4829 if test $ac_sys_release -ge 5 -o \
4830 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4831 exp_extra="."
4832 fi
4833 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834 QNX*)
4835 # qcc must be used because the other compilers do not
4836 # support -N.
4837 LINKCC=qcc;;
4838 esac
4839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4841$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842
4843# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4844# make sure we default having it set to "no": this is used by
4845# distutils.unixccompiler to know if it should add --enable-new-dtags
4846# to linker command lines, and failing to detect GNU ld simply results
4847# in the same bahaviour as before.
4848
Matthias Kloseb9621712010-04-24 17:59:49 +00004849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4850$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851ac_prog=ld
4852if test "$GCC" = yes; then
4853 ac_prog=`$CC -print-prog-name=ld`
4854fi
4855case `"$ac_prog" -V 2>&1 < /dev/null` in
4856 *GNU*)
4857 GNULD=yes;;
4858 *)
4859 GNULD=no;;
4860esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4862$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4865$as_echo_n "checking for inline... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02004866if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004867 $as_echo_n "(cached) " >&6
4868else
4869 ac_cv_c_inline=no
4870for ac_kw in inline __inline__ __inline; do
4871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4872/* end confdefs.h. */
4873#ifndef __cplusplus
4874typedef int foo_t;
4875static $ac_kw foo_t static_foo () {return 0; }
4876$ac_kw foo_t foo () {return 0; }
4877#endif
4878
4879_ACEOF
4880if ac_fn_c_try_compile "$LINENO"; then :
4881 ac_cv_c_inline=$ac_kw
4882fi
4883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4884 test "$ac_cv_c_inline" != no && break
4885done
4886
4887fi
4888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4889$as_echo "$ac_cv_c_inline" >&6; }
4890
4891case $ac_cv_c_inline in
4892 inline | yes) ;;
4893 *)
4894 case $ac_cv_c_inline in
4895 no) ac_val=;;
4896 *) ac_val=$ac_cv_c_inline;;
4897 esac
4898 cat >>confdefs.h <<_ACEOF
4899#ifndef __cplusplus
4900#define inline $ac_val
4901#endif
4902_ACEOF
4903 ;;
4904esac
4905
4906if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004907
4908$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004909
4910
4911fi
4912
4913
Matthias Kloseb9621712010-04-24 17:59:49 +00004914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4915$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004917if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918 enableval=$enable_shared;
4919fi
4920
4921
4922if test -z "$enable_shared"
4923then
4924 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004925 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926 enable_shared="yes";;
4927 *)
4928 enable_shared="no";;
4929 esac
4930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4932$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933
Matthias Kloseb9621712010-04-24 17:59:49 +00004934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4935$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004937if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 enableval=$enable_profiling; ac_save_cc="$CC"
4939 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004940 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941 ac_enable_profiling="no"
4942else
Matthias Kloseb9621712010-04-24 17:59:49 +00004943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944/* end confdefs.h. */
4945int main() { return 0; }
4946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004947if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 ac_enable_profiling="yes"
4949else
Matthias Kloseb9621712010-04-24 17:59:49 +00004950 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954fi
4955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 CC="$ac_save_cc"
4957fi
4958
Matthias Kloseb9621712010-04-24 17:59:49 +00004959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4960$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961
4962case "$ac_enable_profiling" in
4963 "yes")
4964 BASECFLAGS="-pg $BASECFLAGS"
4965 LDFLAGS="-pg $LDFLAGS"
4966 ;;
4967esac
4968
Matthias Kloseb9621712010-04-24 17:59:49 +00004969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4970$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971
4972# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4973# library that we build, but we do not want to link against it (we
4974# will find it with a -framework option). For this reason there is an
4975# extra variable BLDLIBRARY against which Python and the extension
4976# modules are linked, BLDLIBRARY. This is normally the same as
4977# LDLIBRARY, but empty for MacOSX framework builds.
4978if test "$enable_framework"
4979then
4980 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4981 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4982 BLDLIBRARY=''
4983else
4984 BLDLIBRARY='$(LDLIBRARY)'
4985fi
4986
4987# Other platforms follow
4988if test $enable_shared = "yes"; then
4989
Matthias Kloseb9621712010-04-24 17:59:49 +00004990$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004991
4992 case $ac_sys_system in
4993 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004994 LDLIBRARY='libpython$(LDVERSION).dll.a'
4995 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996 ;;
4997 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004998 LDLIBRARY='libpython$(LDVERSION).so'
4999 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5001 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005002 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005003 then
5004 PY3LIBRARY=libpython3.so
5005 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005007 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005008 LDLIBRARY='libpython$(LDVERSION).so'
5009 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5011 case $ac_sys_system in
5012 FreeBSD*)
5013 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5014 ;;
5015 esac
5016 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005017 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005018 then
5019 PY3LIBRARY=libpython3.so
5020 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021 ;;
5022 hp*|HP*)
5023 case `uname -m` in
5024 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005025 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026 ;;
5027 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005028 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029 ;;
5030 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005031 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5033 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005034 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005035 LDLIBRARY='libpython$(LDVERSION).dylib'
5036 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5038 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005039 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005040 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005041 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5042 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043
5044 esac
5045else # shared is disabled
5046 case $ac_sys_system in
5047 CYGWIN*)
5048 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005049 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005050 ;;
5051 esac
5052fi
5053
Matthias Kloseb9621712010-04-24 17:59:49 +00005054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5055$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056
5057if test -n "$ac_tool_prefix"; then
5058 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5059set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02005062if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064else
5065 if test -n "$RANLIB"; then
5066 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5067else
5068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069for as_dir in $PATH
5070do
5071 IFS=$as_save_IFS
5072 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5075 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077 break 2
5078 fi
5079done
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081IFS=$as_save_IFS
5082
5083fi
5084fi
5085RANLIB=$ac_cv_prog_RANLIB
5086if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5088$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005089else
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5091$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005092fi
5093
5094
5095fi
5096if test -z "$ac_cv_prog_RANLIB"; then
5097 ac_ct_RANLIB=$RANLIB
5098 # Extract the first word of "ranlib", so it can be a program name with args.
5099set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02005102if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104else
5105 if test -n "$ac_ct_RANLIB"; then
5106 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5107else
5108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005114 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5115 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005117 break 2
5118 fi
5119done
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005121IFS=$as_save_IFS
5122
5123fi
5124fi
5125ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5126if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5128$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129else
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132fi
5133
5134 if test "x$ac_ct_RANLIB" = x; then
5135 RANLIB=":"
5136 else
5137 case $cross_compiling:$ac_tool_warned in
5138yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141ac_tool_warned=yes ;;
5142esac
5143 RANLIB=$ac_ct_RANLIB
5144 fi
5145else
5146 RANLIB="$ac_cv_prog_RANLIB"
5147fi
5148
5149
5150for ac_prog in ar aal
5151do
5152 # Extract the first word of "$ac_prog", so it can be a program name with args.
5153set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5155$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02005156if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158else
5159 if test -n "$AR"; then
5160 ac_cv_prog_AR="$AR" # Let the user override the test.
5161else
5162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5163for as_dir in $PATH
5164do
5165 IFS=$as_save_IFS
5166 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5169 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005170 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171 break 2
5172 fi
5173done
Matthias Kloseb9621712010-04-24 17:59:49 +00005174 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005175IFS=$as_save_IFS
5176
5177fi
5178fi
5179AR=$ac_cv_prog_AR
5180if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5182$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183else
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5185$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186fi
5187
5188
5189 test -n "$AR" && break
5190done
5191test -n "$AR" || AR="ar"
5192
5193
5194# tweak ARFLAGS only if the user didn't set it on the command line
5195
5196if test -z "$ARFLAGS"
5197then
5198 ARFLAGS="rc"
5199fi
5200
5201
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005202DISABLE_ASDLGEN=""
5203# Extract the first word of "python", so it can be a program name with args.
5204set dummy python; ac_word=$2
5205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5206$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02005207if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005208 $as_echo_n "(cached) " >&6
5209else
5210 if test -n "$HAS_PYTHON"; then
5211 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5212else
5213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5214for as_dir in $PATH
5215do
5216 IFS=$as_save_IFS
5217 test -z "$as_dir" && as_dir=.
5218 for ac_exec_ext in '' $ac_executable_extensions; do
5219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5220 ac_cv_prog_HAS_PYTHON="found"
5221 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5222 break 2
5223 fi
5224done
5225 done
5226IFS=$as_save_IFS
5227
5228 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5229fi
5230fi
5231HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5232if test -n "$HAS_PYTHON"; then
5233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5234$as_echo "$HAS_PYTHON" >&6; }
5235else
5236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5237$as_echo "no" >&6; }
5238fi
5239
5240
5241if test $HAS_HG != found -o $HAS_PYTHON != found
5242then
5243 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5244fi
5245
5246
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005247case $MACHDEP in
5248bsdos*|hp*|HP*)
5249 # install -d does not work on BSDI or HP-UX
5250 if test -z "$INSTALL"
5251 then
5252 INSTALL="${srcdir}/install-sh -c"
5253 fi
5254esac
5255ac_aux_dir=
5256for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005257 if test -f "$ac_dir/install-sh"; then
5258 ac_aux_dir=$ac_dir
5259 ac_install_sh="$ac_aux_dir/install-sh -c"
5260 break
5261 elif test -f "$ac_dir/install.sh"; then
5262 ac_aux_dir=$ac_dir
5263 ac_install_sh="$ac_aux_dir/install.sh -c"
5264 break
5265 elif test -f "$ac_dir/shtool"; then
5266 ac_aux_dir=$ac_dir
5267 ac_install_sh="$ac_aux_dir/shtool install -c"
5268 break
5269 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005270done
5271if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005272 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273fi
5274
5275# These three variables are undocumented and unsupported,
5276# and are intended to be withdrawn in a future Autoconf release.
5277# They can cause serious problems if a builder's source tree is in a directory
5278# whose full name contains unusual characters.
5279ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5280ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5281ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5282
5283
5284# Find a good install program. We prefer a C program (faster),
5285# so one script is as good as another. But avoid the broken or
5286# incompatible versions:
5287# SysV /etc/install, /usr/sbin/install
5288# SunOS /usr/etc/install
5289# IRIX /sbin/install
5290# AIX /bin/install
5291# AmigaOS /C/install, which installs bootblocks on floppy discs
5292# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5293# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5294# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5295# OS/2's system install, which has a completely different semantic
5296# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005297# Reject install programs that cannot install multiple files.
5298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5299$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005300if test -z "$INSTALL"; then
Charles-François Natali47413c12011-10-06 19:47:44 +02005301if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005302 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303else
5304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5305for as_dir in $PATH
5306do
5307 IFS=$as_save_IFS
5308 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005309 # Account for people who put trailing slashes in PATH elements.
5310case $as_dir/ in #((
5311 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005313 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314 /usr/ucb/* ) ;;
5315 *)
5316 # OSF1 and SCO ODT 3.0 have their own names for install.
5317 # Don't use installbsd from OSF since it installs stuff as root
5318 # by default.
5319 for ac_prog in ginstall scoinst install; do
5320 for ac_exec_ext in '' $ac_executable_extensions; do
5321 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5322 if test $ac_prog = install &&
5323 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5324 # AIX install. It has an incompatible calling convention.
5325 :
5326 elif test $ac_prog = install &&
5327 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5328 # program-specific install script used by HP pwplus--don't use.
5329 :
5330 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005331 rm -rf conftest.one conftest.two conftest.dir
5332 echo one > conftest.one
5333 echo two > conftest.two
5334 mkdir conftest.dir
5335 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5336 test -s conftest.one && test -s conftest.two &&
5337 test -s conftest.dir/conftest.one &&
5338 test -s conftest.dir/conftest.two
5339 then
5340 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5341 break 3
5342 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343 fi
5344 fi
5345 done
5346 done
5347 ;;
5348esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005349
5350 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351IFS=$as_save_IFS
5352
Matthias Kloseb9621712010-04-24 17:59:49 +00005353rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005354
5355fi
5356 if test "${ac_cv_path_install+set}" = set; then
5357 INSTALL=$ac_cv_path_install
5358 else
5359 # As a last resort, use the slow shell script. Don't cache a
5360 # value for INSTALL within a source directory, because that will
5361 # break other packages using the cache if that directory is
5362 # removed, or if the value is a relative name.
5363 INSTALL=$ac_install_sh
5364 fi
5365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5367$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368
5369# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5370# It thinks the first close brace ends the variable substitution.
5371test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5372
5373test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5374
5375test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5376
5377
5378# Not every filesystem supports hard links
5379
5380if test -z "$LN" ; then
5381 case $ac_sys_system in
5382 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 *) LN=ln;;
5384 esac
5385fi
5386
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005387# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005388
5389ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005390
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5393$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394
5395# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005396if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 withval=$with_pydebug;
5398if test "$withval" != no
5399then
5400
Matthias Kloseb9621712010-04-24 17:59:49 +00005401$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5404$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005406 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005407else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5408$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409fi
5410else
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5412$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413fi
5414
5415
5416# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5417# merged with this chunk of code?
5418
5419# Optimizer/debugger flags
5420# ------------------------
5421# (The following bit of code is complicated enough - please keep things
5422# indented properly. Just pretend you're editing Python code. ;-)
5423
5424# There are two parallel sets of case statements below, one that checks to
5425# see if OPT was set and one that does BASECFLAGS setting based upon
5426# compiler and platform. BASECFLAGS tweaks need to be made even if the
5427# user set OPT.
5428
5429# tweak OPT based on compiler and platform, only if the user didn't set
5430# it on the command line
5431
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005432if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433then
5434 case $GCC in
5435 yes)
5436 if test "$CC" != 'g++' ; then
5437 STRICT_PROTO="-Wstrict-prototypes"
5438 fi
5439 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5440 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5441 WRAP="-fwrapv"
5442 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005443
5444 # Clang also needs -fwrapv
5445 if test "$CC" = "clang" ; then
5446 WRAP="-fwrapv"
5447 fi
5448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449 case $ac_cv_prog_cc_g in
5450 yes)
5451 if test "$Py_DEBUG" = 'true' ; then
5452 # Optimization messes up debuggers, so turn it off for
5453 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005454 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455 else
5456 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5457 fi
5458 ;;
5459 *)
5460 OPT="-O3 -Wall $STRICT_PROTO"
5461 ;;
5462 esac
5463 case $ac_sys_system in
5464 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5465 ;;
5466 esac
5467 ;;
5468
5469 *)
5470 OPT="-O"
5471 ;;
5472 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473fi
5474
5475
5476
5477# The -arch flags for universal builds on OSX
5478UNIVERSAL_ARCH_FLAGS=
5479
5480
5481# tweak BASECFLAGS based on compiler and platform
5482case $GCC in
5483yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005484 # Python doesn't violate C99 aliasing rules, but older versions of
5485 # GCC produce warnings for legal Python code. Enable
5486 # -fno-strict-aliasing on versions of GCC that support but produce
5487 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5489$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005490 ac_save_cc="$CC"
5491 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005492 save_CFLAGS="$CFLAGS"
Charles-François Natali47413c12011-10-06 19:47:44 +02005493 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005494 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005495else
Matthias Kloseb9621712010-04-24 17:59:49 +00005496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005498
Matthias Kloseb159a552010-04-25 21:00:44 +00005499
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005500int
5501main ()
5502{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005503
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005504 ;
5505 return 0;
5506}
Matthias Kloseb159a552010-04-25 21:00:44 +00005507
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005509if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005510
5511 CC="$ac_save_cc -fstrict-aliasing"
5512 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005514/* end confdefs.h. */
5515
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005516 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005517int
5518main ()
5519{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005520double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005521 ;
5522 return 0;
5523}
Matthias Kloseb159a552010-04-25 21:00:44 +00005524
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005526if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005527
5528 ac_cv_no_strict_aliasing=no
5529
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005530else
Matthias Kloseb159a552010-04-25 21:00:44 +00005531
5532 ac_cv_no_strict_aliasing=yes
5533
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005534fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005536
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005537else
Matthias Kloseb159a552010-04-25 21:00:44 +00005538
5539 ac_cv_no_strict_aliasing=no
5540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005543fi
5544
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005545 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5548$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005549 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550 then
5551 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5552 fi
5553
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5555$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5556 ac_save_cc="$CC"
5557 CC="$CC -Wunused-result -Werror"
5558 save_CFLAGS="$CFLAGS"
Charles-François Natali47413c12011-10-06 19:47:44 +02005559 if test "${ac_cv_disable_unused_result_warning+set}" = set; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005560 $as_echo_n "(cached) " >&6
5561else
5562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5563/* end confdefs.h. */
5564
5565
5566int
5567main ()
5568{
5569
5570 ;
5571 return 0;
5572}
5573
5574_ACEOF
5575if ac_fn_c_try_compile "$LINENO"; then :
5576
5577 ac_cv_disable_unused_result_warning=yes
5578
5579else
5580
5581 ac_cv_disable_unused_result_warning=no
5582
5583fi
5584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5585fi
5586
5587 CFLAGS="$save_CFLAGS"
5588 CC="$ac_save_cc"
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5590$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5591
5592 if test $ac_cv_disable_unused_result_warning = yes
5593 then
5594 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5595 fi
5596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5598 # support. Without this, treatment of subnormals doesn't follow
5599 # the standard.
5600 case $ac_sys_machine in
5601 alpha*)
5602 BASECFLAGS="$BASECFLAGS -mieee"
5603 ;;
5604 esac
5605
5606 case $ac_sys_system in
5607 SCO_SV*)
5608 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5609 ;;
5610 # is there any other compiler on Darwin besides gcc?
5611 Darwin*)
5612 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5613 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005614 if test "${CC}" = gcc
5615 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5617$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005618 case "${UNIVERSALSDK}" in
5619 */MacOSX10.4u.sdk)
5620 # Build using 10.4 SDK, force usage of gcc when the
5621 # compiler is gcc, otherwise the user will get very
5622 # confusing error messages when building on OSX 10.6
5623 CC=gcc-4.0
5624 CPP=cpp-4.0
5625 ;;
5626 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5628$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005629 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630
5631
5632 if test "${enable_universalsdk}"; then
5633 UNIVERSAL_ARCH_FLAGS=""
5634 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5635 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5636 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005637 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5639 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005640 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005641 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642
5643 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5644 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005645 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005646 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005648 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5649 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005650 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005651 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005652
5653 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5654 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005655 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005656 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005659 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 +00005660
5661 fi
5662
5663
Ronald Oussoren666028b2010-04-18 19:07:43 +00005664 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5665 if test "${UNIVERSALSDK}" != "/"
5666 then
5667 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5668 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005669 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 fi
5671 fi
5672
5673 # Calculate the right deployment target for this build.
5674 #
5675 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5676 if test ${cur_target} '>' 10.2; then
5677 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005678 if test ${enable_universalsdk}; then
5679 if test "${UNIVERSAL_ARCHS}" = "all"; then
5680 # Ensure that the default platform for a
5681 # 4-way universal build is OSX 10.5,
5682 # that's the first OS release where
5683 # 4-way builds make sense.
5684 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005685
5686 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5687 cur_target='10.5'
5688
5689 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5690 cur_target='10.5'
5691
5692 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5693 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005694 fi
5695 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005696 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005697 # On Intel macs default to a deployment
5698 # target of 10.4, that's the first OSX
5699 # release with Intel support.
5700 cur_target="10.4"
5701 fi
5702 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 fi
5704 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5705
5706 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5707 # environment with a value that is the same as what we'll use
5708 # in the Makefile to ensure that we'll get the same compiler
5709 # environment during configure and build time.
5710 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5711 export MACOSX_DEPLOYMENT_TARGET
5712 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5713
5714 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715 esac
5716 ;;
5717
5718*)
5719 case $ac_sys_system in
5720 OpenUNIX*|UnixWare*)
5721 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5722 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723 SCO_SV*)
5724 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5725 ;;
5726 esac
5727 ;;
5728esac
5729
5730if test "$Py_DEBUG" = 'true'; then
5731 :
5732else
5733 OPT="-DNDEBUG $OPT"
5734fi
5735
5736if test "$ac_arch_flags"
5737then
5738 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5739fi
5740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741# Check whether GCC supports PyArg_ParseTuple format
5742if test "$GCC" = "yes"
5743then
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5745$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746 save_CFLAGS=$CFLAGS
5747 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749/* end confdefs.h. */
5750
5751 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752int
5753main ()
5754{
5755
5756 ;
5757 return 0;
5758}
Matthias Kloseb159a552010-04-25 21:00:44 +00005759
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005761if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762
Matthias Kloseb159a552010-04-25 21:00:44 +00005763
Matthias Kloseb9621712010-04-24 17:59:49 +00005764$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
Matthias Kloseb159a552010-04-25 21:00:44 +00005766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005767$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769else
Matthias Kloseb159a552010-04-25 21:00:44 +00005770
5771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005772$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773
5774fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5776 CFLAGS=$save_CFLAGS
5777fi
5778
5779# On some compilers, pthreads are available without further options
5780# (e.g. MacOS X). On some of these systems, the compiler will not
5781# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5782# So we have to see first whether pthreads are available without
5783# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5785$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02005786if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005787 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788else
Matthias Kloseb9621712010-04-24 17:59:49 +00005789 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790 ac_cv_pthread_is_default=no
5791else
Matthias Kloseb9621712010-04-24 17:59:49 +00005792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793/* end confdefs.h. */
5794
5795#include <pthread.h>
5796
5797void* routine(void* p){return NULL;}
5798
5799int main(){
5800 pthread_t p;
5801 if(pthread_create(&p,NULL,routine,NULL)!=0)
5802 return 1;
5803 (void)pthread_detach(p);
5804 return 0;
5805}
5806
5807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005808if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809
5810 ac_cv_pthread_is_default=yes
5811 ac_cv_kthread=no
5812 ac_cv_pthread=no
5813
5814else
Matthias Kloseb9621712010-04-24 17:59:49 +00005815 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819fi
5820
5821
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822fi
5823
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5825$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826
5827
5828if test $ac_cv_pthread_is_default = yes
5829then
5830 ac_cv_kpthread=no
5831else
5832# -Kpthread, if available, provides the right #defines
5833# and linker options to make pthread_create available
5834# Some compilers won't report that they do not support -Kpthread,
5835# so we need to run a program to see whether it really made the
5836# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5838$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02005839if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005840 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841else
5842 ac_save_cc="$CC"
5843CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005844if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845 ac_cv_kpthread=no
5846else
Matthias Kloseb9621712010-04-24 17:59:49 +00005847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848/* end confdefs.h. */
5849
5850#include <pthread.h>
5851
5852void* routine(void* p){return NULL;}
5853
5854int main(){
5855 pthread_t p;
5856 if(pthread_create(&p,NULL,routine,NULL)!=0)
5857 return 1;
5858 (void)pthread_detach(p);
5859 return 0;
5860}
5861
5862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005863if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 ac_cv_kpthread=yes
5865else
Matthias Kloseb9621712010-04-24 17:59:49 +00005866 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870fi
5871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872CC="$ac_save_cc"
5873fi
5874
Matthias Kloseb9621712010-04-24 17:59:49 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5876$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
5878
5879if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5880then
5881# -Kthread, if available, provides the right #defines
5882# and linker options to make pthread_create available
5883# Some compilers won't report that they do not support -Kthread,
5884# so we need to run a program to see whether it really made the
5885# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5887$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02005888if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005889 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890else
5891 ac_save_cc="$CC"
5892CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005893if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 ac_cv_kthread=no
5895else
Matthias Kloseb9621712010-04-24 17:59:49 +00005896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897/* end confdefs.h. */
5898
5899#include <pthread.h>
5900
5901void* routine(void* p){return NULL;}
5902
5903int main(){
5904 pthread_t p;
5905 if(pthread_create(&p,NULL,routine,NULL)!=0)
5906 return 1;
5907 (void)pthread_detach(p);
5908 return 0;
5909}
5910
5911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005912if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ac_cv_kthread=yes
5914else
Matthias Kloseb9621712010-04-24 17:59:49 +00005915 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919fi
5920
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921CC="$ac_save_cc"
5922fi
5923
Matthias Kloseb9621712010-04-24 17:59:49 +00005924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5925$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926fi
5927
5928if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5929then
5930# -pthread, if available, provides the right #defines
5931# and linker options to make pthread_create available
5932# Some compilers won't report that they do not support -pthread,
5933# so we need to run a program to see whether it really made the
5934# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5936$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02005937if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005938 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939else
5940 ac_save_cc="$CC"
5941CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005942if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ac_cv_pthread=no
5944else
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946/* end confdefs.h. */
5947
5948#include <pthread.h>
5949
5950void* routine(void* p){return NULL;}
5951
5952int main(){
5953 pthread_t p;
5954 if(pthread_create(&p,NULL,routine,NULL)!=0)
5955 return 1;
5956 (void)pthread_detach(p);
5957 return 0;
5958}
5959
5960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005961if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ac_cv_pthread=yes
5963else
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968fi
5969
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970CC="$ac_save_cc"
5971fi
5972
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5974$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975fi
5976
5977# If we have set a CC compiler flag for thread support then
5978# check if it works for CXX, too.
5979ac_cv_cxx_thread=no
5980if test ! -z "$CXX"
5981then
Matthias Kloseb9621712010-04-24 17:59:49 +00005982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5983$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984ac_save_cxx="$CXX"
5985
5986if test "$ac_cv_kpthread" = "yes"
5987then
5988 CXX="$CXX -Kpthread"
5989 ac_cv_cxx_thread=yes
5990elif test "$ac_cv_kthread" = "yes"
5991then
5992 CXX="$CXX -Kthread"
5993 ac_cv_cxx_thread=yes
5994elif test "$ac_cv_pthread" = "yes"
5995then
5996 CXX="$CXX -pthread"
5997 ac_cv_cxx_thread=yes
5998fi
5999
6000if test $ac_cv_cxx_thread = yes
6001then
6002 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6003 $CXX -c conftest.$ac_ext 2>&5
6004 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6005 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6006 then
6007 ac_cv_cxx_thread=yes
6008 else
6009 ac_cv_cxx_thread=no
6010 fi
6011 rm -fr conftest*
6012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6014$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015fi
6016CXX="$ac_save_cxx"
6017
6018
6019# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6021$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006022if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024else
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026/* end confdefs.h. */
6027#include <stdlib.h>
6028#include <stdarg.h>
6029#include <string.h>
6030#include <float.h>
6031
6032int
6033main ()
6034{
6035
6036 ;
6037 return 0;
6038}
6039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006040if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 ac_cv_header_stdc=yes
6042else
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6046
6047if test $ac_cv_header_stdc = yes; then
6048 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050/* end confdefs.h. */
6051#include <string.h>
6052
6053_ACEOF
6054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 $EGREP "memchr" >/dev/null 2>&1; then :
6056
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057else
6058 ac_cv_header_stdc=no
6059fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006060rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061
6062fi
6063
6064if test $ac_cv_header_stdc = yes; then
6065 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067/* end confdefs.h. */
6068#include <stdlib.h>
6069
6070_ACEOF
6071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006072 $EGREP "free" >/dev/null 2>&1; then :
6073
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074else
6075 ac_cv_header_stdc=no
6076fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006077rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078
6079fi
6080
6081if test $ac_cv_header_stdc = yes; then
6082 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084 :
6085else
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087/* end confdefs.h. */
6088#include <ctype.h>
6089#include <stdlib.h>
6090#if ((' ' & 0x0FF) == 0x020)
6091# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6092# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6093#else
6094# define ISLOWER(c) \
6095 (('a' <= (c) && (c) <= 'i') \
6096 || ('j' <= (c) && (c) <= 'r') \
6097 || ('s' <= (c) && (c) <= 'z'))
6098# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6099#endif
6100
6101#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6102int
6103main ()
6104{
6105 int i;
6106 for (i = 0; i < 256; i++)
6107 if (XOR (islower (i), ISLOWER (i))
6108 || toupper (i) != TOUPPER (i))
6109 return 2;
6110 return 0;
6111}
6112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006113if ac_fn_c_try_run "$LINENO"; then :
6114
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115else
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6119 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120fi
6121
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122fi
6123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6125$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126if test $ac_cv_header_stdc = yes; then
6127
Matthias Kloseb9621712010-04-24 17:59:49 +00006128$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129
6130fi
6131
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006132for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006133fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006134ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006135sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006136unistd.h utime.h \
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006137sys/audioio.h sys/xattr.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006138sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006139sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6140sys/stat.h sys/termio.h sys/time.h \
6141sys/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 -07006142libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006143bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006144do :
6145 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6146ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006147if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006148 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006149#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006150_ACEOF
6151
6152fi
6153
Guido van Rossum627b2d71993-12-24 10:39:16 +00006154done
6155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006156ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006157for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006158 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6160$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006161if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006162 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006163else
Matthias Kloseb9621712010-04-24 17:59:49 +00006164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006165/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006166#include <sys/types.h>
6167#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006168
Martin v. Löwis11437992002-04-12 09:54:03 +00006169int
6170main ()
6171{
6172if ((DIR *) 0)
6173return 0;
6174 ;
6175 return 0;
6176}
6177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006179 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006180else
Matthias Kloseb9621712010-04-24 17:59:49 +00006181 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006185eval ac_res=\$$as_ac_Header
6186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6187$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006188if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006189 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006190#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006191_ACEOF
6192
6193ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006195
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006196done
6197# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6198if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6200$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006201if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006202 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006203else
Martin v. Löwis11437992002-04-12 09:54:03 +00006204 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006207
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006208/* Override any GCC internal prototype to avoid an error.
6209 Use char because int might match the return type of a GCC
6210 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006211#ifdef __cplusplus
6212extern "C"
6213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006214char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006215int
6216main ()
6217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006219 ;
6220 return 0;
6221}
6222_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223for ac_lib in '' dir; do
6224 if test -z "$ac_lib"; then
6225 ac_res="none required"
6226 else
6227 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006228 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006229 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006230 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006231 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006233rm -f core conftest.err conftest.$ac_objext \
6234 conftest$ac_exeext
Charles-François Natali47413c12011-10-06 19:47:44 +02006235 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006236 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238done
Charles-François Natali47413c12011-10-06 19:47:44 +02006239if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241else
6242 ac_cv_search_opendir=no
6243fi
6244rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006245LIBS=$ac_func_search_save_LIBS
6246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6248$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006250if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006252
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006253fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006254
Michael W. Hudson54241132001-12-07 15:38:26 +00006255else
Matthias Kloseb9621712010-04-24 17:59:49 +00006256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6257$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006258if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006260else
6261 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006265/* Override any GCC internal prototype to avoid an error.
6266 Use char because int might match the return type of a GCC
6267 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006268#ifdef __cplusplus
6269extern "C"
6270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006271char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006272int
6273main ()
6274{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006275return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006276 ;
6277 return 0;
6278}
6279_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006280for ac_lib in '' x; do
6281 if test -z "$ac_lib"; then
6282 ac_res="none required"
6283 else
6284 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006285 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006286 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006288 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006289fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006290rm -f core conftest.err conftest.$ac_objext \
6291 conftest$ac_exeext
Charles-François Natali47413c12011-10-06 19:47:44 +02006292 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006293 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006295done
Charles-François Natali47413c12011-10-06 19:47:44 +02006296if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006298else
6299 ac_cv_search_opendir=no
6300fi
6301rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006302LIBS=$ac_func_search_save_LIBS
6303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6305$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006306ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006307if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006308 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006309
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006310fi
6311
6312fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006313
Matthias Kloseb9621712010-04-24 17:59:49 +00006314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6315$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006316if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318else
Matthias Kloseb9621712010-04-24 17:59:49 +00006319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006320/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322int
6323main ()
6324{
6325return makedev(0, 0);
6326 ;
6327 return 0;
6328}
6329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006330if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331 ac_cv_header_sys_types_h_makedev=yes
6332else
Matthias Kloseb9621712010-04-24 17:59:49 +00006333 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006335rm -f core conftest.err conftest.$ac_objext \
6336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006337
6338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6340$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341
6342if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006343ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +02006344if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006345
Matthias Kloseb9621712010-04-24 17:59:49 +00006346$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006347
6348fi
6349
6350
6351
6352 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006353 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +02006354if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357
6358fi
6359
6360
6361 fi
6362fi
6363
Michael W. Hudson54241132001-12-07 15:38:26 +00006364
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006365# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6366for ac_header in net/if.h
6367do :
6368 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6369#ifdef STDC_HEADERS
6370# include <stdlib.h>
6371# include <stddef.h>
6372#else
6373# ifdef HAVE_STDLIB_H
6374# include <stdlib.h>
6375# endif
6376#endif
6377#ifdef HAVE_SYS_SOCKET_H
6378# include <sys/socket.h>
6379#endif
6380
6381"
Charles-François Natali47413c12011-10-06 19:47:44 +02006382if test "x$ac_cv_header_net_if_h" = x""yes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006383 cat >>confdefs.h <<_ACEOF
6384#define HAVE_NET_IF_H 1
6385_ACEOF
6386
6387fi
6388
6389done
6390
6391
6392
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006393# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006394for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006395do :
6396 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006397#ifdef HAVE_CURSES_H
6398#include <curses.h>
6399#endif
6400
Matthias Kloseb9621712010-04-24 17:59:49 +00006401"
Charles-François Natali47413c12011-10-06 19:47:44 +02006402if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006403 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006404#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006405_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006406
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006407fi
6408
6409done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006410
6411
Martin v. Löwis11017b12006-01-14 18:12:57 +00006412# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006413for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006414do :
6415 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 +00006416#ifdef HAVE_ASM_TYPES_H
6417#include <asm/types.h>
6418#endif
6419#ifdef HAVE_SYS_SOCKET_H
6420#include <sys/socket.h>
6421#endif
6422
Matthias Kloseb9621712010-04-24 17:59:49 +00006423"
Charles-François Natali47413c12011-10-06 19:47:44 +02006424if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006426#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427_ACEOF
6428
6429fi
6430
6431done
6432
6433
Charles-François Natali47413c12011-10-06 19:47:44 +02006434# On Linux, can.h and can/raw.h require sys/socket.h
6435for ac_header in linux/can.h linux/can/raw.h
6436do :
6437 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6438ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6439#ifdef HAVE_SYS_SOCKET_H
6440#include <sys/socket.h>
6441#endif
6442
6443"
6444if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6445 cat >>confdefs.h <<_ACEOF
6446#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6447_ACEOF
6448
6449fi
6450
6451done
6452
6453
Guido van Rossum627b2d71993-12-24 10:39:16 +00006454# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006455was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6457$as_echo_n "checking for clock_t in time.h... " >&6; }
6458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006459/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006461
6462_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006464 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006465 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006466else
Martin v. Löwis11437992002-04-12 09:54:03 +00006467
6468
Matthias Kloseb9621712010-04-24 17:59:49 +00006469$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006470
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006471
Guido van Rossum627b2d71993-12-24 10:39:16 +00006472fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006473rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474
Matthias Kloseb9621712010-04-24 17:59:49 +00006475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6476$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006477
Matthias Kloseb9621712010-04-24 17:59:49 +00006478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6479$as_echo_n "checking for makedev... " >&6; }
6480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006481/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006482
Jesus Cea740f53a2010-04-28 11:35:30 +00006483#if defined(MAJOR_IN_MKDEV)
6484#include <sys/mkdev.h>
6485#elif defined(MAJOR_IN_SYSMACROS)
6486#include <sys/sysmacros.h>
6487#else
6488#include <sys/types.h>
6489#endif
6490
Neal Norwitz11690112002-07-30 01:08:28 +00006491int
6492main ()
6493{
Jesus Cea740f53a2010-04-28 11:35:30 +00006494
6495 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006496 ;
6497 return 0;
6498}
Matthias Kloseb159a552010-04-25 21:00:44 +00006499
Neal Norwitz11690112002-07-30 01:08:28 +00006500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006501if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006502 ac_cv_has_makedev=yes
6503else
Matthias Kloseb9621712010-04-24 17:59:49 +00006504 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006506rm -f core conftest.err conftest.$ac_objext \
6507 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6509$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006510if test "$ac_cv_has_makedev" = "yes"; then
6511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006513
6514fi
6515
Martin v. Löwis399a6892002-10-04 10:22:02 +00006516# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6517# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6518# defined, but the compiler does not support pragma redefine_extname,
6519# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6520# structures (such as rlimit64) without declaring them. As a
6521# work-around, disable LFS on such configurations
6522
6523use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6525$as_echo_n "checking Solaris LFS bug... " >&6; }
6526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006527/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006528
6529#define _LARGEFILE_SOURCE 1
6530#define _FILE_OFFSET_BITS 64
6531#include <sys/resource.h>
6532
Martin v. Löwis399a6892002-10-04 10:22:02 +00006533int
6534main ()
6535{
6536struct rlimit foo;
6537 ;
6538 return 0;
6539}
6540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006541if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006542 sol_lfs_bug=no
6543else
Matthias Kloseb9621712010-04-24 17:59:49 +00006544 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6548$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006549if test "$sol_lfs_bug" = "yes"; then
6550 use_lfs=no
6551fi
6552
6553if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006554# Two defines needed to enable largefile support on various platforms
6555# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006556case $ac_sys_system/$ac_sys_release in
6557AIX*)
6558
6559$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6560
6561 ;;
6562esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006563
Matthias Kloseb9621712010-04-24 17:59:49 +00006564$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006565
6566
Matthias Kloseb9621712010-04-24 17:59:49 +00006567$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006568
Martin v. Löwis399a6892002-10-04 10:22:02 +00006569fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006570
Guido van Rossum84e7b241996-08-19 21:59:00 +00006571# Add some code to confdefs.h so that the test for off_t works on SCO
6572cat >> confdefs.h <<\EOF
6573#if defined(SCO_DS)
6574#undef _OFF_T
6575#endif
6576EOF
6577
Guido van Rossumef2255b2000-03-10 22:30:29 +00006578# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006579ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +02006580if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006581
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006582else
Martin v. Löwis11437992002-04-12 09:54:03 +00006583
6584cat >>confdefs.h <<_ACEOF
6585#define mode_t int
6586_ACEOF
6587
6588fi
6589
Matthias Kloseb9621712010-04-24 17:59:49 +00006590ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +02006591if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006592
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006593else
Martin v. Löwis11437992002-04-12 09:54:03 +00006594
6595cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006597_ACEOF
6598
6599fi
6600
Matthias Kloseb9621712010-04-24 17:59:49 +00006601ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +02006602if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006603
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006604else
Martin v. Löwis11437992002-04-12 09:54:03 +00006605
6606cat >>confdefs.h <<_ACEOF
6607#define pid_t int
6608_ACEOF
6609
6610fi
6611
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006612
Martin v. Löwis11437992002-04-12 09:54:03 +00006613cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006614#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006615_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006616
Matthias Kloseb9621712010-04-24 17:59:49 +00006617ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +02006618if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006619
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006620else
Martin v. Löwis11437992002-04-12 09:54:03 +00006621
6622cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006623#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006624_ACEOF
6625
6626fi
6627
Matthias Kloseb9621712010-04-24 17:59:49 +00006628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6629$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006630if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006631 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006632else
Matthias Kloseb9621712010-04-24 17:59:49 +00006633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006634/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006635#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006636
6637_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006639 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006640 ac_cv_type_uid_t=yes
6641else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006642 ac_cv_type_uid_t=no
6643fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006644rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6648$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006649if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006650
Matthias Kloseb9621712010-04-24 17:59:49 +00006651$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006652
6653
Matthias Kloseb9621712010-04-24 17:59:49 +00006654$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006655
6656fi
6657
Matthias Kloseb9621712010-04-24 17:59:49 +00006658ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6659case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006660 no|yes) ;; #(
6661 *)
6662
Matthias Kloseb9621712010-04-24 17:59:49 +00006663$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006664
6665
6666cat >>confdefs.h <<_ACEOF
6667#define uint32_t $ac_cv_c_uint32_t
6668_ACEOF
6669;;
6670 esac
6671
Matthias Kloseb9621712010-04-24 17:59:49 +00006672ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6673case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006674 no|yes) ;; #(
6675 *)
6676
Matthias Kloseb9621712010-04-24 17:59:49 +00006677$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006678
6679
6680cat >>confdefs.h <<_ACEOF
6681#define uint64_t $ac_cv_c_uint64_t
6682_ACEOF
6683;;
6684 esac
6685
Matthias Kloseb9621712010-04-24 17:59:49 +00006686ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6687case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006688 no|yes) ;; #(
6689 *)
6690
6691cat >>confdefs.h <<_ACEOF
6692#define int32_t $ac_cv_c_int32_t
6693_ACEOF
6694;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006695esac
6696
Matthias Kloseb9621712010-04-24 17:59:49 +00006697ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6698case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006699 no|yes) ;; #(
6700 *)
6701
6702cat >>confdefs.h <<_ACEOF
6703#define int64_t $ac_cv_c_int64_t
6704_ACEOF
6705;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006706esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006707
Matthias Kloseb9621712010-04-24 17:59:49 +00006708ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +02006709if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006710
Matthias Kloseb9621712010-04-24 17:59:49 +00006711$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006712
6713fi
6714
Jack Jansendd19cf82001-12-06 22:36:17 +00006715
Michael W. Hudson54241132001-12-07 15:38:26 +00006716# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006717# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006718# The cast to long int works around a bug in the HP C Compiler
6719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6721# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6723$as_echo_n "checking size of int... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006724if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006726else
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729else
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 if test "$ac_cv_type_int" = yes; then
6731 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006733as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natali47413c12011-10-06 19:47:44 +02006734See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006735 else
6736 ac_cv_sizeof_int=0
6737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6742$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006743
6744
6745
Martin v. Löwis11437992002-04-12 09:54:03 +00006746cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006747#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006748_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006749
6750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006751# The cast to long int works around a bug in the HP C Compiler
6752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6754# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6756$as_echo_n "checking size of long... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006757if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006759else
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006761
Martin v. Löwis11437992002-04-12 09:54:03 +00006762else
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 if test "$ac_cv_type_long" = yes; then
6764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006766as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natali47413c12011-10-06 19:47:44 +02006767See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006768 else
6769 ac_cv_sizeof_long=0
6770 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6775$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006776
6777
6778
Martin v. Löwis11437992002-04-12 09:54:03 +00006779cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006780#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006781_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006782
6783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006784# The cast to long int works around a bug in the HP C Compiler
6785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6787# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6789$as_echo_n "checking size of void *... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006790if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006792else
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006794
Martin v. Löwis11437992002-04-12 09:54:03 +00006795else
Matthias Kloseb9621712010-04-24 17:59:49 +00006796 if test "$ac_cv_type_void_p" = yes; then
6797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006799as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natali47413c12011-10-06 19:47:44 +02006800See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006801 else
6802 ac_cv_sizeof_void_p=0
6803 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006805
Martin v. Löwis11437992002-04-12 09:54:03 +00006806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6808$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006809
6810
6811
Martin v. Löwis11437992002-04-12 09:54:03 +00006812cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006813#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006814_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006815
6816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006817# The cast to long int works around a bug in the HP C Compiler
6818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6822$as_echo_n "checking size of short... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006823if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006824 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006825else
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006827
Martin v. Löwis11437992002-04-12 09:54:03 +00006828else
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 if test "$ac_cv_type_short" = yes; then
6830 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006832as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natali47413c12011-10-06 19:47:44 +02006833See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006834 else
6835 ac_cv_sizeof_short=0
6836 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006838
Martin v. Löwis11437992002-04-12 09:54:03 +00006839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6841$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006842
6843
6844
Martin v. Löwis11437992002-04-12 09:54:03 +00006845cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006846#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006847_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006848
6849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006850# The cast to long int works around a bug in the HP C Compiler
6851# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6852# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6853# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6855$as_echo_n "checking size of float... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006856if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006858else
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861else
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 if test "$ac_cv_type_float" = yes; then
6863 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6864$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006865as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natali47413c12011-10-06 19:47:44 +02006866See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867 else
6868 ac_cv_sizeof_float=0
6869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006871
Martin v. Löwis11437992002-04-12 09:54:03 +00006872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6874$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875
6876
6877
Martin v. Löwis11437992002-04-12 09:54:03 +00006878cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006879#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006880_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006881
6882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883# The cast to long int works around a bug in the HP C Compiler
6884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6886# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6888$as_echo_n "checking size of double... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006889if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006891else
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 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 +00006893
Martin v. Löwis11437992002-04-12 09:54:03 +00006894else
Matthias Kloseb9621712010-04-24 17:59:49 +00006895 if test "$ac_cv_type_double" = yes; then
6896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006898as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natali47413c12011-10-06 19:47:44 +02006899See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006900 else
6901 ac_cv_sizeof_double=0
6902 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006904
Martin v. Löwis11437992002-04-12 09:54:03 +00006905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6907$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908
6909
6910
Martin v. Löwis11437992002-04-12 09:54:03 +00006911cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006912#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006913_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006914
6915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006916# The cast to long int works around a bug in the HP C Compiler
6917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6919# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6921$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006922if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006924else
Matthias Kloseb9621712010-04-24 17:59:49 +00006925 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 +00006926
Martin v. Löwis11437992002-04-12 09:54:03 +00006927else
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 if test "$ac_cv_type_fpos_t" = yes; then
6929 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006931as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natali47413c12011-10-06 19:47:44 +02006932See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006933 else
6934 ac_cv_sizeof_fpos_t=0
6935 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006937
Martin v. Löwis11437992002-04-12 09:54:03 +00006938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6940$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006941
6942
6943
Martin v. Löwis11437992002-04-12 09:54:03 +00006944cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006945#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006946_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006947
Michael W. Hudson54241132001-12-07 15:38:26 +00006948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006949# The cast to long int works around a bug in the HP C Compiler
6950# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6951# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6952# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6954$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006955if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006956 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006957else
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 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 +00006959
Martin v. Löwis18e16552006-02-15 17:27:45 +00006960else
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 if test "$ac_cv_type_size_t" = yes; then
6962 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006964as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natali47413c12011-10-06 19:47:44 +02006965See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006966 else
6967 ac_cv_sizeof_size_t=0
6968 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006970
Martin v. Löwis18e16552006-02-15 17:27:45 +00006971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6973$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006974
6975
6976
Martin v. Löwis18e16552006-02-15 17:27:45 +00006977cat >>confdefs.h <<_ACEOF
6978#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6979_ACEOF
6980
6981
Christian Heimes400adb02008-02-01 08:12:03 +00006982# The cast to long int works around a bug in the HP C Compiler
6983# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6984# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6985# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6987$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02006988if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006989 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006990else
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 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 +00006992
Christian Heimes400adb02008-02-01 08:12:03 +00006993else
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 if test "$ac_cv_type_pid_t" = yes; then
6995 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006997as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natali47413c12011-10-06 19:47:44 +02006998See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006999 else
7000 ac_cv_sizeof_pid_t=0
7001 fi
7002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007003
Christian Heimes400adb02008-02-01 08:12:03 +00007004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7006$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007007
7008
7009
7010cat >>confdefs.h <<_ACEOF
7011#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7012_ACEOF
7013
7014
Michael W. Hudson54241132001-12-07 15:38:26 +00007015
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7017$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007018have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007020/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007021
Martin v. Löwis11437992002-04-12 09:54:03 +00007022int
7023main ()
7024{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007025long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007026 ;
7027 return 0;
7028}
7029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007030if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007031
7032
Matthias Kloseb9621712010-04-24 17:59:49 +00007033$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007034
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007035 have_long_long=yes
7036
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7040$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007041if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042# The cast to long int works around a bug in the HP C Compiler
7043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7045# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7047$as_echo_n "checking size of long long... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007048if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007050else
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 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 +00007052
Martin v. Löwis11437992002-04-12 09:54:03 +00007053else
Matthias Kloseb9621712010-04-24 17:59:49 +00007054 if test "$ac_cv_type_long_long" = yes; then
7055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007057as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natali47413c12011-10-06 19:47:44 +02007058See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007059 else
7060 ac_cv_sizeof_long_long=0
7061 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007063
Martin v. Löwis11437992002-04-12 09:54:03 +00007064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7066$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067
7068
7069
Martin v. Löwis11437992002-04-12 09:54:03 +00007070cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007071#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007072_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007073
Michael W. Hudson54241132001-12-07 15:38:26 +00007074
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007075fi
7076
Matthias Kloseb9621712010-04-24 17:59:49 +00007077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7078$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007079have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007081/* end confdefs.h. */
7082
7083int
7084main ()
7085{
7086long double x; x = (long double)0;
7087 ;
7088 return 0;
7089}
7090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007091if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007092
7093
Matthias Kloseb9621712010-04-24 17:59:49 +00007094$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007095
7096 have_long_double=yes
7097
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007098fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7101$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007102if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007103# The cast to long int works around a bug in the HP C Compiler
7104# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7105# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7106# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7108$as_echo_n "checking size of long double... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007109if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007111else
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 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 +00007113
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007114else
Matthias Kloseb9621712010-04-24 17:59:49 +00007115 if test "$ac_cv_type_long_double" = yes; then
7116 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7117$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007118as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natali47413c12011-10-06 19:47:44 +02007119See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007120 else
7121 ac_cv_sizeof_long_double=0
7122 fi
7123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007124
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7127$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007128
7129
7130
7131cat >>confdefs.h <<_ACEOF
7132#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7133_ACEOF
7134
7135
7136fi
7137
7138
Matthias Kloseb9621712010-04-24 17:59:49 +00007139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7140$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007141have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007143/* end confdefs.h. */
7144
7145int
7146main ()
7147{
7148_Bool x; x = (_Bool)0;
7149 ;
7150 return 0;
7151}
7152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007153if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007154
7155
Matthias Kloseb9621712010-04-24 17:59:49 +00007156$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007157
7158 have_c99_bool=yes
7159
Thomas Woutersb2137042007-02-01 18:02:27 +00007160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7163$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007164if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007165# The cast to long int works around a bug in the HP C Compiler
7166# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7167# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7168# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7170$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007171if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007172 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007173else
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 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 +00007175
Thomas Woutersb2137042007-02-01 18:02:27 +00007176else
Matthias Kloseb9621712010-04-24 17:59:49 +00007177 if test "$ac_cv_type__Bool" = yes; then
7178 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7179$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007180as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natali47413c12011-10-06 19:47:44 +02007181See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007182 else
7183 ac_cv_sizeof__Bool=0
7184 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007186
Thomas Woutersb2137042007-02-01 18:02:27 +00007187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7189$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007190
7191
7192
Thomas Woutersb2137042007-02-01 18:02:27 +00007193cat >>confdefs.h <<_ACEOF
7194#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7195_ACEOF
7196
7197
7198fi
7199
Matthias Kloseb9621712010-04-24 17:59:49 +00007200ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007201 #include <stdint.h>
7202 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007203 #ifdef HAVE_INTTYPES_H
7204 #include <inttypes.h>
7205 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007206"
Charles-François Natali47413c12011-10-06 19:47:44 +02007207if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007208
7209cat >>confdefs.h <<_ACEOF
7210#define HAVE_UINTPTR_T 1
7211_ACEOF
7212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007213# The cast to long int works around a bug in the HP C Compiler
7214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7216# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7218$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007219if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007221else
Matthias Kloseb9621712010-04-24 17:59:49 +00007222 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 +00007223
Martin v. Löwis11437992002-04-12 09:54:03 +00007224else
Matthias Kloseb9621712010-04-24 17:59:49 +00007225 if test "$ac_cv_type_uintptr_t" = yes; then
7226 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7227$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007228as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natali47413c12011-10-06 19:47:44 +02007229See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007230 else
7231 ac_cv_sizeof_uintptr_t=0
7232 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007234
Martin v. Löwis11437992002-04-12 09:54:03 +00007235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7237$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007238
7239
7240
Martin v. Löwis11437992002-04-12 09:54:03 +00007241cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007242#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007243_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007244
Michael W. Hudson54241132001-12-07 15:38:26 +00007245
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007246fi
7247
Thomas Wouters89f507f2006-12-13 04:49:30 +00007248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249# The cast to long int works around a bug in the HP C Compiler
7250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7252# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7254$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007255if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007257else
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259#ifdef HAVE_SYS_TYPES_H
7260#include <sys/types.h>
7261#endif
7262
Matthias Kloseb9621712010-04-24 17:59:49 +00007263"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265else
Matthias Kloseb9621712010-04-24 17:59:49 +00007266 if test "$ac_cv_type_off_t" = yes; then
7267 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007269as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natali47413c12011-10-06 19:47:44 +02007270See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007271 else
7272 ac_cv_sizeof_off_t=0
7273 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007275
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7278$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007279
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007280
7281
Martin v. Löwis11437992002-04-12 09:54:03 +00007282cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007283#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007284_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007285
Michael W. Hudson54241132001-12-07 15:38:26 +00007286
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007287
Matthias Kloseb9621712010-04-24 17:59:49 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7289$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007290if test "$have_long_long" = yes
7291then
7292if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007293 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007294
Matthias Kloseb9621712010-04-24 17:59:49 +00007295$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007296
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7298$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007299else
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7301$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007302fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007303else
Matthias Kloseb9621712010-04-24 17:59:49 +00007304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7305$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007306fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007307
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007308# The cast to long int works around a bug in the HP C Compiler
7309# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7310# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7311# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7313$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007314if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007318#ifdef HAVE_SYS_TYPES_H
7319#include <sys/types.h>
7320#endif
7321#ifdef HAVE_TIME_H
7322#include <time.h>
7323#endif
7324
Matthias Kloseb9621712010-04-24 17:59:49 +00007325"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007326
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007327else
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 if test "$ac_cv_type_time_t" = yes; then
7329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007331as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natali47413c12011-10-06 19:47:44 +02007332See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007333 else
7334 ac_cv_sizeof_time_t=0
7335 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007337
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7340$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007341
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007342
7343
Martin v. Löwis11437992002-04-12 09:54:03 +00007344cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007345#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007346_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007347
Michael W. Hudson54241132001-12-07 15:38:26 +00007348
7349
Trent Mick635f6fb2000-08-23 21:33:05 +00007350# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007351ac_save_cc="$CC"
7352if test "$ac_cv_kpthread" = "yes"
7353then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007354elif test "$ac_cv_kthread" = "yes"
7355then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007356elif test "$ac_cv_pthread" = "yes"
7357then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007358fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007359
Matthias Kloseb9621712010-04-24 17:59:49 +00007360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7361$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007362have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007364/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007365
7366 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007367int
7368main ()
7369{
Guido van Rossum12580492000-09-24 16:47:19 +00007370pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007371 ;
7372 return 0;
7373}
Matthias Kloseb159a552010-04-25 21:00:44 +00007374
Martin v. Löwis11437992002-04-12 09:54:03 +00007375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007376if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007377 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7381$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007382if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007383 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007384# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7385# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7386# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7388$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007389if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007393#ifdef HAVE_PTHREAD_H
7394#include <pthread.h>
7395#endif
7396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007398
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007399else
Matthias Kloseb9621712010-04-24 17:59:49 +00007400 if test "$ac_cv_type_pthread_t" = yes; then
7401 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7402$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007403as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natali47413c12011-10-06 19:47:44 +02007404See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007405 else
7406 ac_cv_sizeof_pthread_t=0
7407 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007409
Trent Mick635f6fb2000-08-23 21:33:05 +00007410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7412$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007413
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007414
7415
Martin v. Löwis11437992002-04-12 09:54:03 +00007416cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007417#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007418_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007419
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007420
Trent Mick635f6fb2000-08-23 21:33:05 +00007421fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007422CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007423
Michael W. Hudson54241132001-12-07 15:38:26 +00007424
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007425case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007426 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007427 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7428 ;;
7429 Darwin/*)
7430 OTHER_LIBTOOL_OPT=""
7431 ;;
7432esac
7433
7434
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007435ARCH_RUN_32BIT=""
7436
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007437case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007438 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007439 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7440 if test "${enable_universalsdk}"; then
7441 :
7442 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007443 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007444 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007445 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007446 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007447 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007448 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007449 if test ${gcc_version} '<' 4.0
7450 then
7451 LIBTOOL_CRUFT="-lcc_dynamic"
7452 else
7453 LIBTOOL_CRUFT=""
7454 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007456 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007457else
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007459/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007460
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007461 #include <unistd.h>
7462 int main(int argc, char*argv[])
7463 {
7464 if (sizeof(long) == 4) {
7465 return 0;
7466 } else {
7467 return 1;
7468 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007469 }
7470
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007472if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007473 ac_osx_32bit=yes
7474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007479fi
7480
7481
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007482 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007483 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007484 i386)
7485 MACOSX_DEFAULT_ARCH="i386"
7486 ;;
7487 ppc)
7488 MACOSX_DEFAULT_ARCH="ppc"
7489 ;;
7490 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007491 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007492 ;;
7493 esac
7494 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007495 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007496 i386)
7497 MACOSX_DEFAULT_ARCH="x86_64"
7498 ;;
7499 ppc)
7500 MACOSX_DEFAULT_ARCH="ppc64"
7501 ;;
7502 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007503 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007504 ;;
7505 esac
7506
7507 #ARCH_RUN_32BIT="true"
7508 fi
7509
7510 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007511 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007512 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007513esac
7514
Matthias Kloseb9621712010-04-24 17:59:49 +00007515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7516$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007517if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007518then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007519 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007521 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007522
Matthias Kloseb9621712010-04-24 17:59:49 +00007523$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7526$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007527 if test $enable_shared = "yes"
7528 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007529 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 +00007530 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007531else
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7533$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007534fi
7535
Matthias Kloseb9621712010-04-24 17:59:49 +00007536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7537$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007538case $ac_sys_system/$ac_sys_release in
7539 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007540
Matthias Kloseb9621712010-04-24 17:59:49 +00007541$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007542
Matthias Kloseb9621712010-04-24 17:59:49 +00007543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7544$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007545 ;;
7546 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7548$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007549 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007550esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007551
Guido van Rossum0a516c91994-09-12 10:58:40 +00007552# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007553
Michael W. Hudson54241132001-12-07 15:38:26 +00007554
7555
7556
7557
Benjamin Peterson99f03762010-04-11 22:15:28 +00007558
Thomas Wouters477c8d52006-05-27 19:21:47 +00007559
Georg Brandlb1441c72009-01-03 22:33:39 +00007560
Thomas Wouters477c8d52006-05-27 19:21:47 +00007561cat >>confdefs.h <<_ACEOF
7562#define SHLIB_EXT "$SO"
7563_ACEOF
7564
Guido van Rossum0a516c91994-09-12 10:58:40 +00007565# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007566# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007567# (Shared libraries in this instance are shared modules to be loaded into
7568# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7570$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007571if test -z "$LDSHARED"
7572then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007573 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007574 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007575 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007576 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007577 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007578 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007579 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007580 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007581 if test "$GCC" = "yes" ; then
7582 LDSHARED='$(CC) -shared'
7583 LDCXXSHARED='$(CXX) -shared'
7584 else
7585 LDSHARED='$(CC) -G'
7586 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007587 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007588 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007589 if test "$GCC" = "yes" ; then
7590 LDSHARED='$(CC) -shared'
7591 LDCXXSHARED='$(CXX) -shared'
7592 else
7593 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007594 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007595 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007596 LDSHARED='$(CC) -bundle'
7597 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007598 if test "$enable_framework" ; then
7599 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007600 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7601 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007602 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007603 else
7604 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007605 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007606 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007607 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007608 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007609 LDSHARED='$(CC) -bundle'
7610 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007611 if test "$enable_framework" ; then
7612 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007613 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7614 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007615 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007616 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007617 # No framework, use the Python app as bundle-loader
7618 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007619 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007620 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007621 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007622 Darwin/*)
7623 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7624 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007625
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007626 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007627 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007628 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007629 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007630 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007631 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7632 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007633 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007634 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007635 LDSHARED='$(CC) -bundle'
7636 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007637 if test "$enable_framework" ; then
7638 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007639 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7640 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007641 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007642 else
7643 # No framework, use the Python app as bundle-loader
7644 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7645 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007646 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007647 fi
7648 fi
7649 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007650 Linux*|GNU*|QNX*)
7651 LDSHARED='$(CC) -shared'
7652 LDCXXSHARED='$(CXX) -shared';;
7653 BSD/OS*/4*)
7654 LDSHARED="gcc -shared"
7655 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007656 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007657 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007658 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007659 LDSHARED='$(CC) -shared'
7660 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007661 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007662 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007663 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007664 OpenBSD*)
7665 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7666 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007667 LDSHARED='$(CC) -shared $(CCSHARED)'
7668 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007669 else
7670 case `uname -r` in
7671 [01].* | 2.[0-7] | 2.[0-7].*)
7672 LDSHARED="ld -Bshareable ${LDFLAGS}"
7673 ;;
7674 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007675 LDSHARED='$(CC) -shared $(CCSHARED)'
7676 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007677 ;;
7678 esac
7679 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007680 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007681 LDSHARED='$(CC) -shared'
7682 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007683 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007684 if test "$GCC" = "yes" ; then
7685 LDSHARED='$(CC) -shared'
7686 LDCXXSHARED='$(CXX) -shared'
7687 else
7688 LDSHARED='$(CC) -G'
7689 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007690 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007691 SCO_SV*)
7692 LDSHARED='$(CC) -Wl,-G,-Bexport'
7693 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7694 CYGWIN*)
7695 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7696 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007697 *) LDSHARED="ld";;
7698 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7701$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007702LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007703BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007704# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007705# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7707$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007708if test -z "$CCSHARED"
7709then
Guido van Rossum07397971997-04-29 21:49:50 +00007710 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007711 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007712 then CCSHARED="-fPIC";
7713 elif test `uname -p` = sparc;
7714 then CCSHARED="-xcode=pic32";
7715 else CCSHARED="-Kpic";
7716 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007717 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007718 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007719 else CCSHARED="+z";
7720 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007721 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007722 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007723 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007724 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007725 if test "$GCC" = "yes"
7726 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007727 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007728 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007729 SCO_SV*)
7730 if test "$GCC" = "yes"
7731 then CCSHARED="-fPIC"
7732 else CCSHARED="-Kpic -belf"
7733 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007734 IRIX*/6*) case $CC in
7735 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007736 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007737 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007738 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7741$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007742# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007743# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7745$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007746if test -z "$LINKFORSHARED"
7747then
Guido van Rossum07397971997-04-29 21:49:50 +00007748 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007749 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007750 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007751 LINKFORSHARED="-Wl,-E -Wl,+s";;
7752# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007753 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007754 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007755 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007757 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007758 if test "$enable_framework"
7759 then
Jack Jansenda49e192005-01-07 13:08:22 +00007760 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007761 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007762 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007763 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007764 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007765 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007766 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007767 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7768 then
7769 LINKFORSHARED="-Wl,--export-dynamic"
7770 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007771 SunOS/5*) case $CC in
7772 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007773 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007774 then
7775 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007776 fi;;
7777 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007778 CYGWIN*)
7779 if test $enable_shared = "no"
7780 then
7781 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7782 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007783 QNX*)
7784 # -Wl,-E causes the symbols to be added to the dynamic
7785 # symbol table so that they can be found when a module
7786 # is loaded. -N 2048K causes the stack size to be set
7787 # to 2048 kilobytes so that the stack doesn't overflow
7788 # when running test_compile.py.
7789 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007790 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7793$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007794
Michael W. Hudson54241132001-12-07 15:38:26 +00007795
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007796
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7798$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007799if test ! "$LIBRARY" = "$LDLIBRARY"
7800then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007801 case $ac_sys_system in
7802 CYGWIN*)
7803 # Cygwin needs CCSHARED when building extension DLLs
7804 # but not when building the interpreter DLL.
7805 CFLAGSFORSHARED='';;
7806 *)
7807 CFLAGSFORSHARED='$(CCSHARED)'
7808 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7811$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007812
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007813# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7814# library (with --enable-shared).
7815# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007816# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7817# if it is not required, since it creates a dependency of the shared library
7818# to LIBS. This, in turn, means that applications linking the shared libpython
7819# don't need to link LIBS explicitly. The default should be only changed
7820# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007821
Matthias Kloseb9621712010-04-24 17:59:49 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7823$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007824case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007825 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007826 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007827esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7829$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007830
7831
Guido van Rossum627b2d71993-12-24 10:39:16 +00007832# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7834$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007835if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007836 $as_echo_n "(cached) " >&6
7837else
7838 ac_check_lib_save_LIBS=$LIBS
7839LIBS="-lsendfile $LIBS"
7840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7841/* end confdefs.h. */
7842
7843/* Override any GCC internal prototype to avoid an error.
7844 Use char because int might match the return type of a GCC
7845 builtin and then its argument prototype would still apply. */
7846#ifdef __cplusplus
7847extern "C"
7848#endif
7849char sendfile ();
7850int
7851main ()
7852{
7853return sendfile ();
7854 ;
7855 return 0;
7856}
7857_ACEOF
7858if ac_fn_c_try_link "$LINENO"; then :
7859 ac_cv_lib_sendfile_sendfile=yes
7860else
7861 ac_cv_lib_sendfile_sendfile=no
7862fi
7863rm -f core conftest.err conftest.$ac_objext \
7864 conftest$ac_exeext conftest.$ac_ext
7865LIBS=$ac_check_lib_save_LIBS
7866fi
7867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7868$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007869if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007870 cat >>confdefs.h <<_ACEOF
7871#define HAVE_LIBSENDFILE 1
7872_ACEOF
7873
7874 LIBS="-lsendfile $LIBS"
7875
7876fi
7877
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7879$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007880if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007882else
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007884LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888/* Override any GCC internal prototype to avoid an error.
7889 Use char because int might match the return type of a GCC
7890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007891#ifdef __cplusplus
7892extern "C"
7893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007894char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007895int
7896main ()
7897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ;
7900 return 0;
7901}
7902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007903if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007905else
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007908rm -f core conftest.err conftest.$ac_objext \
7909 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007910LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7913$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007914if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 cat >>confdefs.h <<_ACEOF
7916#define HAVE_LIBDL 1
7917_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007918
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007919 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007921fi
7922 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7924$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007925if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007927else
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007929LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933/* Override any GCC internal prototype to avoid an error.
7934 Use char because int might match the return type of a GCC
7935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007936#ifdef __cplusplus
7937extern "C"
7938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007939char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007940int
7941main ()
7942{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 ;
7945 return 0;
7946}
7947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007950else
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953rm -f core conftest.err conftest.$ac_objext \
7954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007955LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7958$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007959if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 cat >>confdefs.h <<_ACEOF
7961#define HAVE_LIBDLD 1
7962_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007963
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007964 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007966fi
7967 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007968
Georg Brandlb1441c72009-01-03 22:33:39 +00007969# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007970if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7972$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02007973if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007975else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007976 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980/* Override any GCC internal prototype to avoid an error.
7981 Use char because int might match the return type of a GCC
7982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007983#ifdef __cplusplus
7984extern "C"
7985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007986char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007987int
7988main ()
7989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ;
7992 return 0;
7993}
7994_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995for ac_lib in '' pthread rt posix4; do
7996 if test -z "$ac_lib"; then
7997 ac_res="none required"
7998 else
7999 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008000 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008005rm -f core conftest.err conftest.$ac_objext \
8006 conftest$ac_exeext
Charles-François Natali47413c12011-10-06 19:47:44 +02008007 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010done
Charles-François Natali47413c12011-10-06 19:47:44 +02008011if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013else
8014 ac_cv_search_sem_init=no
8015fi
8016rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008017LIBS=$ac_func_search_save_LIBS
8018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8020$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008022if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008024
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008025fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008026 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008027 # posix4 on Solaris 2.6
8028 # pthread (first!) on Linux
8029fi
8030
Martin v. Löwis19d17342003-06-14 21:03:05 +00008031# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8033$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008034if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008036else
8037 ac_check_lib_save_LIBS=$LIBS
8038LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008040/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042/* Override any GCC internal prototype to avoid an error.
8043 Use char because int might match the return type of a GCC
8044 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008045#ifdef __cplusplus
8046extern "C"
8047#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008048char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008049int
8050main ()
8051{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008053 ;
8054 return 0;
8055}
8056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008058 ac_cv_lib_intl_textdomain=yes
8059else
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008062rm -f core conftest.err conftest.$ac_objext \
8063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008064LIBS=$ac_check_lib_save_LIBS
8065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8067$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008068if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008069
Matthias Kloseb9621712010-04-24 17:59:49 +00008070$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008071
Brett Cannonc6d936e2009-06-07 20:09:53 +00008072 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008073fi
8074
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008075
8076# checks for system dependent C++ extensions support
8077case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8079$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008081/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008082
Georg Brandl59e87bd2011-02-15 19:48:59 +00008083 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008084int
8085main ()
8086{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008087loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ;
8089 return 0;
8090}
Matthias Kloseb159a552010-04-25 21:00:44 +00008091
Martin v. Löwis11437992002-04-12 09:54:03 +00008092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008093if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008094
Matthias Kloseb159a552010-04-25 21:00:44 +00008095
Matthias Kloseb9621712010-04-24 17:59:49 +00008096$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008097
Matthias Kloseb159a552010-04-25 21:00:44 +00008098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008099$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008100
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008101else
Matthias Kloseb159a552010-04-25 21:00:44 +00008102
8103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008104$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008105
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008107rm -f core conftest.err conftest.$ac_objext \
8108 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008109 *) ;;
8110esac
8111
Guido van Rossum70c7f481998-03-26 18:44:10 +00008112# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8114$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008115if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008116 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008117else
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008119LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123/* Override any GCC internal prototype to avoid an error.
8124 Use char because int might match the return type of a GCC
8125 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008126#ifdef __cplusplus
8127extern "C"
8128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008129char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008130int
8131main ()
8132{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008134 ;
8135 return 0;
8136}
8137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008140else
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008143rm -f core conftest.err conftest.$ac_objext \
8144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008145LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8148$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008149if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008150 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008151fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008152 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8154$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008155if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008157else
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008159LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163/* Override any GCC internal prototype to avoid an error.
8164 Use char because int might match the return type of a GCC
8165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008166#ifdef __cplusplus
8167extern "C"
8168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008169char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008170int
8171main ()
8172{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 ;
8175 return 0;
8176}
8177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008178if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008179 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008180else
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008183rm -f core conftest.err conftest.$ac_objext \
8184 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008185LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8188$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008189if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008190 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008191fi
8192 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8195$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008198if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8201$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008202LIBS="$withval $LIBS"
8203
8204else
Matthias Kloseb9621712010-04-24 17:59:49 +00008205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207fi
8208
Guido van Rossum7f43da71994-08-01 12:15:30 +00008209
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008210if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008211 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8212set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008215if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008217else
8218 case $PKG_CONFIG in
8219 [\\/]* | ?:[\\/]*)
8220 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8221 ;;
8222 *)
8223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226 IFS=$as_save_IFS
8227 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008229 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8230 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008232 break 2
8233 fi
8234done
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008236IFS=$as_save_IFS
8237
8238 ;;
8239esac
8240fi
8241PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8242if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8244$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008245else
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8247$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008248fi
8249
8250
8251fi
8252if test -z "$ac_cv_path_PKG_CONFIG"; then
8253 ac_pt_PKG_CONFIG=$PKG_CONFIG
8254 # Extract the first word of "pkg-config", so it can be a program name with args.
8255set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8257$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008258if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008260else
8261 case $ac_pt_PKG_CONFIG in
8262 [\\/]* | ?:[\\/]*)
8263 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8264 ;;
8265 *)
8266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8267for as_dir in $PATH
8268do
8269 IFS=$as_save_IFS
8270 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008272 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8273 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008275 break 2
8276 fi
8277done
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008279IFS=$as_save_IFS
8280
8281 ;;
8282esac
8283fi
8284ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8285if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8287$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008288else
Matthias Kloseb9621712010-04-24 17:59:49 +00008289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8290$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008291fi
8292
8293 if test "x$ac_pt_PKG_CONFIG" = x; then
8294 PKG_CONFIG=""
8295 else
8296 case $cross_compiling:$ac_tool_warned in
8297yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008298{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8299$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008300ac_tool_warned=yes ;;
8301esac
8302 PKG_CONFIG=$ac_pt_PKG_CONFIG
8303 fi
8304else
8305 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8306fi
8307
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008308
8309# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8311$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008312
8313# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008314if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008315 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008316else
8317 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008318fi
8319
8320
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8322$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008323
8324# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8326$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008327
8328# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008329if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008330 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008331else
8332 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008333fi
8334
8335
8336if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008337 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8338else
8339 LIBFFI_INCLUDEDIR=""
8340fi
8341
8342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8344$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008345
Benjamin Peterson076ed002010-10-31 17:11:02 +00008346# Check for support for loadable sqlite extensions
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8348$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8349# Check whether --enable-loadable-sqlite-extensions was given.
8350if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8351 enableval=$enable_loadable_sqlite_extensions;
8352else
8353 enable_loadable_sqlite_extensions="no"
8354fi
8355
8356
8357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8358$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8359
Matthias Klose55708cc2009-04-30 08:06:49 +00008360# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8362$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008363
8364# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008366 withval=$with_dbmliborder;
8367if test x$with_dbmliborder = xyes
8368then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008369as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008370else
8371 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8372 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8373 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008374 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008375 fi
8376 done
8377fi
8378fi
8379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8381$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008382
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008383# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008384
8385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8387$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008390if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391 withval=$with_signal_module;
8392fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008393
8394
8395if test -z "$with_signal_module"
8396then with_signal_module="yes"
8397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8399$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008400
8401if test "${with_signal_module}" = "yes"; then
8402 USE_SIGNAL_MODULE=""
8403 SIGNAL_OBJS=""
8404else
8405 USE_SIGNAL_MODULE="#"
8406 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8407fi
8408
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008409# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008410
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008411USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413
Martin v. Löwis11437992002-04-12 09:54:03 +00008414
8415# Templates for things AC_DEFINEd more than once.
8416# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008417
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8421$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008424if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425 withval=$with_threads;
8426fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008427
8428
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008429# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008432if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433 withval=$with_thread; with_threads=$with_thread
8434fi
8435
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008436
8437if test -z "$with_threads"
8438then with_threads="yes"
8439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8441$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008442
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008443
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008444if test "$with_threads" = "no"
8445then
8446 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008447elif test "$ac_cv_pthread_is_default" = yes
8448then
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008450
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008451 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008453
8454 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008455 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008456elif test "$ac_cv_kpthread" = "yes"
8457then
8458 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008459 if test "$ac_cv_cxx_thread" = "yes"; then
8460 CXX="$CXX -Kpthread"
8461 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008463
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008464 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008465 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008466elif test "$ac_cv_kthread" = "yes"
8467then
8468 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008469 if test "$ac_cv_cxx_thread" = "yes"; then
8470 CXX="$CXX -Kthread"
8471 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008473
8474 posix_threads=yes
8475 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008476elif test "$ac_cv_pthread" = "yes"
8477then
8478 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008479 if test "$ac_cv_cxx_thread" = "yes"; then
8480 CXX="$CXX -pthread"
8481 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008483
8484 posix_threads=yes
8485 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008486else
8487 if test ! -z "$with_threads" -a -d "$with_threads"
8488 then LDFLAGS="$LDFLAGS -L$with_threads"
8489 fi
8490 if test ! -z "$withval" -a -d "$withval"
8491 then LDFLAGS="$LDFLAGS -L$withval"
8492 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008493
8494 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008495 # define _POSIX_THREADS in unistd.h. Some apparently don't
8496 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8498$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008500/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008501
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008502#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008503#ifdef _POSIX_THREADS
8504yes
8505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008506
8507_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008510 unistd_defines_pthreads=yes
8511else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008512 unistd_defines_pthreads=no
8513fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008514rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008515
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8517$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008518
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008520
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008521 # Just looking for pthread_create in libpthread is not enough:
8522 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8523 # So we really have to include pthread.h, and then link.
8524 _libs=$LIBS
8525 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8527$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008529/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008530#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008531
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008532void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008533int
8534main ()
8535{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008536
8537pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 ;
8539 return 0;
8540}
8541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008542if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008543
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8545$as_echo "yes" >&6; }
8546 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008547
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008548 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008549 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008550else
Martin v. Löwis11437992002-04-12 09:54:03 +00008551
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008552 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natali47413c12011-10-06 19:47:44 +02008554if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008556
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008557 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008558 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008559else
Guido van Rossumad678af1998-10-02 14:42:15 +00008560
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8562$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008563if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008565else
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008567LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571/* Override any GCC internal prototype to avoid an error.
8572 Use char because int might match the return type of a GCC
8573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008574#ifdef __cplusplus
8575extern "C"
8576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008577char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008578int
8579main ()
8580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 ;
8583 return 0;
8584}
8585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008586if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591rm -f core conftest.err conftest.$ac_objext \
8592 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008593LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8596$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008597if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008599
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008600 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008601 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008602 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008603else
Greg Steinadf63d62000-07-05 10:38:09 +00008604
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8606$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008607if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008609else
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008611LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615/* Override any GCC internal prototype to avoid an error.
8616 Use char because int might match the return type of a GCC
8617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008618#ifdef __cplusplus
8619extern "C"
8620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008621char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008622int
8623main ()
8624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 ;
8627 return 0;
8628}
8629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008630if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635rm -f core conftest.err conftest.$ac_objext \
8636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008637LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8640$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008641if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008643
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008644 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008645 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008646 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008647else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008648
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8650$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008651if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008653else
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008655LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659/* Override any GCC internal prototype to avoid an error.
8660 Use char because int might match the return type of a GCC
8661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008662#ifdef __cplusplus
8663extern "C"
8664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008665char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008666int
8667main ()
8668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ;
8671 return 0;
8672}
8673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008676else
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679rm -f core conftest.err conftest.$ac_objext \
8680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008681LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8684$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008685if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008687
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008688 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008689 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008690 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008691else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008692
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8694$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008695if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008697else
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008699LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703/* Override any GCC internal prototype to avoid an error.
8704 Use char because int might match the return type of a GCC
8705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008706#ifdef __cplusplus
8707extern "C"
8708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008709char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008710int
8711main ()
8712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ;
8715 return 0;
8716}
8717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723rm -f core conftest.err conftest.$ac_objext \
8724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008725LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8728$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008729if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008731
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008732 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008733 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008734 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008735else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008736
Martin v. Löwis130fb172001-07-19 11:00:41 +00008737 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008738fi
8739
Guido van Rossum627b2d71993-12-24 10:39:16 +00008740
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008741fi
8742
Guido van Rossum0be3e491997-05-22 20:33:33 +00008743fi
8744
Guido van Rossum49545951997-12-02 19:28:29 +00008745fi
8746
Guido van Rossumb93a8621998-05-07 13:27:32 +00008747fi
8748
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008750rm -f core conftest.err conftest.$ac_objext \
8751 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008752
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8754$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008755if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008757else
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008759LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763/* Override any GCC internal prototype to avoid an error.
8764 Use char because int might match the return type of a GCC
8765 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008766#ifdef __cplusplus
8767extern "C"
8768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008769char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008770int
8771main ()
8772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ;
8775 return 0;
8776}
8777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008778if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783rm -f core conftest.err conftest.$ac_objext \
8784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008785LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8788$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008789if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008791
Martin v. Löwis130fb172001-07-19 11:00:41 +00008792 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008793 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008794 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008795fi
8796
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008797
Neal Norwitza978ab02002-11-02 16:58:05 +00008798 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8800$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008801if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008803else
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008805LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809/* Override any GCC internal prototype to avoid an error.
8810 Use char because int might match the return type of a GCC
8811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008812#ifdef __cplusplus
8813extern "C"
8814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008815char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008816int
8817main ()
8818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008820 ;
8821 return 0;
8822}
8823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008824if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008825 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008826else
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829rm -f core conftest.err conftest.$ac_objext \
8830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008831LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8834$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008835if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008837
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008838 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008839 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008840 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008841fi
8842
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008843 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008844fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008845
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008846if test "$posix_threads" = "yes"; then
8847 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850
8851 fi
8852
8853 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8854 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008855 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008856$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008857
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008858 ;;
8859 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008860$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008861
8862 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008863 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008864$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008865
8866 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008867 esac
8868
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8870$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02008871 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008873else
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008875 ac_cv_pthread_system_supported=no
8876else
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008878/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008879#include <pthread.h>
8880 void *foo(void *parm) {
8881 return NULL;
8882 }
8883 main() {
8884 pthread_attr_t attr;
8885 pthread_t id;
8886 if (pthread_attr_init(&attr)) exit(-1);
8887 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8888 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8889 exit(0);
8890 }
8891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008892if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008893 ac_cv_pthread_system_supported=yes
8894else
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008899fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901
Guido van Rossum627b2d71993-12-24 10:39:16 +00008902fi
8903
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8905$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008906 if test "$ac_cv_pthread_system_supported" = "yes"; then
8907
Matthias Kloseb9621712010-04-24 17:59:49 +00008908$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008909
8910 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 for ac_func in pthread_sigmask
8912do :
8913 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natali47413c12011-10-06 19:47:44 +02008914if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008915 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008916#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008917_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008918 case $ac_sys_system in
8919 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008920
Matthias Kloseb9621712010-04-24 17:59:49 +00008921$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008922
8923 ;;
8924 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008925fi
8926done
8927
8928fi
8929
8930
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008932
Matthias Kloseb9621712010-04-24 17:59:49 +00008933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8934$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008935# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008936if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008938 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8940$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941 ipv6=no
8942 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8944$as_echo "yes" >&6; }
8945 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946
8947 ipv6=yes
8948 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950else
Martin v. Löwis11437992002-04-12 09:54:03 +00008951
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008953
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956 ipv6=no
8957
8958else
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008960/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961 /* AF_INET6 available check */
8962#include <sys/types.h>
8963#include <sys/socket.h>
8964main()
8965{
8966 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8967 exit(1);
8968 else
8969 exit(0);
8970}
8971
Martin v. Löwis11437992002-04-12 09:54:03 +00008972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008973if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008974
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8976$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979else
Matthias Kloseb159a552010-04-25 21:00:44 +00008980
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8982$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
8989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008991if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8993$as_echo_n "checking if RFC2553 API is available... " >&6; }
8994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008996
8997 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008998#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008999int
9000main ()
9001{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009002struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009003 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 ;
9005 return 0;
9006}
Matthias Kloseb159a552010-04-25 21:00:44 +00009007
Martin v. Löwis11437992002-04-12 09:54:03 +00009008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009009if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009010
9011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009012$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009013 ipv6=yes
9014
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009015else
Matthias Kloseb159a552010-04-25 21:00:44 +00009016
9017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009018$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009019 ipv6=no
9020
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009023fi
9024
9025if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009027
9028fi
9029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009030fi
9031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032
9033ipv6type=unknown
9034ipv6lib=none
9035ipv6trylibc=no
9036
9037if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9039$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009040 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9041 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042 case $i in
9043 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009045/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047#include <netinet/in.h>
9048#ifdef IPV6_INRIA_VERSION
9049yes
9050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009051_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009054 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009056rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057
9058 ;;
9059 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009061/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009062
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063#include <netinet/in.h>
9064#ifdef __KAME__
9065yes
9066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009067_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070 ipv6type=$i;
9071 ipv6lib=inet6
9072 ipv6libdir=/usr/local/v6/lib
9073 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009075rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076
9077 ;;
9078 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009080/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009081
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009082#include <features.h>
9083#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9084yes
9085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009086_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089 ipv6type=$i;
9090 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009092rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093
9094 ;;
9095 linux-inet6)
9096 if test -d /usr/inet6; then
9097 ipv6type=$i
9098 ipv6lib=inet6
9099 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009100 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009101 fi
9102 ;;
9103 solaris)
9104 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009105 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106 ipv6type=$i
9107 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108 fi
9109 fi
9110 ;;
9111 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009113/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009114
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009115#include <sys/param.h>
9116#ifdef _TOSHIBA_INET6
9117yes
9118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009119_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122 ipv6type=$i;
9123 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009124 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009126rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009127
9128 ;;
9129 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009131/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009132
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009133#include </usr/local/v6/include/sys/v6config.h>
9134#ifdef __V6D__
9135yes
9136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009137_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009140 ipv6type=$i;
9141 ipv6lib=v6;
9142 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009143 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009144fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009145rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146
9147 ;;
9148 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009150/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009151
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009152#include <sys/param.h>
9153#ifdef _ZETA_MINAMI_INET6
9154yes
9155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009156_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009159 ipv6type=$i;
9160 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009161 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009162fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009163rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009164
9165 ;;
9166 esac
9167 if test "$ipv6type" != "unknown"; then
9168 break
9169 fi
9170 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9172$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009173fi
9174
9175if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9176 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9177 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9178 echo "using lib$ipv6lib"
9179 else
9180 if test $ipv6trylibc = "yes"; then
9181 echo "using libc"
9182 else
9183 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9184 echo "You need to fetch lib$ipv6lib.a from appropriate"
9185 echo 'ipv6 kit and compile beforehand.'
9186 exit 1
9187 fi
9188 fi
9189fi
9190
Matthias Kloseb9621712010-04-24 17:59:49 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9192$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009194/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009195
9196 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009197int
9198main ()
9199{
9200FSIORefNum fRef = 0
9201 ;
9202 return 0;
9203}
Matthias Kloseb159a552010-04-25 21:00:44 +00009204
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009206if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009207
Matthias Kloseb159a552010-04-25 21:00:44 +00009208
Matthias Kloseb9621712010-04-24 17:59:49 +00009209$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009210
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9212$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009213
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009214else
Matthias Kloseb159a552010-04-25 21:00:44 +00009215
Matthias Kloseb9621712010-04-24 17:59:49 +00009216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009218
9219fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9221
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009222# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9224$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009227if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228 withval=$with_doc_strings;
9229fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009230
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009231
9232if test -z "$with_doc_strings"
9233then with_doc_strings="yes"
9234fi
9235if test "$with_doc_strings" != "no"
9236then
9237
Matthias Kloseb9621712010-04-24 17:59:49 +00009238$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009239
9240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9242$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009243
Antoine Pitrou042b1282010-08-13 21:15:58 +00009244# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9246$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009247
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009249if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009251if test "$withval" != no
9252then
9253
Matthias Kloseb9621712010-04-24 17:59:49 +00009254$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009255
Matthias Kloseb9621712010-04-24 17:59:49 +00009256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9257$as_echo "yes" >&6; }
9258else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009260fi
9261else
Matthias Kloseb9621712010-04-24 17:59:49 +00009262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9263$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264fi
9265
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009266
9267# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9269$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009272if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273 withval=$with_pymalloc;
9274fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009275
Neil Schemenauera35c6882001-02-27 04:45:05 +00009276
Neil Schemenauer16c22972002-03-22 15:34:49 +00009277if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009278then
9279 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009280 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009281fi
9282if test "$with_pymalloc" != "no"
9283then
Martin v. Löwis11437992002-04-12 09:54:03 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009286
9287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9289$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009290
Benjamin Peterson05159c42009-12-03 03:01:27 +00009291# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9293$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009294
9295# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009296if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009297 withval=$with_valgrind;
9298else
9299 with_valgrind=no
9300fi
9301
Matthias Kloseb9621712010-04-24 17:59:49 +00009302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9303$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009304if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009305 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +02009306if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009307
Matthias Kloseb9621712010-04-24 17:59:49 +00009308$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009309
9310else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009311 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009312
9313fi
9314
9315
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009316 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009317fi
9318
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009319# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009320
Guido van Rossum98935bf2001-09-05 19:13:16 +00009321DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009322
Guido van Rossume97ee181999-12-20 21:27:22 +00009323# the dlopen() function means we might want to use dynload_shlib.o. some
9324# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009325for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009326do :
9327 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natali47413c12011-10-06 19:47:44 +02009328if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009330#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009331_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009332
Guido van Rossume97ee181999-12-20 21:27:22 +00009333fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009334done
Guido van Rossume97ee181999-12-20 21:27:22 +00009335
Michael W. Hudson54241132001-12-07 15:38:26 +00009336
Guido van Rossume97ee181999-12-20 21:27:22 +00009337# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9338# loading of modules.
9339
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9341$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009342if test -z "$DYNLOADFILE"
9343then
9344 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009345 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9346 if test "$ac_cv_func_dlopen" = yes
9347 then DYNLOADFILE="dynload_shlib.o"
9348 else DYNLOADFILE="dynload_aix.o"
9349 fi
9350 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009351 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009352 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9353 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009354 *)
9355 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9356 # out any dynamic loading
9357 if test "$ac_cv_func_dlopen" = yes
9358 then DYNLOADFILE="dynload_shlib.o"
9359 else DYNLOADFILE="dynload_stub.o"
9360 fi
9361 ;;
9362 esac
9363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9365$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009366if test "$DYNLOADFILE" != "dynload_stub.o"
9367then
Martin v. Löwis11437992002-04-12 09:54:03 +00009368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009370
9371fi
9372
Neil Schemenauer4e425612001-06-19 15:44:15 +00009373# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9374
Michael W. Hudson54241132001-12-07 15:38:26 +00009375
Matthias Kloseb9621712010-04-24 17:59:49 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9377$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009378if test -z "$MACHDEP_OBJS"
9379then
Jack Jansene578a632001-08-15 01:27:14 +00009380 MACHDEP_OBJS=$extra_machdep_objs
9381else
9382 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9385$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009386
Guido van Rossum627b2d71993-12-24 10:39:16 +00009387# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009388for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009389 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009390 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009391 futimens futimes gai_strerror \
9392 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009393 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009394 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009395 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009396 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009397 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009398 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009399 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009400 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009401 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009402 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9403 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009404 sigaction sigaltstack siginterrupt sigpending sigrelse \
9405 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009406 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009407 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9408 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009409do :
9410 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9411ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009412if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009414#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009415_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009416
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009417fi
9418done
9419
Michael W. Hudson54241132001-12-07 15:38:26 +00009420
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009421# For some functions, having a definition is not sufficient, since
9422# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9424$as_echo_n "checking for chroot... " >&6; }
9425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009426/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009427#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428int
9429main ()
9430{
9431void *x=chroot
9432 ;
9433 return 0;
9434}
9435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009437
Matthias Kloseb9621712010-04-24 17:59:49 +00009438$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009439
Matthias Kloseb159a552010-04-25 21:00:44 +00009440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009441$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009442else
Matthias Kloseb9621712010-04-24 17:59:49 +00009443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9444$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009445
9446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9449$as_echo_n "checking for link... " >&6; }
9450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009451/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009452#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009453int
9454main ()
9455{
9456void *x=link
9457 ;
9458 return 0;
9459}
9460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009461if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009464
Matthias Kloseb159a552010-04-25 21:00:44 +00009465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009466$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009467else
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009470
9471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9474$as_echo_n "checking for symlink... " >&6; }
9475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009476/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009477#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009478int
9479main ()
9480{
9481void *x=symlink
9482 ;
9483 return 0;
9484}
9485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009487
Matthias Kloseb9621712010-04-24 17:59:49 +00009488$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009489
Matthias Kloseb159a552010-04-25 21:00:44 +00009490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009491$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009492else
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009495
9496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9499$as_echo_n "checking for fchdir... " >&6; }
9500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009501/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009502#include <unistd.h>
9503int
9504main ()
9505{
9506void *x=fchdir
9507 ;
9508 return 0;
9509}
9510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009512
Matthias Kloseb9621712010-04-24 17:59:49 +00009513$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009514
Matthias Kloseb159a552010-04-25 21:00:44 +00009515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009516$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009517else
Matthias Kloseb9621712010-04-24 17:59:49 +00009518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9519$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009520
9521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9524$as_echo_n "checking for fsync... " >&6; }
9525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009526/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009527#include <unistd.h>
9528int
9529main ()
9530{
9531void *x=fsync
9532 ;
9533 return 0;
9534}
9535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009536if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009537
Matthias Kloseb9621712010-04-24 17:59:49 +00009538$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009539
Matthias Kloseb159a552010-04-25 21:00:44 +00009540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009541$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009542else
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009545
9546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9549$as_echo_n "checking for fdatasync... " >&6; }
9550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009551/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009552#include <unistd.h>
9553int
9554main ()
9555{
9556void *x=fdatasync
9557 ;
9558 return 0;
9559}
9560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009561if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009562
Matthias Kloseb9621712010-04-24 17:59:49 +00009563$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009564
Matthias Kloseb159a552010-04-25 21:00:44 +00009565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009566$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009567else
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9569$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009570
9571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9574$as_echo_n "checking for epoll... " >&6; }
9575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009576/* end confdefs.h. */
9577#include <sys/epoll.h>
9578int
9579main ()
9580{
9581void *x=epoll_create
9582 ;
9583 return 0;
9584}
9585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009587
Matthias Kloseb9621712010-04-24 17:59:49 +00009588$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009589
Matthias Kloseb159a552010-04-25 21:00:44 +00009590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009591$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009592else
Matthias Kloseb9621712010-04-24 17:59:49 +00009593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009595
9596fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9599$as_echo_n "checking for kqueue... " >&6; }
9600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009601/* end confdefs.h. */
9602
9603#include <sys/types.h>
9604#include <sys/event.h>
9605
9606int
9607main ()
9608{
9609int x=kqueue()
9610 ;
9611 return 0;
9612}
9613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009614if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009615
Matthias Kloseb9621712010-04-24 17:59:49 +00009616$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009617
Matthias Kloseb159a552010-04-25 21:00:44 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009619$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009620else
Matthias Kloseb9621712010-04-24 17:59:49 +00009621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9622$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009623
9624fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009626# On some systems (eg. FreeBSD 5), we would find a definition of the
9627# functions ctermid_r, setgroups in the library, but no prototype
9628# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9629# address to avoid compiler warnings and potential miscompilations
9630# because of the missing prototypes.
9631
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9633$as_echo_n "checking for ctermid_r... " >&6; }
9634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009635/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009636
Martin v. Löwisd5843682002-11-21 20:41:28 +00009637#include <stdio.h>
9638
Martin v. Löwisd5843682002-11-21 20:41:28 +00009639int
9640main ()
9641{
9642void* p = ctermid_r
9643 ;
9644 return 0;
9645}
9646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009647if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009648
Matthias Kloseb9621712010-04-24 17:59:49 +00009649$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009650
Matthias Kloseb159a552010-04-25 21:00:44 +00009651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009652$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009653else
Matthias Kloseb9621712010-04-24 17:59:49 +00009654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9655$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009656
9657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9659
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9661$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009662if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009663 $as_echo_n "(cached) " >&6
9664else
9665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009666/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009667#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009668int
9669main ()
9670{
9671void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009672
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009673 ;
9674 return 0;
9675}
9676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009677if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009678 ac_cv_flock_decl=yes
9679else
9680 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009681
9682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009684
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009685fi
9686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9687$as_echo "$ac_cv_flock_decl" >&6; }
9688if test "x${ac_cv_flock_decl}" = xyes; then
9689 for ac_func in flock
9690do :
9691 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natali47413c12011-10-06 19:47:44 +02009692if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009693 cat >>confdefs.h <<_ACEOF
9694#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009695_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009696
Antoine Pitroua3000072010-09-07 14:52:42 +00009697else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009699$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009700if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009701 $as_echo_n "(cached) " >&6
9702else
9703 ac_check_lib_save_LIBS=$LIBS
9704LIBS="-lbsd $LIBS"
9705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9706/* end confdefs.h. */
9707
9708/* Override any GCC internal prototype to avoid an error.
9709 Use char because int might match the return type of a GCC
9710 builtin and then its argument prototype would still apply. */
9711#ifdef __cplusplus
9712extern "C"
9713#endif
9714char flock ();
9715int
9716main ()
9717{
9718return flock ();
9719 ;
9720 return 0;
9721}
9722_ACEOF
9723if ac_fn_c_try_link "$LINENO"; then :
9724 ac_cv_lib_bsd_flock=yes
9725else
9726 ac_cv_lib_bsd_flock=no
9727fi
9728rm -f core conftest.err conftest.$ac_objext \
9729 conftest$ac_exeext conftest.$ac_ext
9730LIBS=$ac_check_lib_save_LIBS
9731fi
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9733$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009734if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009735 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009736
9737
9738$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9739
9740
9741fi
9742
9743
9744fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009745done
9746
Antoine Pitroua3000072010-09-07 14:52:42 +00009747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748
Matthias Kloseb9621712010-04-24 17:59:49 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9750$as_echo_n "checking for getpagesize... " >&6; }
9751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009752/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009753
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009754#include <unistd.h>
9755
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009756int
9757main ()
9758{
9759void* p = getpagesize
9760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009764if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009765
Matthias Kloseb9621712010-04-24 17:59:49 +00009766$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009767
Matthias Kloseb159a552010-04-25 21:00:44 +00009768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009769$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009770else
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009773
9774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009776
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9778$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9780/* end confdefs.h. */
9781
9782#include <malloc.h>
9783
9784int
9785main ()
9786{
9787mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9788 ;
9789 return 0;
9790}
9791_ACEOF
9792if ac_fn_c_try_compile "$LINENO"; then :
9793
9794$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9795
9796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9797$as_echo "yes" >&6; }
9798else
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800$as_echo "no" >&6; }
9801
9802fi
9803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9804
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009805for ac_prog in true
9806do
9807 # Extract the first word of "$ac_prog", so it can be a program name with args.
9808set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9810$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009811if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009813else
9814 if test -n "$TRUE"; then
9815 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9816else
9817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9818for as_dir in $PATH
9819do
9820 IFS=$as_save_IFS
9821 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823 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 +00009824 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 $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 +00009826 break 2
9827 fi
9828done
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009831
9832fi
9833fi
9834TRUE=$ac_cv_prog_TRUE
9835if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9837$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009838else
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9840$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009841fi
9842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009844 test -n "$TRUE" && break
9845done
9846test -n "$TRUE" || TRUE="/bin/true"
9847
9848
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9850$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009851if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009853else
9854 ac_check_lib_save_LIBS=$LIBS
9855LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009857/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859/* Override any GCC internal prototype to avoid an error.
9860 Use char because int might match the return type of a GCC
9861 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009862#ifdef __cplusplus
9863extern "C"
9864#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009865char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009866int
9867main ()
9868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009870 ;
9871 return 0;
9872}
9873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009875 ac_cv_lib_c_inet_aton=yes
9876else
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009879rm -f core conftest.err conftest.$ac_objext \
9880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009881LIBS=$ac_check_lib_save_LIBS
9882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9884$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009885if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009886 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009887else
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9889$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009890if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009891 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009892else
9893 ac_check_lib_save_LIBS=$LIBS
9894LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009896/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898/* Override any GCC internal prototype to avoid an error.
9899 Use char because int might match the return type of a GCC
9900 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009901#ifdef __cplusplus
9902extern "C"
9903#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009904char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009905int
9906main ()
9907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009909 ;
9910 return 0;
9911}
9912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009914 ac_cv_lib_resolv_inet_aton=yes
9915else
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009918rm -f core conftest.err conftest.$ac_objext \
9919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009920LIBS=$ac_check_lib_save_LIBS
9921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9923$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009924if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009925 cat >>confdefs.h <<_ACEOF
9926#define HAVE_LIBRESOLV 1
9927_ACEOF
9928
9929 LIBS="-lresolv $LIBS"
9930
9931fi
9932
9933
9934fi
9935
9936
Christian Heimesd0764e22007-12-04 15:00:33 +00009937# On Tru64, chflags seems to be present, but calling it will
9938# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9940$as_echo_n "checking for chflags... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009941if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009943else
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009945 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009946else
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009948/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009949
Christian Heimesd0764e22007-12-04 15:00:33 +00009950#include <sys/stat.h>
9951#include <unistd.h>
9952int main(int argc, char*argv[])
9953{
9954 if(chflags(argv[0], 0) != 0)
9955 return 1;
9956 return 0;
9957}
Ned Deily3eb67d52011-06-28 00:00:28 -07009958
Christian Heimesd0764e22007-12-04 15:00:33 +00009959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009960if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009961 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009962else
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9966 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009967fi
9968
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009969
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9972$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009973if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natali47413c12011-10-06 19:47:44 +02009975if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009976 ac_cv_have_chflags="yes"
9977else
9978 ac_cv_have_chflags="no"
9979fi
9980
9981fi
9982if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009983
Matthias Kloseb9621712010-04-24 17:59:49 +00009984$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009985
9986fi
9987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9989$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +02009990if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009992else
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009994 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009995else
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009997/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009998
Christian Heimesd0764e22007-12-04 15:00:33 +00009999#include <sys/stat.h>
10000#include <unistd.h>
10001int main(int argc, char*argv[])
10002{
10003 if(lchflags(argv[0], 0) != 0)
10004 return 1;
10005 return 0;
10006}
Ned Deily3eb67d52011-06-28 00:00:28 -070010007
Christian Heimesd0764e22007-12-04 15:00:33 +000010008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010009if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010010 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010011else
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10015 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010016fi
10017
10018
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10021$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010022if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natali47413c12011-10-06 19:47:44 +020010024if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010025 ac_cv_have_lchflags="yes"
10026else
10027 ac_cv_have_lchflags="no"
10028fi
10029
10030fi
10031if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010032
Matthias Kloseb9621712010-04-24 17:59:49 +000010033$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010034
10035fi
10036
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010037case $ac_sys_system/$ac_sys_release in
10038Darwin/*)
10039 _CUR_CFLAGS="${CFLAGS}"
10040 _CUR_LDFLAGS="${LDFLAGS}"
10041 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10042 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10043 ;;
10044esac
10045
Matthias Kloseb9621712010-04-24 17:59:49 +000010046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10047$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010048if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010049 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010050else
10051 ac_check_lib_save_LIBS=$LIBS
10052LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010054/* end confdefs.h. */
10055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056/* Override any GCC internal prototype to avoid an error.
10057 Use char because int might match the return type of a GCC
10058 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010059#ifdef __cplusplus
10060extern "C"
10061#endif
10062char inflateCopy ();
10063int
10064main ()
10065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010067 ;
10068 return 0;
10069}
10070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010071if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010072 ac_cv_lib_z_inflateCopy=yes
10073else
Matthias Kloseb9621712010-04-24 17:59:49 +000010074 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010076rm -f core conftest.err conftest.$ac_objext \
10077 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010078LIBS=$ac_check_lib_save_LIBS
10079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10081$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010082if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010083
Matthias Kloseb9621712010-04-24 17:59:49 +000010084$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010085
10086fi
10087
10088
10089case $ac_sys_system/$ac_sys_release in
10090Darwin/*)
10091 CFLAGS="${_CUR_CFLAGS}"
10092 LDFLAGS="${_CUR_LDFLAGS}"
10093 ;;
10094esac
10095
Matthias Kloseb9621712010-04-24 17:59:49 +000010096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10097$as_echo_n "checking for hstrerror... " >&6; }
10098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010099/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010100
Martin v. Löwise9416172003-05-03 10:12:45 +000010101#include <netdb.h>
10102
Martin v. Löwise9416172003-05-03 10:12:45 +000010103int
10104main ()
10105{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010106void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010107 ;
10108 return 0;
10109}
10110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010111if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010112
Matthias Kloseb9621712010-04-24 17:59:49 +000010113$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010114
Matthias Kloseb159a552010-04-25 21:00:44 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010116$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010117else
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010120
10121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010122rm -f core conftest.err conftest.$ac_objext \
10123 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124
Matthias Kloseb9621712010-04-24 17:59:49 +000010125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10126$as_echo_n "checking for inet_aton... " >&6; }
10127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010128/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010129
Martin v. Löwis86d66262006-02-17 08:40:11 +000010130#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010131#include <sys/socket.h>
10132#include <netinet/in.h>
10133#include <arpa/inet.h>
10134
Martin v. Löwise9416172003-05-03 10:12:45 +000010135int
10136main ()
10137{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010138void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010139 ;
10140 return 0;
10141}
10142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010144
Matthias Kloseb9621712010-04-24 17:59:49 +000010145$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010146
Matthias Kloseb159a552010-04-25 21:00:44 +000010147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010148$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010149else
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10151$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010152
10153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010154rm -f core conftest.err conftest.$ac_objext \
10155 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010156
Matthias Kloseb9621712010-04-24 17:59:49 +000010157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10158$as_echo_n "checking for inet_pton... " >&6; }
10159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010160/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010161
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010162#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010163#include <sys/socket.h>
10164#include <netinet/in.h>
10165#include <arpa/inet.h>
10166
Martin v. Löwise9416172003-05-03 10:12:45 +000010167int
10168main ()
10169{
10170void* p = inet_pton
10171 ;
10172 return 0;
10173}
10174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010175if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010176
Matthias Kloseb9621712010-04-24 17:59:49 +000010177$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010178
Matthias Kloseb159a552010-04-25 21:00:44 +000010179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010180$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010181else
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010184
10185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010187
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010188# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10190$as_echo_n "checking for setgroups... " >&6; }
10191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010192/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010193
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010194#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010195#ifdef HAVE_GRP_H
10196#include <grp.h>
10197#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010198
Martin v. Löwisd5843682002-11-21 20:41:28 +000010199int
10200main ()
10201{
10202void* p = setgroups
10203 ;
10204 return 0;
10205}
10206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010208
Matthias Kloseb9621712010-04-24 17:59:49 +000010209$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010210
Matthias Kloseb159a552010-04-25 21:00:44 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010212$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010213else
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010216
10217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010219
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010220# check for openpty and forkpty
10221
10222for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010223do :
10224 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natali47413c12011-10-06 19:47:44 +020010225if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010227#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010228_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010229
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010230else
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10232$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010233if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010235else
Martin v. Löwis11437992002-04-12 09:54:03 +000010236 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010237LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010241/* Override any GCC internal prototype to avoid an error.
10242 Use char because int might match the return type of a GCC
10243 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010244#ifdef __cplusplus
10245extern "C"
10246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010247char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010248int
10249main ()
10250{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ;
10253 return 0;
10254}
10255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010256if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010258else
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010261rm -f core conftest.err conftest.$ac_objext \
10262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010263LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10266$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010267if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010269 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010270else
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10272$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010273if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010275else
10276 ac_check_lib_save_LIBS=$LIBS
10277LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010279/* end confdefs.h. */
10280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281/* Override any GCC internal prototype to avoid an error.
10282 Use char because int might match the return type of a GCC
10283 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010284#ifdef __cplusplus
10285extern "C"
10286#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010287char openpty ();
10288int
10289main ()
10290{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010292 ;
10293 return 0;
10294}
10295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010297 ac_cv_lib_bsd_openpty=yes
10298else
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010301rm -f core conftest.err conftest.$ac_objext \
10302 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010303LIBS=$ac_check_lib_save_LIBS
10304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10306$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010307if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010309 LIBS="$LIBS -lbsd"
10310fi
10311
10312
10313fi
10314
Fred Drake8cef4cf2000-06-28 16:40:38 +000010315
10316fi
10317done
10318
10319for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010320do :
10321 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natali47413c12011-10-06 19:47:44 +020010322if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010324#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010325_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010326
Fred Drake8cef4cf2000-06-28 16:40:38 +000010327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10329$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010330if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010332else
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010334LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338/* Override any GCC internal prototype to avoid an error.
10339 Use char because int might match the return type of a GCC
10340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010341#ifdef __cplusplus
10342extern "C"
10343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010344char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010345int
10346main ()
10347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ;
10350 return 0;
10351}
10352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010355else
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358rm -f core conftest.err conftest.$ac_objext \
10359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010360LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10363$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010364if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010366 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010367else
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10369$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010370if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010372else
10373 ac_check_lib_save_LIBS=$LIBS
10374LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010376/* end confdefs.h. */
10377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378/* Override any GCC internal prototype to avoid an error.
10379 Use char because int might match the return type of a GCC
10380 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010381#ifdef __cplusplus
10382extern "C"
10383#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010384char forkpty ();
10385int
10386main ()
10387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010394 ac_cv_lib_bsd_forkpty=yes
10395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010398rm -f core conftest.err conftest.$ac_objext \
10399 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010400LIBS=$ac_check_lib_save_LIBS
10401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10403$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010404if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010406 LIBS="$LIBS -lbsd"
10407fi
10408
10409
10410fi
10411
Fred Drake8cef4cf2000-06-28 16:40:38 +000010412
10413fi
10414done
10415
Jack Jansendd19cf82001-12-06 22:36:17 +000010416
Christian Heimesb186d002008-03-18 15:15:01 +000010417# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010418for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010419do :
10420 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natali47413c12011-10-06 19:47:44 +020010421if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010424_ACEOF
10425
10426fi
10427done
10428
10429
Michael W. Hudson54241132001-12-07 15:38:26 +000010430# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010431for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010432do :
10433 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10434ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010435if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010437#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010438_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010439
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010440fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010441done
10442
Michael W. Hudson54241132001-12-07 15:38:26 +000010443
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010444ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natali47413c12011-10-06 19:47:44 +020010445if test "x$ac_cv_func_dup2" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010446 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010447
Martin v. Löwis1142de32002-03-29 16:28:31 +000010448else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010450 *" dup2.$ac_objext "* ) ;;
10451 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010453esac
10454
Martin v. Löwis1142de32002-03-29 16:28:31 +000010455fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010456
10457ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natali47413c12011-10-06 19:47:44 +020010458if test "x$ac_cv_func_getcwd" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010459 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10460
10461else
10462 case " $LIBOBJS " in
10463 *" getcwd.$ac_objext "* ) ;;
10464 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10465 ;;
10466esac
10467
10468fi
10469
10470ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natali47413c12011-10-06 19:47:44 +020010471if test "x$ac_cv_func_strdup" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010472 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10473
10474else
10475 case " $LIBOBJS " in
10476 *" strdup.$ac_objext "* ) ;;
10477 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10478 ;;
10479esac
10480
10481fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010482
10483
10484for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010485do :
10486 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natali47413c12011-10-06 19:47:44 +020010487if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010492/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010493#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010494int
10495main ()
10496{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010497getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 ;
10499 return 0;
10500}
10501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010505
Guido van Rossum627b2d71993-12-24 10:39:16 +000010506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010508
Guido van Rossum627b2d71993-12-24 10:39:16 +000010509fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010510done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010511
Jack Jansen150753c2003-03-29 22:07:47 +000010512for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010513do :
10514 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natali47413c12011-10-06 19:47:44 +020010515if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010516 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010517#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010521#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010522int
10523main ()
10524{
10525setpgrp(0,0);
10526 ;
10527 return 0;
10528}
10529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010531
Matthias Kloseb9621712010-04-24 17:59:49 +000010532$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010533
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010536
10537fi
10538done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010539
Thomas Wouters3a584202000-08-05 23:28:51 +000010540for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010541do :
10542 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natali47413c12011-10-06 19:47:44 +020010543if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010544 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010545#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010548/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010549#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010550int
10551main ()
10552{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010553gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 ;
10555 return 0;
10556}
10557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010558if ac_fn_c_try_compile "$LINENO"; then :
10559
Guido van Rossum627b2d71993-12-24 10:39:16 +000010560else
Skip Montanaro6dead952003-09-25 14:50:04 +000010561
Matthias Kloseb9621712010-04-24 17:59:49 +000010562$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010563
Martin v. Löwis11437992002-04-12 09:54:03 +000010564
Guido van Rossum627b2d71993-12-24 10:39:16 +000010565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010567
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010568fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010569done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570
Michael W. Hudson54241132001-12-07 15:38:26 +000010571
Matthias Kloseb9621712010-04-24 17:59:49 +000010572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10573$as_echo_n "checking for major... " >&6; }
10574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010575/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010576
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010577#if defined(MAJOR_IN_MKDEV)
10578#include <sys/mkdev.h>
10579#elif defined(MAJOR_IN_SYSMACROS)
10580#include <sys/sysmacros.h>
10581#else
10582#include <sys/types.h>
10583#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010584
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010585int
10586main ()
10587{
10588
10589 makedev(major(0),minor(0));
10590
10591 ;
10592 return 0;
10593}
10594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010596
10597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10601$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010602
10603else
Skip Montanaro6dead952003-09-25 14:50:04 +000010604
Matthias Kloseb9621712010-04-24 17:59:49 +000010605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010607
10608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010609rm -f core conftest.err conftest.$ac_objext \
10610 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010611
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010612# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010613# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10615$as_echo_n "checking for getaddrinfo... " >&6; }
10616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010617/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010618
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010619#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010620#include <sys/socket.h>
10621#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010622#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010623
Martin v. Löwis11437992002-04-12 09:54:03 +000010624int
10625main ()
10626{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010627getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010628 ;
10629 return 0;
10630}
10631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010632if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010633 have_getaddrinfo=yes
10634else
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010637rm -f core conftest.err conftest.$ac_objext \
10638 conftest$ac_exeext conftest.$ac_ext
10639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10640$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010641if test $have_getaddrinfo = yes
10642then
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10644$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010645 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010647else
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010649 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010650else
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010652/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010653
10654#include <sys/types.h>
10655#include <netdb.h>
10656#include <string.h>
10657#include <sys/socket.h>
10658#include <netinet/in.h>
10659
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010660int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010661{
10662 int passive, gaierr, inet4 = 0, inet6 = 0;
10663 struct addrinfo hints, *ai, *aitop;
10664 char straddr[INET6_ADDRSTRLEN], strport[16];
10665
10666 for (passive = 0; passive <= 1; passive++) {
10667 memset(&hints, 0, sizeof(hints));
10668 hints.ai_family = AF_UNSPEC;
10669 hints.ai_flags = passive ? AI_PASSIVE : 0;
10670 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010671 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010672 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10673 (void)gai_strerror(gaierr);
10674 goto bad;
10675 }
10676 for (ai = aitop; ai; ai = ai->ai_next) {
10677 if (ai->ai_addr == NULL ||
10678 ai->ai_addrlen == 0 ||
10679 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10680 straddr, sizeof(straddr), strport, sizeof(strport),
10681 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10682 goto bad;
10683 }
10684 switch (ai->ai_family) {
10685 case AF_INET:
10686 if (strcmp(strport, "54321") != 0) {
10687 goto bad;
10688 }
10689 if (passive) {
10690 if (strcmp(straddr, "0.0.0.0") != 0) {
10691 goto bad;
10692 }
10693 } else {
10694 if (strcmp(straddr, "127.0.0.1") != 0) {
10695 goto bad;
10696 }
10697 }
10698 inet4++;
10699 break;
10700 case AF_INET6:
10701 if (strcmp(strport, "54321") != 0) {
10702 goto bad;
10703 }
10704 if (passive) {
10705 if (strcmp(straddr, "::") != 0) {
10706 goto bad;
10707 }
10708 } else {
10709 if (strcmp(straddr, "::1") != 0) {
10710 goto bad;
10711 }
10712 }
10713 inet6++;
10714 break;
10715 case AF_UNSPEC:
10716 goto bad;
10717 break;
10718 default:
10719 /* another family support? */
10720 break;
10721 }
10722 }
10723 }
10724
10725 if (!(inet4 == 0 || inet4 == 2))
10726 goto bad;
10727 if (!(inet6 == 0 || inet6 == 2))
10728 goto bad;
10729
10730 if (aitop)
10731 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010732 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010733
10734 bad:
10735 if (aitop)
10736 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010737 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010738}
10739
Martin v. Löwis11437992002-04-12 09:54:03 +000010740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010741if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010742 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010743else
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010749
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010750fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010751
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10755$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10756
Mark Dickinson2df5d282009-12-31 21:22:50 +000010757if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010758then
10759 if test $ipv6 = yes
10760 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010761 echo 'Fatal: You must get working getaddrinfo() function.'
10762 echo ' or you can specify "--disable-ipv6"'.
10763 exit 1
10764 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010765else
Martin v. Löwis11437992002-04-12 09:54:03 +000010766
Matthias Kloseb9621712010-04-24 17:59:49 +000010767$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010768
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010769fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010770
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010771for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010772do :
10773 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natali47413c12011-10-06 19:47:44 +020010774if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010776#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010777_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010778
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010779fi
10780done
10781
Michael W. Hudson54241132001-12-07 15:38:26 +000010782
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010783# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10785$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010786if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010790/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791#include <sys/types.h>
10792#include <sys/time.h>
10793#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010794
Martin v. Löwis11437992002-04-12 09:54:03 +000010795int
10796main ()
10797{
10798if ((struct tm *) 0)
10799return 0;
10800 ;
10801 return 0;
10802}
10803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010804if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010806else
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10812$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010813if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010816
10817fi
10818
Matthias Kloseb9621712010-04-24 17:59:49 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10820$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010821if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010823else
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010825/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010826#include <sys/types.h>
10827#include <time.h>
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 +000010832struct tm tm;
10833 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010835 ;
10836 return 0;
10837}
10838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010839if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010840 ac_cv_struct_tm=time.h
10841else
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10847$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010848if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010851
10852fi
10853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854ac_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 +000010855#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857"
Charles-François Natali47413c12011-10-06 19:47:44 +020010858if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010859
10860cat >>confdefs.h <<_ACEOF
10861#define HAVE_STRUCT_TM_TM_ZONE 1
10862_ACEOF
10863
10864
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010865fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010866
Martin v. Löwis11437992002-04-12 09:54:03 +000010867if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010870
10871else
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10873"
Charles-François Natali47413c12011-10-06 19:47:44 +020010874if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876else
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010878fi
10879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010881#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010882_ACEOF
10883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10885$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010886if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010888else
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010890/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010891#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010892#if !HAVE_DECL_TZNAME
10893extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010895
Martin v. Löwis11437992002-04-12 09:54:03 +000010896int
10897main ()
10898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 ;
10901 return 0;
10902}
10903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010904if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010905 ac_cv_var_tzname=yes
10906else
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010909rm -f core conftest.err conftest.$ac_objext \
10910 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10913$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010914 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010917
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010918 fi
10919fi
10920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +020010922if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010923
10924cat >>confdefs.h <<_ACEOF
10925#define HAVE_STRUCT_STAT_ST_RDEV 1
10926_ACEOF
10927
10928
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010929fi
10930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +020010932if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010933
Martin v. Löwis11437992002-04-12 09:54:03 +000010934cat >>confdefs.h <<_ACEOF
10935#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10936_ACEOF
10937
10938
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010939fi
10940
Matthias Kloseb9621712010-04-24 17:59:49 +000010941ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +020010942if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010943
10944cat >>confdefs.h <<_ACEOF
10945#define HAVE_STRUCT_STAT_ST_FLAGS 1
10946_ACEOF
10947
10948
10949fi
10950
Matthias Kloseb9621712010-04-24 17:59:49 +000010951ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +020010952if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010953
10954cat >>confdefs.h <<_ACEOF
10955#define HAVE_STRUCT_STAT_ST_GEN 1
10956_ACEOF
10957
10958
10959fi
10960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +020010962if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010963
10964cat >>confdefs.h <<_ACEOF
10965#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10966_ACEOF
10967
10968
10969fi
10970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +020010972if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010973
Martin v. Löwis11437992002-04-12 09:54:03 +000010974cat >>confdefs.h <<_ACEOF
10975#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10976_ACEOF
10977
10978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010980
10981else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010983 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10985 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010986esac
10987
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010988fi
10989
Michael W. Hudson54241132001-12-07 15:38:26 +000010990
Martin v. Löwis11437992002-04-12 09:54:03 +000010991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10993$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020010994if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010996else
Matthias Kloseb159a552010-04-25 21:00:44 +000010997
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011000#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011001int
11002main ()
11003{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011004return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 ;
11006 return 0;
11007}
11008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011009if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011010 ac_cv_header_time_altzone=yes
11011else
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016fi
11017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11019$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011020if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011023
11024fi
11025
Guido van Rossumda88dad1995-01-26 00:46:29 +000011026was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11028$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011030/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011031
11032#include <sys/types.h>
11033#include <sys/select.h>
11034#include <sys/time.h>
11035
Martin v. Löwis11437992002-04-12 09:54:03 +000011036int
11037main ()
11038{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011039;
Martin v. Löwis11437992002-04-12 09:54:03 +000011040 ;
11041 return 0;
11042}
11043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
11046
Matthias Kloseb9621712010-04-24 17:59:49 +000011047$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011048
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011049 was_it_defined=yes
11050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11054$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11057$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020011058if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011060else
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011062/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011063#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011064int
11065main ()
11066{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011067struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 ;
11069 return 0;
11070}
11071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011073 ac_cv_struct_addrinfo=yes
11074else
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11078fi
11079
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11081$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011082if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011083
Matthias Kloseb9621712010-04-24 17:59:49 +000011084$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011085
11086fi
11087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11089$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020011090if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011092else
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011094/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011095
11096# include <sys/types.h>
11097# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011098int
11099main ()
11100{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011101struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ;
11103 return 0;
11104}
11105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011106if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011107 ac_cv_struct_sockaddr_storage=yes
11108else
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11112fi
11113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11115$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011116if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011117
Matthias Kloseb9621712010-04-24 17:59:49 +000011118$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011119
11120fi
11121
Guido van Rossum627b2d71993-12-24 10:39:16 +000011122# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011123
Matthias Kloseb9621712010-04-24 17:59:49 +000011124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11125$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020011126if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011128else
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011131$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011132int
11133main ()
11134{
11135static int test_array [1 - 2 * !(((char) -1) < 0)];
11136test_array [0] = 0
11137
11138 ;
11139 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011140}
Martin v. Löwis11437992002-04-12 09:54:03 +000011141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011142if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011143 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011144else
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11150$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011151if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011153
11154fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011155
Matthias Kloseb9621712010-04-24 17:59:49 +000011156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11157$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020011158if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011160else
Matthias Kloseb9621712010-04-24 17:59:49 +000011161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011162/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163
Martin v. Löwis11437992002-04-12 09:54:03 +000011164int
11165main ()
11166{
11167/* FIXME: Include the comments suggested by Paul. */
11168#ifndef __cplusplus
11169 /* Ultrix mips cc rejects this. */
11170 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011171 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173 char const *const *pcpcc;
11174 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 /* NEC SVR4.0.2 mips cc rejects this. */
11176 struct point {int x, y;};
11177 static struct point const zero = {0,0};
11178 /* AIX XL C 1.02.0.0 rejects this.
11179 It does not let you subtract one const X* pointer from another in
11180 an arm of an if-expression whose if-part is not a constant
11181 expression */
11182 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185 ++pcpcc;
11186 ppc = (char**) pcpcc;
11187 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 { /* SCO 3.2v4 cc rejects this. */
11189 char *t;
11190 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011191
Martin v. Löwis11437992002-04-12 09:54:03 +000011192 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 }
11195 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11196 int x[] = {25, 17};
11197 const int *foo = &x[0];
11198 ++foo;
11199 }
11200 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11201 typedef const int *iptr;
11202 iptr p = 0;
11203 ++p;
11204 }
11205 { /* AIX XL C 1.02.0.0 rejects this saying
11206 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11207 struct s { int j; const int *ap[3]; };
11208 struct s *b; b->j = 5;
11209 }
11210 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11211 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011212 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011215#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011216
Martin v. Löwis11437992002-04-12 09:54:03 +000011217 ;
11218 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011219}
Martin v. Löwis11437992002-04-12 09:54:03 +000011220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011221if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011222 ac_cv_c_const=yes
11223else
Matthias Kloseb9621712010-04-24 17:59:49 +000011224 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11229$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
Matthias Kloseb9621712010-04-24 17:59:49 +000011232$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011233
11234fi
11235
Michael W. Hudson54241132001-12-07 15:38:26 +000011236
Guido van Rossumda88dad1995-01-26 00:46:29 +000011237works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11239$as_echo_n "checking for working volatile... " >&6; }
11240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011241/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011242
Martin v. Löwis11437992002-04-12 09:54:03 +000011243int
11244main ()
11245{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011246volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011247 ;
11248 return 0;
11249}
11250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011251if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011252 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011253else
Skip Montanaro6dead952003-09-25 14:50:04 +000011254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011256
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011257
Guido van Rossum627b2d71993-12-24 10:39:16 +000011258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11261$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011262
Guido van Rossumda88dad1995-01-26 00:46:29 +000011263works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11265$as_echo_n "checking for working signed char... " >&6; }
11266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011267/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011268
Martin v. Löwis11437992002-04-12 09:54:03 +000011269int
11270main ()
11271{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011272signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 ;
11274 return 0;
11275}
11276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011277if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011278 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011279else
Skip Montanaro6dead952003-09-25 14:50:04 +000011280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011282
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011283
Guido van Rossum7f43da71994-08-01 12:15:30 +000011284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11287$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011288
Guido van Rossumda88dad1995-01-26 00:46:29 +000011289have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11291$as_echo_n "checking for prototypes... " >&6; }
11292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011294int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011295int
11296main ()
11297{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011298return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Matthias Kloseb159a552010-04-25 21:00:44 +000011307 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11311$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011312
Guido van Rossumda88dad1995-01-26 00:46:29 +000011313works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11315$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011318
11319#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011320int foo(int x, ...) {
11321 va_list va;
11322 va_start(va, x);
11323 va_arg(va, int);
11324 va_arg(va, char *);
11325 va_arg(va, double);
11326 return 0;
11327}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011328
Martin v. Löwis11437992002-04-12 09:54:03 +000011329int
11330main ()
11331{
Guido van Rossum90eea071996-08-30 20:58:57 +000011332return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ;
11334 return 0;
11335}
11336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
11339
Matthias Kloseb9621712010-04-24 17:59:49 +000011340$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011341
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011342 works=yes
11343
Guido van Rossum627b2d71993-12-24 10:39:16 +000011344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11347$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011348
Martin v. Löwisd6320502004-08-12 13:45:08 +000011349# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11351$as_echo_n "checking for socketpair... " >&6; }
11352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011353/* end confdefs.h. */
11354
11355#include <sys/types.h>
11356#include <sys/socket.h>
11357
11358int
11359main ()
11360{
11361void *x=socketpair
11362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011367
Matthias Kloseb9621712010-04-24 17:59:49 +000011368$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011369
Matthias Kloseb159a552010-04-25 21:00:44 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011371$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011372else
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11374$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011375
11376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011378
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011379# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11381$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011384#include <sys/types.h>
11385#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011386int
11387main ()
11388{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011389struct sockaddr x;
11390x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 ;
11392 return 0;
11393}
11394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011395if ac_fn_c_try_compile "$LINENO"; then :
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11397$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011400
11401else
Matthias Kloseb9621712010-04-24 17:59:49 +000011402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011404
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011407
Guido van Rossumda88dad1995-01-26 00:46:29 +000011408va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11410$as_echo_n "checking whether va_list is an array... " >&6; }
11411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011412/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011413
11414#ifdef HAVE_STDARG_PROTOTYPES
11415#include <stdarg.h>
11416#else
11417#include <varargs.h>
11418#endif
11419
Martin v. Löwis11437992002-04-12 09:54:03 +000011420int
11421main ()
11422{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011423va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ;
11425 return 0;
11426}
11427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011428if ac_fn_c_try_compile "$LINENO"; then :
11429
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011430else
Skip Montanaro6dead952003-09-25 14:50:04 +000011431
Martin v. Löwis11437992002-04-12 09:54:03 +000011432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011434
Guido van Rossumda88dad1995-01-26 00:46:29 +000011435 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011436
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11440$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011441
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011442# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011443
11444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natali47413c12011-10-06 19:47:44 +020011446if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011449
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11451$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011452 OLD_CFLAGS=$CFLAGS
11453 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011455/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011456
11457# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011458
Martin v. Löwis11437992002-04-12 09:54:03 +000011459int
11460main ()
11461{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011462
11463 char *name;
11464 struct hostent *he, *res;
11465 char buffer[2048];
11466 int buflen = 2048;
11467 int h_errnop;
11468
11469 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011470
11471 ;
11472 return 0;
11473}
11474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011478
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
Matthias Kloseb9621712010-04-24 17:59:49 +000011480$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011481
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11483$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011485else
Skip Montanaro6dead952003-09-25 14:50:04 +000011486
Matthias Kloseb9621712010-04-24 17:59:49 +000011487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11488$as_echo "no" >&6; }
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11490$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011492/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011493
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011494# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011495
Martin v. Löwis11437992002-04-12 09:54:03 +000011496int
11497main ()
11498{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011499
11500 char *name;
11501 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011502 char buffer[2048];
11503 int buflen = 2048;
11504 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011505
Matthias Kloseb159a552010-04-25 21:00:44 +000011506 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011507
11508 ;
11509 return 0;
11510}
11511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011515
Martin v. Löwis11437992002-04-12 09:54:03 +000011516
Matthias Kloseb159a552010-04-25 21:00:44 +000011517$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11520$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011521
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011522else
Skip Montanaro6dead952003-09-25 14:50:04 +000011523
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11527$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11529/* end confdefs.h. */
11530
11531# include <netdb.h>
11532
11533int
11534main ()
11535{
11536
11537 char *name;
11538 struct hostent *he;
11539 struct hostent_data data;
11540
11541 (void) gethostbyname_r(name, he, &data);
11542
11543 ;
11544 return 0;
11545}
11546_ACEOF
11547if ac_fn_c_try_compile "$LINENO"; then :
11548
11549 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11550
11551
11552$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11553
11554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11555$as_echo "yes" >&6; }
11556
11557else
11558
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11560$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011561
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011570 CFLAGS=$OLD_CFLAGS
11571
11572else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011573
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 for ac_func in gethostbyname
11575do :
11576 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natali47413c12011-10-06 19:47:44 +020011577if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011579#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011580_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011581
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011582fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011583done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011584
Michael W. Hudson54241132001-12-07 15:38:26 +000011585
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011586fi
11587
Michael W. Hudson54241132001-12-07 15:38:26 +000011588
11589
11590
11591
11592
11593
Guido van Rossum627b2d71993-12-24 10:39:16 +000011594# checks for system services
11595# (none yet)
11596
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011597# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011598ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natali47413c12011-10-06 19:47:44 +020011599if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011600
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011601else
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11603$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020011604if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011606else
Martin v. Löwis11437992002-04-12 09:54:03 +000011607 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011608LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612/* Override any GCC internal prototype to avoid an error.
11613 Use char because int might match the return type of a GCC
11614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011615#ifdef __cplusplus
11616extern "C"
11617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011618char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011619int
11620main ()
11621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011622return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 ;
11624 return 0;
11625}
11626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011627if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011629else
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011632rm -f core conftest.err conftest.$ac_objext \
11633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011634LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11637$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020011638if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011639 cat >>confdefs.h <<_ACEOF
11640#define HAVE_LIBIEEE 1
11641_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011642
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011643 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011644
Guido van Rossum627b2d71993-12-24 10:39:16 +000011645fi
11646
Michael W. Hudson54241132001-12-07 15:38:26 +000011647
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011648fi
11649
Michael W. Hudson54241132001-12-07 15:38:26 +000011650
Guido van Rossum7f253911997-05-09 02:42:48 +000011651# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11653$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011655# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011656if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011658if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011659then
11660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11664$as_echo "yes" >&6; }
11665else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11666$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011667fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011668else
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11670$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011671fi
11672
Guido van Rossum7f253911997-05-09 02:42:48 +000011673
Guido van Rossum7f43da71994-08-01 12:15:30 +000011674# check for --with-libm=...
11675
Guido van Rossum563e7081996-09-10 18:20:48 +000011676case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011677Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011678*) LIBM=-lm
11679esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11681$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011683# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011684if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011685 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011686if test "$withval" = no
11687then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11689$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011690elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011691then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11693$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011694else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011695fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11698$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011699fi
11700
Guido van Rossum7f43da71994-08-01 12:15:30 +000011701
11702# check for --with-libc=...
11703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11705$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011707# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011708if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011709 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011710if test "$withval" = no
11711then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11713$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011714elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011715then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11717$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011718else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011719fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011720else
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11722$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011723fi
11724
Guido van Rossum7f43da71994-08-01 12:15:30 +000011725
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011726# **************************************************
11727# * Check for various properties of floating point *
11728# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011729
Matthias Kloseb9621712010-04-24 17:59:49 +000011730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11731$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020011732if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734else
11735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737 ac_cv_little_endian_double=no
11738else
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740/* end confdefs.h. */
11741
11742#include <string.h>
11743int main() {
11744 double x = 9006104071832581.0;
11745 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11746 return 0;
11747 else
11748 return 1;
11749}
11750
11751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753 ac_cv_little_endian_double=yes
11754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011759fi
11760
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761fi
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11764$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011765if test "$ac_cv_little_endian_double" = yes
11766then
11767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769
11770fi
11771
Matthias Kloseb9621712010-04-24 17:59:49 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11773$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020011774if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011776else
11777
Matthias Kloseb9621712010-04-24 17:59:49 +000011778if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011779 ac_cv_big_endian_double=no
11780else
Matthias Kloseb9621712010-04-24 17:59:49 +000011781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011782/* end confdefs.h. */
11783
11784#include <string.h>
11785int main() {
11786 double x = 9006104071832581.0;
11787 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11788 return 0;
11789 else
11790 return 1;
11791}
11792
11793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011794if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011795 ac_cv_big_endian_double=yes
11796else
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011801fi
11802
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011803fi
11804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11806$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807if test "$ac_cv_big_endian_double" = yes
11808then
11809
Matthias Kloseb9621712010-04-24 17:59:49 +000011810$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011811
11812fi
11813
11814# Some ARM platforms use a mixed-endian representation for doubles.
11815# While Python doesn't currently have full support for these platforms
11816# (see e.g., issue 1762561), we can at least make sure that float <-> string
11817# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11819$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020011820if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011822else
11823
Matthias Kloseb9621712010-04-24 17:59:49 +000011824if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011825 ac_cv_mixed_endian_double=no
11826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011828/* end confdefs.h. */
11829
11830#include <string.h>
11831int main() {
11832 double x = 9006104071832581.0;
11833 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11834 return 0;
11835 else
11836 return 1;
11837}
11838
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011841 ac_cv_mixed_endian_double=yes
11842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011847fi
11848
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011849fi
11850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11852$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011853if test "$ac_cv_mixed_endian_double" = yes
11854then
11855
Matthias Kloseb9621712010-04-24 17:59:49 +000011856$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011857
11858fi
11859
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011860# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011861# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011862# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011863# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011864# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011865# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011866
11867# This inline assembler syntax may also work for suncc and icc,
11868# so we try it on all platforms.
11869
Matthias Kloseb9621712010-04-24 17:59:49 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11871$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011873/* end confdefs.h. */
11874
11875int
11876main ()
11877{
11878
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011879 unsigned short cw;
11880 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11881 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011882
11883 ;
11884 return 0;
11885}
11886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011887if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011888 have_gcc_asm_for_x87=yes
11889else
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011891fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11894$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011895if test "$have_gcc_asm_for_x87" = yes
11896then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011897
Matthias Kloseb9621712010-04-24 17:59:49 +000011898$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011899
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011901
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011902# Detect whether system arithmetic is subject to x87-style double
11903# rounding issues. The result of this test has little meaning on non
11904# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11905# mode is round-to-nearest and double rounding issues are present, and
11906# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11908$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011909# $BASECFLAGS may affect the result
11910ac_save_cc="$CC"
11911CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011912if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011913 ac_cv_x87_double_rounding=no
11914else
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011916/* end confdefs.h. */
11917
11918#include <stdlib.h>
11919#include <math.h>
11920int main() {
11921 volatile double x, y, z;
11922 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11923 x = 0.99999999999999989; /* 1-2**-53 */
11924 y = 1./x;
11925 if (y != 1.)
11926 exit(0);
11927 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11928 x = 1e16;
11929 y = 2.99999;
11930 z = x + y;
11931 if (z != 1e16+4.)
11932 exit(0);
11933 /* both tests show evidence of double rounding */
11934 exit(1);
11935}
11936
11937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011938if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011939 ac_cv_x87_double_rounding=no
11940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011945fi
11946
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011947CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11949$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011950if test "$ac_cv_x87_double_rounding" = yes
11951then
11952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011954
11955fi
11956
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011957# ************************************
11958# * Check for mathematical functions *
11959# ************************************
11960
11961LIBS_SAVE=$LIBS
11962LIBS="$LIBS $LIBM"
11963
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011964for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11965do :
11966 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11967ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011968if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011969 cat >>confdefs.h <<_ACEOF
11970#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11971_ACEOF
11972
11973fi
11974done
11975
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011976for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011977do :
11978 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11979ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011980if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011981 cat >>confdefs.h <<_ACEOF
11982#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11983_ACEOF
11984
11985fi
11986done
11987
11988ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11989"
Charles-François Natali47413c12011-10-06 19:47:44 +020011990if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011991 ac_have_decl=1
11992else
11993 ac_have_decl=0
11994fi
11995
11996cat >>confdefs.h <<_ACEOF
11997#define HAVE_DECL_ISINF $ac_have_decl
11998_ACEOF
11999ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12000"
Charles-François Natali47413c12011-10-06 19:47:44 +020012001if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012002 ac_have_decl=1
12003else
12004 ac_have_decl=0
12005fi
12006
12007cat >>confdefs.h <<_ACEOF
12008#define HAVE_DECL_ISNAN $ac_have_decl
12009_ACEOF
12010ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12011"
Charles-François Natali47413c12011-10-06 19:47:44 +020012012if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012013 ac_have_decl=1
12014else
12015 ac_have_decl=0
12016fi
12017
12018cat >>confdefs.h <<_ACEOF
12019#define HAVE_DECL_ISFINITE $ac_have_decl
12020_ACEOF
12021
12022
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012023# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12024# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12026$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012027if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012029else
12030
Matthias Kloseb9621712010-04-24 17:59:49 +000012031if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012032 ac_cv_tanh_preserves_zero_sign=no
12033else
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012035/* end confdefs.h. */
12036
12037#include <math.h>
12038#include <stdlib.h>
12039int main() {
12040 /* return 0 if either negative zeros don't exist
12041 on this platform or if negative zeros exist
12042 and tanh(-0.) == -0. */
12043 if (atan2(0., -1.) == atan2(-0., -1.) ||
12044 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12045 else exit(1);
12046}
12047
12048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012049if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012050 ac_cv_tanh_preserves_zero_sign=yes
12051else
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012056fi
12057
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012058fi
12059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12061$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012062if test "$ac_cv_tanh_preserves_zero_sign" = yes
12063then
12064
Matthias Kloseb9621712010-04-24 17:59:49 +000012065$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012066
12067fi
12068
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012069if test "$ac_cv_func_log1p" = yes
12070then
12071 # On some versions of AIX, log1p(-0.) returns 0. instead of
12072 # -0. See issue #9920.
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12074$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012075 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012076 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012077else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012078
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012079 if test "$cross_compiling" = yes; then :
12080 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012081else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12083/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012084
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012085 #include <math.h>
12086 #include <stdlib.h>
12087 int main() {
12088 /* Fail if the signs of log1p(-0.) and -0. can be
12089 distinguished. */
12090 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12091 return 0;
12092 else
12093 return 1;
12094 }
12095
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012096_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012097if ac_fn_c_try_run "$LINENO"; then :
12098 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012099else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012100 ac_cv_log1p_drops_zero_sign=yes
12101fi
12102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012104fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012105
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012106fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012107
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12109$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12110fi
12111if test "$ac_cv_log1p_drops_zero_sign" = yes
12112then
12113
12114$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12115
12116fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012117
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012118LIBS=$LIBS_SAVE
12119
Mark Dickinsona614f042009-11-28 12:48:43 +000012120# For multiprocessing module, check that sem_open
12121# actually works. For FreeBSD versions <= 7.2,
12122# the kernel module that provides POSIX semaphores
12123# isn't loaded by default, so an attempt to call
12124# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12126$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012127if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012131 ac_cv_posix_semaphores_enabled=yes
12132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012134/* end confdefs.h. */
12135
12136#include <unistd.h>
12137#include <fcntl.h>
12138#include <stdio.h>
12139#include <semaphore.h>
12140#include <sys/stat.h>
12141
12142int main(void) {
12143 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12144 if (a == SEM_FAILED) {
12145 perror("sem_open");
12146 return 1;
12147 }
12148 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012149 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012150 return 0;
12151}
12152
12153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012154if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012155 ac_cv_posix_semaphores_enabled=yes
12156else
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012161fi
12162
12163
Mark Dickinsona614f042009-11-28 12:48:43 +000012164fi
12165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12167$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012168if test $ac_cv_posix_semaphores_enabled = no
12169then
12170
Matthias Kloseb9621712010-04-24 17:59:49 +000012171$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012172
12173fi
12174
Mark Dickinson10683072009-04-18 21:18:19 +000012175# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12177$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012178if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012182 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012183else
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012185/* end confdefs.h. */
12186
12187#include <unistd.h>
12188#include <fcntl.h>
12189#include <stdio.h>
12190#include <semaphore.h>
12191#include <sys/stat.h>
12192
12193int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012194 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012195 int count;
12196 int res;
12197 if(a==SEM_FAILED){
12198 perror("sem_open");
12199 return 1;
12200
12201 }
12202 res = sem_getvalue(a, &count);
12203 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012204 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012205 return res==-1 ? 1 : 0;
12206}
12207
Mark Dickinson10683072009-04-18 21:18:19 +000012208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012209if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012210 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012211else
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012216fi
12217
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012219fi
12220
Matthias Kloseb9621712010-04-24 17:59:49 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12222$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012223if test $ac_cv_broken_sem_getvalue = yes
12224then
12225
Matthias Kloseb9621712010-04-24 17:59:49 +000012226$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012227
12228fi
12229
Mark Dickinsonbd792642009-03-18 20:06:12 +000012230# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12232$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012233# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012234if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012235 enableval=$enable_big_digits; case $enable_big_digits in
12236yes)
12237 enable_big_digits=30 ;;
12238no)
12239 enable_big_digits=15 ;;
1224015|30)
12241 ;;
12242*)
Charles-François Natali47413c12011-10-06 19:47:44 +020012243 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 +000012244esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12246$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012247
12248cat >>confdefs.h <<_ACEOF
12249#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12250_ACEOF
12251
12252
12253else
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12255$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012256fi
12257
12258
Guido van Rossumef2255b2000-03-10 22:30:29 +000012259# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012260ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Charles-François Natali47413c12011-10-06 19:47:44 +020012261if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012262
12263
Matthias Kloseb9621712010-04-24 17:59:49 +000012264$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012265
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012266 wchar_h="yes"
12267
Guido van Rossumef2255b2000-03-10 22:30:29 +000012268else
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012270
12271fi
12272
Michael W. Hudson54241132001-12-07 15:38:26 +000012273
Martin v. Löwis11437992002-04-12 09:54:03 +000012274
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012275# determine wchar_t size
12276if test "$wchar_h" = yes
12277then
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12280# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12281# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12283$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012284if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012286else
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12288"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012289
Martin v. Löwis11437992002-04-12 09:54:03 +000012290else
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 if test "$ac_cv_type_wchar_t" = yes; then
12292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012294as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natali47413c12011-10-06 19:47:44 +020012295See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296 else
12297 ac_cv_sizeof_wchar_t=0
12298 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012300
Martin v. Löwis11437992002-04-12 09:54:03 +000012301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12303$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304
12305
12306
Martin v. Löwis11437992002-04-12 09:54:03 +000012307cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012308#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012309_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012310
Michael W. Hudson54241132001-12-07 15:38:26 +000012311
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012312fi
12313
Matthias Kloseb9621712010-04-24 17:59:49 +000012314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12315$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012316have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012318/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012319
12320#include <tcl.h>
12321#if TCL_UTF_MAX != 6
12322# error "NOT UCS4_TCL"
12323#endif
12324int
12325main ()
12326{
12327
12328 ;
12329 return 0;
12330}
12331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012333
12334
Matthias Kloseb9621712010-04-24 17:59:49 +000012335$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012336
12337 have_ucs4_tcl=yes
12338
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12342$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012343
Skip Montanaro6dead952003-09-25 14:50:04 +000012344# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012345if test "$wchar_h" = yes
12346then
12347 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12349$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012350 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012351 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012352else
12353
Matthias Kloseb9621712010-04-24 17:59:49 +000012354 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012355 ac_cv_wchar_t_signed=yes
12356else
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012358/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012359
12360 #include <wchar.h>
12361 int main()
12362 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012363 /* Success: exit code 0 */
12364 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012365 }
12366
12367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012369 ac_cv_wchar_t_signed=yes
12370else
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12374 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012375fi
12376
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012377fi
12378
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12380$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381fi
12382
Georg Brandl52d168a2008-01-07 18:10:24 +000012383# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012384if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012385 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012386then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012387 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012388
Matthias Kloseb9621712010-04-24 17:59:49 +000012389$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
Georg Brandl52d168a2008-01-07 18:10:24 +000012391else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012392 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012393fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12395$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012396
12397# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12399$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012400if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012402else
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 ac_cv_c_bigendian=unknown
12404 # See if we're dealing with a universal compiler.
12405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12406/* end confdefs.h. */
12407#ifndef __APPLE_CC__
12408 not a universal capable compiler
12409 #endif
12410 typedef int dummy;
12411
Skip Montanaro6dead952003-09-25 14:50:04 +000012412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413if ac_fn_c_try_compile "$LINENO"; then :
12414
12415 # Check for potential -arch flags. It is not universal unless
12416 # there are at least two -arch flags with different values.
12417 ac_arch=
12418 ac_prev=
12419 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12420 if test -n "$ac_prev"; then
12421 case $ac_word in
12422 i?86 | x86_64 | ppc | ppc64)
12423 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12424 ac_arch=$ac_word
12425 else
12426 ac_cv_c_bigendian=universal
12427 break
12428 fi
12429 ;;
12430 esac
12431 ac_prev=
12432 elif test "x$ac_word" = "x-arch"; then
12433 ac_prev=arch
12434 fi
12435 done
12436fi
12437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12438 if test $ac_cv_c_bigendian = unknown; then
12439 # See if sys/param.h defines the BYTE_ORDER macro.
12440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012441/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012442#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012444
Martin v. Löwis11437992002-04-12 09:54:03 +000012445int
12446main ()
12447{
Matthias Kloseb9621712010-04-24 17:59:49 +000012448#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12449 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12450 && LITTLE_ENDIAN)
12451 bogus endian macros
12452 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012453
12454 ;
12455 return 0;
12456}
12457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012459 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012462#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012464
Martin v. Löwis11437992002-04-12 09:54:03 +000012465int
12466main ()
12467{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012468#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012469 not big endian
12470 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012471
12472 ;
12473 return 0;
12474}
12475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012476if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012477 ac_cv_c_bigendian=yes
12478else
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012482fi
12483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12484 fi
12485 if test $ac_cv_c_bigendian = unknown; then
12486 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012489#include <limits.h>
12490
Martin v. Löwis11437992002-04-12 09:54:03 +000012491int
12492main ()
12493{
Matthias Kloseb9621712010-04-24 17:59:49 +000012494#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12495 bogus endian macros
12496 #endif
12497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498 ;
12499 return 0;
12500}
12501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012502if ac_fn_c_try_compile "$LINENO"; then :
12503 # It does; now see whether it defined to _BIG_ENDIAN or not.
12504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12505/* end confdefs.h. */
12506#include <limits.h>
12507
12508int
12509main ()
12510{
12511#ifndef _BIG_ENDIAN
12512 not big endian
12513 #endif
12514
12515 ;
12516 return 0;
12517}
12518_ACEOF
12519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012521else
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12525fi
12526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12527 fi
12528 if test $ac_cv_c_bigendian = unknown; then
12529 # Compile a test program.
12530 if test "$cross_compiling" = yes; then :
12531 # Try to guess by grepping values from an object file.
12532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12533/* end confdefs.h. */
12534short int ascii_mm[] =
12535 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12536 short int ascii_ii[] =
12537 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12538 int use_ascii (int i) {
12539 return ascii_mm[i] + ascii_ii[i];
12540 }
12541 short int ebcdic_ii[] =
12542 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12543 short int ebcdic_mm[] =
12544 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12545 int use_ebcdic (int i) {
12546 return ebcdic_mm[i] + ebcdic_ii[i];
12547 }
12548 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549
Matthias Kloseb9621712010-04-24 17:59:49 +000012550int
12551main ()
12552{
12553return use_ascii (foo) == use_ebcdic (foo);
12554 ;
12555 return 0;
12556}
12557_ACEOF
12558if ac_fn_c_try_compile "$LINENO"; then :
12559 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12560 ac_cv_c_bigendian=yes
12561 fi
12562 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12563 if test "$ac_cv_c_bigendian" = unknown; then
12564 ac_cv_c_bigendian=no
12565 else
12566 # finding both strings is unlikely to happen, but who knows?
12567 ac_cv_c_bigendian=unknown
12568 fi
12569 fi
12570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012572else
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012574/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012576int
12577main ()
12578{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012579
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 /* Are we little or big endian? From Harbison&Steele. */
12581 union
12582 {
12583 long int l;
12584 char c[sizeof (long int)];
12585 } u;
12586 u.l = 1;
12587 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588
12589 ;
12590 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012591}
Martin v. Löwis11437992002-04-12 09:54:03 +000012592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012593if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012594 ac_cv_c_bigendian=no
12595else
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12599 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12605$as_echo "$ac_cv_c_bigendian" >&6; }
12606 case $ac_cv_c_bigendian in #(
12607 yes)
12608 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12609;; #(
12610 no)
12611 ;; #(
12612 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012613
Matthias Kloseb9621712010-04-24 17:59:49 +000012614$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012615
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 ;; #(
12617 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012618 as_fn_error $? "unknown endianness
Charles-François Natali47413c12011-10-06 19:47:44 +020012619 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012620 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012621
Michael W. Hudson54241132001-12-07 15:38:26 +000012622
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012623# ABI version string for Python extension modules. This appears between the
12624# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12625# from the following attributes which affect the ABI of this Python build (in
12626# this order):
12627#
12628# * The Python implementation (always 'cpython-' for us)
12629# * The major and minor version numbers
12630# * --with-pydebug (adds a 'd')
12631# * --with-pymalloc (adds a 'm')
12632# * --with-wide-unicode (adds a 'u')
12633#
12634# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012635# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12636# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012637
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12639$as_echo_n "checking ABIFLAGS... " >&6; }
12640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12641$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12643$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012644SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12646$as_echo "$SOABI" >&6; }
12647
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12649$as_echo_n "checking LDVERSION... " >&6; }
12650LDVERSION='$(VERSION)$(ABIFLAGS)'
12651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12652$as_echo "$LDVERSION" >&6; }
12653
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012654# SO is the extension of shared libraries `(including the dot!)
12655# -- usually .so, .sl on HP-UX, .dll on Cygwin
12656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12657$as_echo_n "checking SO... " >&6; }
12658if test -z "$SO"
12659then
12660 case $ac_sys_system in
12661 hp*|HP*)
12662 case `uname -m` in
12663 ia64) SO=.so;;
12664 *) SO=.sl;;
12665 esac
12666 ;;
12667 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012668 Linux*|GNU*)
12669 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012670 *) SO=.so;;
12671 esac
12672else
12673 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012674 echo
12675 echo '====================================================================='
12676 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012677 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012678 echo '+ Do you really mean to change the extension for shared libraries? +'
12679 echo '+ Continuing in 10 seconds to let you to ponder. +'
12680 echo '+ +'
12681 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012682 sleep 10
12683fi
12684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12685$as_echo "$SO" >&6; }
12686
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012687# Check whether right shifting a negative integer extends the sign bit
12688# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12690$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012691if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012693else
Martin v. Löwis11437992002-04-12 09:54:03 +000012694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012696 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012697else
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012699/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012700
12701int main()
12702{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012703 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012704}
12705
Martin v. Löwis11437992002-04-12 09:54:03 +000012706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012708 ac_cv_rshift_extends_sign=yes
12709else
Matthias Kloseb9621712010-04-24 17:59:49 +000012710 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12713 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012714fi
12715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716fi
12717
Matthias Kloseb9621712010-04-24 17:59:49 +000012718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12719$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012720if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012721then
Martin v. Löwis11437992002-04-12 09:54:03 +000012722
Matthias Kloseb9621712010-04-24 17:59:49 +000012723$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012724
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012725fi
12726
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012727# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12729$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012730if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012732else
Martin v. Löwis11437992002-04-12 09:54:03 +000012733
Matthias Kloseb9621712010-04-24 17:59:49 +000012734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012735/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012736#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012737int
12738main ()
12739{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012740
12741 FILE *f = fopen("/dev/null", "r");
12742 flockfile(f);
12743 getc_unlocked(f);
12744 funlockfile(f);
12745
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012751 ac_cv_have_getc_unlocked=yes
12752else
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 ac_cv_have_getc_unlocked=no
12754fi
12755rm -f core conftest.err conftest.$ac_objext \
12756 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12760$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012761if test "$ac_cv_have_getc_unlocked" = yes
12762then
Martin v. Löwis11437992002-04-12 09:54:03 +000012763
Matthias Kloseb9621712010-04-24 17:59:49 +000012764$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012765
12766fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012767
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012768# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012769# save the value of LIBS so we don't actually link Python with readline
12770LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012771
Gregory P. Smith18820942008-09-07 06:24:49 +000012772# On some systems we need to link readline to a termcap compatible
12773# library. NOTE: Keep the precedence of listed libraries synchronised
12774# with setup.py.
12775py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12777$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012778for py_libtermcap in "" ncursesw ncurses curses termcap; do
12779 if test -z "$py_libtermcap"; then
12780 READLINE_LIBS="-lreadline"
12781 else
12782 READLINE_LIBS="-lreadline -l$py_libtermcap"
12783 fi
12784 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012786/* end confdefs.h. */
12787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788/* Override any GCC internal prototype to avoid an error.
12789 Use char because int might match the return type of a GCC
12790 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012791#ifdef __cplusplus
12792extern "C"
12793#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012794char readline ();
12795int
12796main ()
12797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012798return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012799 ;
12800 return 0;
12801}
12802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012803if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012804 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012806rm -f core conftest.err conftest.$ac_objext \
12807 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012808 if test $py_cv_lib_readline = yes; then
12809 break
12810 fi
12811done
12812# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12813#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012814if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12816$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012817else
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12819$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012822
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012823fi
12824
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012825# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12827$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012828if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012830else
12831 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012832LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012834/* end confdefs.h. */
12835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836/* Override any GCC internal prototype to avoid an error.
12837 Use char because int might match the return type of a GCC
12838 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012839#ifdef __cplusplus
12840extern "C"
12841#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012842char rl_callback_handler_install ();
12843int
12844main ()
12845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012847 ;
12848 return 0;
12849}
12850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012851if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012852 ac_cv_lib_readline_rl_callback_handler_install=yes
12853else
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012856rm -f core conftest.err conftest.$ac_objext \
12857 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012858LIBS=$ac_check_lib_save_LIBS
12859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12861$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012862if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012863
Matthias Kloseb9621712010-04-24 17:59:49 +000012864$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012865
12866fi
12867
12868
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012869# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012871/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012872#include <readline/readline.h>
12873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012874if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012875 have_readline=yes
12876else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012877 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012878
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012879fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012880rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012881if test $have_readline = yes
12882then
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012884/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012885#include <readline/readline.h>
12886
12887_ACEOF
12888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012892
12893fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012894rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012897/* end confdefs.h. */
12898#include <readline/readline.h>
12899
12900_ACEOF
12901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012903
Matthias Kloseb9621712010-04-24 17:59:49 +000012904$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012905
12906fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012907rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012908
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012909fi
12910
Martin v. Löwis0daad592001-09-30 21:09:59 +000012911# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12913$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012914if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012916else
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012918LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922/* Override any GCC internal prototype to avoid an error.
12923 Use char because int might match the return type of a GCC
12924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012925#ifdef __cplusplus
12926extern "C"
12927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012928char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012929int
12930main ()
12931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 ;
12934 return 0;
12935}
12936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012937if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012938 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012939else
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012942rm -f core conftest.err conftest.$ac_objext \
12943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012944LIBS=$ac_check_lib_save_LIBS
12945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12947$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012948if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012951
Martin v. Löwis0daad592001-09-30 21:09:59 +000012952fi
12953
Michael W. Hudson54241132001-12-07 15:38:26 +000012954
Thomas Wouters89d996e2007-09-08 17:39:28 +000012955# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12957$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012958if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012960else
12961 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012962LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012964/* end confdefs.h. */
12965
12966/* Override any GCC internal prototype to avoid an error.
12967 Use char because int might match the return type of a GCC
12968 builtin and then its argument prototype would still apply. */
12969#ifdef __cplusplus
12970extern "C"
12971#endif
12972char rl_completion_display_matches_hook ();
12973int
12974main ()
12975{
12976return rl_completion_display_matches_hook ();
12977 ;
12978 return 0;
12979}
12980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012981if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012982 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12983else
Matthias Kloseb9621712010-04-24 17:59:49 +000012984 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012986rm -f core conftest.err conftest.$ac_objext \
12987 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012988LIBS=$ac_check_lib_save_LIBS
12989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12991$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020012992if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012993
Matthias Kloseb9621712010-04-24 17:59:49 +000012994$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012995
12996fi
12997
12998
Martin v. Löwis0daad592001-09-30 21:09:59 +000012999# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13001$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013002if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013004else
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013006LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010/* Override any GCC internal prototype to avoid an error.
13011 Use char because int might match the return type of a GCC
13012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013013#ifdef __cplusplus
13014extern "C"
13015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013016char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013017int
13018main ()
13019{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 ;
13022 return 0;
13023}
13024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013025if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013026 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013027else
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013030rm -f core conftest.err conftest.$ac_objext \
13031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013032LIBS=$ac_check_lib_save_LIBS
13033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13035$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013036if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013037
Matthias Kloseb9621712010-04-24 17:59:49 +000013038$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013039
Guido van Rossum353ae582001-07-10 16:45:32 +000013040fi
13041
Jack Jansendd19cf82001-12-06 22:36:17 +000013042
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013043# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013045/* end confdefs.h. */
13046#include <readline/readline.h>
13047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013048if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013049 have_readline=yes
13050else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013051 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013052
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013053fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013054rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013055if test $have_readline = yes
13056then
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013058/* end confdefs.h. */
13059#include <readline/readline.h>
13060
13061_ACEOF
13062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013066
13067fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013068rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013069
13070fi
13071
Martin v. Löwis82bca632006-02-10 20:49:30 +000013072# End of readline checks: restore LIBS
13073LIBS=$LIBS_no_readline
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13076$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013077if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013079else
Martin v. Löwis11437992002-04-12 09:54:03 +000013080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013082 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013085/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013086
13087int main()
13088{
13089 int val1 = nice(1);
13090 if (val1 != -1 && val1 == nice(2))
13091 exit(0);
13092 exit(1);
13093}
13094
Martin v. Löwis11437992002-04-12 09:54:03 +000013095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013096if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013097 ac_cv_broken_nice=yes
13098else
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13102 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013103fi
13104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013105fi
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13108$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013109if test "$ac_cv_broken_nice" = yes
13110then
Martin v. Löwis11437992002-04-12 09:54:03 +000013111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013113
13114fi
13115
Matthias Kloseb9621712010-04-24 17:59:49 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13117$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013118if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120else
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013122 ac_cv_broken_poll=no
13123else
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013125/* end confdefs.h. */
13126
13127#include <poll.h>
13128
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013129int main()
13130{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013131 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013132 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013133
13134 close (42);
13135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013136 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013137 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013138 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013139 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013140 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013141 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013142 return 1;
13143}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013144
13145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013146if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013147 ac_cv_broken_poll=yes
13148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013155fi
13156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13158$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013159if test "$ac_cv_broken_poll" = yes
13160then
13161
Matthias Kloseb9621712010-04-24 17:59:49 +000013162$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013163
13164fi
13165
Brett Cannon43802422005-02-10 20:48:03 +000013166# 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 +000013167# (which is not required by ISO C or UNIX spec) and/or if we support
13168# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013169ac_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 +000013170#include <$ac_cv_struct_tm>
13171
Matthias Kloseb9621712010-04-24 17:59:49 +000013172"
Charles-François Natali47413c12011-10-06 19:47:44 +020013173if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013174
13175cat >>confdefs.h <<_ACEOF
13176#define HAVE_STRUCT_TM_TM_ZONE 1
13177_ACEOF
13178
13179
13180fi
13181
13182if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013185
13186else
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13188"
Charles-François Natali47413c12011-10-06 19:47:44 +020013189if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191else
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193fi
13194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013195cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013196#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197_ACEOF
13198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13200$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013201if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013205/* end confdefs.h. */
13206#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207#if !HAVE_DECL_TZNAME
13208extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013209#endif
13210
13211int
13212main ()
13213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013215 ;
13216 return 0;
13217}
13218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013219if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013220 ac_cv_var_tzname=yes
13221else
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013224rm -f core conftest.err conftest.$ac_objext \
13225 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13228$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013229 if test $ac_cv_var_tzname = yes; then
13230
Matthias Kloseb9621712010-04-24 17:59:49 +000013231$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013232
13233 fi
13234fi
13235
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013236
Martin v. Löwis1d459062005-03-14 21:23:33 +000013237# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13239$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013240if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013242else
13243
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013245 ac_cv_working_tzset=no
13246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013248/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013249
13250#include <stdlib.h>
13251#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013252#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013253
13254#if HAVE_TZNAME
13255extern char *tzname[];
13256#endif
13257
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013258int main()
13259{
Brett Cannon18367812003-09-19 00:59:16 +000013260 /* Note that we need to ensure that not only does tzset(3)
13261 do 'something' with localtime, but it works as documented
13262 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013263 This includes making sure that tzname is set properly if
13264 tm->tm_zone does not exist since it is the alternative way
13265 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013266
13267 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013268 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013269 */
13270
Martin v. Löwis1d459062005-03-14 21:23:33 +000013271 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013272 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13273
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013274 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013275 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013276 if (localtime(&groundhogday)->tm_hour != 0)
13277 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013278#if HAVE_TZNAME
13279 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13280 if (strcmp(tzname[0], "UTC") ||
13281 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13282 exit(1);
13283#endif
Brett Cannon18367812003-09-19 00:59:16 +000013284
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013285 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013286 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013287 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013288 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013289#if HAVE_TZNAME
13290 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13291 exit(1);
13292#endif
Brett Cannon18367812003-09-19 00:59:16 +000013293
13294 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13295 tzset();
13296 if (localtime(&groundhogday)->tm_hour != 11)
13297 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013298#if HAVE_TZNAME
13299 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13300 exit(1);
13301#endif
13302
13303#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013304 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13305 exit(1);
13306 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13307 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013308#endif
Brett Cannon18367812003-09-19 00:59:16 +000013309
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013310 exit(0);
13311}
13312
13313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013314if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013315 ac_cv_working_tzset=yes
13316else
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13320 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013321fi
13322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323fi
13324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13326$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013327if test "$ac_cv_working_tzset" = yes
13328then
13329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013331
13332fi
13333
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013334# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13336$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013337if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013339else
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013341/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013342#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013343int
13344main ()
13345{
13346
13347struct stat st;
13348st.st_mtim.tv_nsec = 1;
13349
13350 ;
13351 return 0;
13352}
13353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013355 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013356else
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13360fi
13361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13363$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013364if test "$ac_cv_stat_tv_nsec" = yes
13365then
13366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013368
13369fi
13370
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013371# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13373$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013374if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013376else
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013378/* end confdefs.h. */
13379#include <sys/stat.h>
13380int
13381main ()
13382{
13383
13384struct stat st;
13385st.st_mtimespec.tv_nsec = 1;
13386
13387 ;
13388 return 0;
13389}
13390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013392 ac_cv_stat_tv_nsec2=yes
13393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13397fi
13398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13400$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013401if test "$ac_cv_stat_tv_nsec2" = yes
13402then
13403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013405
13406fi
13407
Jack Jansen666b1e72001-10-31 12:11:48 +000013408# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13410$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013411if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013413else
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013415/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013416#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013417int
13418main ()
13419{
Jack Jansen666b1e72001-10-31 12:11:48 +000013420
13421 int rtn;
13422 rtn = mvwdelch(0,0,0);
13423
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 ;
13425 return 0;
13426}
13427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013428if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013429 ac_cv_mvwdelch_is_expression=yes
13430else
Matthias Kloseb9621712010-04-24 17:59:49 +000013431 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13434fi
13435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13437$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013438
13439if test "$ac_cv_mvwdelch_is_expression" = yes
13440then
Martin v. Löwis11437992002-04-12 09:54:03 +000013441
Matthias Kloseb9621712010-04-24 17:59:49 +000013442$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013443
13444fi
13445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13447$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013448if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013450else
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013452/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013453#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013454int
13455main ()
13456{
Jack Jansen666b1e72001-10-31 12:11:48 +000013457
13458 WINDOW *w;
13459 w->_flags = 0;
13460
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 ;
13462 return 0;
13463}
13464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013465if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013466 ac_cv_window_has_flags=yes
13467else
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13471fi
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13474$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013475
Jack Jansen666b1e72001-10-31 12:11:48 +000013476
13477if test "$ac_cv_window_has_flags" = yes
13478then
Martin v. Löwis11437992002-04-12 09:54:03 +000013479
Matthias Kloseb9621712010-04-24 17:59:49 +000013480$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013481
13482fi
13483
Matthias Kloseb9621712010-04-24 17:59:49 +000013484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13485$as_echo_n "checking for is_term_resized... " >&6; }
13486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013487/* end confdefs.h. */
13488#include <curses.h>
13489int
13490main ()
13491{
13492void *x=is_term_resized
13493 ;
13494 return 0;
13495}
13496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013500
Matthias Kloseb159a552010-04-25 21:00:44 +000013501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013502$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013503else
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13505$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013506
13507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13511$as_echo_n "checking for resize_term... " >&6; }
13512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013513/* end confdefs.h. */
13514#include <curses.h>
13515int
13516main ()
13517{
13518void *x=resize_term
13519 ;
13520 return 0;
13521}
13522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013523if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013526
Matthias Kloseb159a552010-04-25 21:00:44 +000013527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013528$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013529else
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13531$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013532
13533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13537$as_echo_n "checking for resizeterm... " >&6; }
13538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013539/* end confdefs.h. */
13540#include <curses.h>
13541int
13542main ()
13543{
13544void *x=resizeterm
13545 ;
13546 return 0;
13547}
13548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013549if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013552
Matthias Kloseb159a552010-04-25 21:00:44 +000013553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013554$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013555else
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13557$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013558
13559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13563$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013564
13565if test -r /dev/ptmx
13566then
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13568$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013571
Thomas Wouters89f507f2006-12-13 04:49:30 +000013572else
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13574$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013575fi
13576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13578$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013579
13580if test -r /dev/ptc
13581then
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13583$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013586
Thomas Wouters89f507f2006-12-13 04:49:30 +000013587else
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13589$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013590fi
13591
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013592if test "$have_long_long" = yes
13593then
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13595$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013596 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013600 ac_cv_have_long_long_format=no
13601else
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013603/* end confdefs.h. */
13604
13605 #include <stdio.h>
13606 #include <stddef.h>
13607 #include <string.h>
13608
13609 #ifdef HAVE_SYS_TYPES_H
13610 #include <sys/types.h>
13611 #endif
13612
13613 int main()
13614 {
13615 char buffer[256];
13616
13617 if (sprintf(buffer, "%lld", (long long)123) < 0)
13618 return 1;
13619 if (strcmp(buffer, "123"))
13620 return 1;
13621
13622 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13623 return 1;
13624 if (strcmp(buffer, "-123"))
13625 return 1;
13626
13627 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13628 return 1;
13629 if (strcmp(buffer, "123"))
13630 return 1;
13631
13632 return 0;
13633 }
13634
13635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013636if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013637 ac_cv_have_long_long_format=yes
13638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13642 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013643fi
13644
13645
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013646fi
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13649$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013650fi
13651
Mark Dickinson89d7d412009-12-31 20:50:59 +000013652if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013653then
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013656
13657fi
13658
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013659if test $ac_sys_system = Darwin
13660then
13661 LIBS="$LIBS -framework CoreFoundation"
13662fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13665$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013666if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013668else
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013670 ac_cv_have_size_t_format="cross -- assuming yes"
13671
Thomas Wouters477c8d52006-05-27 19:21:47 +000013672else
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013674/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013675
Thomas Wouters477c8d52006-05-27 19:21:47 +000013676#include <stdio.h>
13677#include <stddef.h>
13678#include <string.h>
13679
Christian Heimes2c181612007-12-17 20:04:13 +000013680#ifdef HAVE_SYS_TYPES_H
13681#include <sys/types.h>
13682#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013683
13684#ifdef HAVE_SSIZE_T
13685typedef ssize_t Py_ssize_t;
13686#elif SIZEOF_VOID_P == SIZEOF_LONG
13687typedef long Py_ssize_t;
13688#else
13689typedef int Py_ssize_t;
13690#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013691
Christian Heimes2c181612007-12-17 20:04:13 +000013692int main()
13693{
13694 char buffer[256];
13695
Thomas Wouters477c8d52006-05-27 19:21:47 +000013696 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13697 return 1;
13698
Thomas Wouters89f507f2006-12-13 04:49:30 +000013699 if (strcmp(buffer, "123"))
13700 return 1;
13701
13702 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13703 return 1;
13704
13705 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013706 return 1;
13707
13708 return 0;
13709}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013710
Thomas Wouters477c8d52006-05-27 19:21:47 +000013711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013712if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013713 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013719fi
13720
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13723$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013724if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013727
13728fi
13729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013731#ifdef HAVE_SYS_TYPES_H
13732#include <sys/types.h>
13733#endif
13734#ifdef HAVE_SYS_SOCKET_H
13735#include <sys/socket.h>
13736#endif
13737
Matthias Kloseb9621712010-04-24 17:59:49 +000013738"
Charles-François Natali47413c12011-10-06 19:47:44 +020013739if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013740
Martin v. Löwis11437992002-04-12 09:54:03 +000013741else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013744
13745fi
13746
Michael W. Hudson54241132001-12-07 15:38:26 +000013747
Matthias Kloseb9621712010-04-24 17:59:49 +000013748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13749$as_echo_n "checking for broken mbstowcs... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013750if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013752else
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013754 ac_cv_broken_mbstowcs=no
13755else
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013757/* end confdefs.h. */
13758
13759#include<stdlib.h>
13760int main() {
13761 size_t len = -1;
13762 const char *str = "text";
13763 len = mbstowcs(NULL, str, 0);
13764 return (len != 4);
13765}
13766
13767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013768if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013769 ac_cv_broken_mbstowcs=no
13770else
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013775fi
13776
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013777fi
13778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13780$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013781if test "$ac_cv_broken_mbstowcs" = yes
13782then
13783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013785
13786fi
13787
Antoine Pitrou042b1282010-08-13 21:15:58 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13789$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Charles-François Natali47413c12011-10-06 19:47:44 +020013790if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013791 $as_echo_n "(cached) " >&6
13792else
13793 if test "$cross_compiling" = yes; then :
13794 ac_cv_computed_gotos=no
13795else
13796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13797/* end confdefs.h. */
13798
13799int main(int argc, char **argv)
13800{
13801 static void *targets[1] = { &&LABEL1 };
13802 goto LABEL2;
13803LABEL1:
13804 return 0;
13805LABEL2:
13806 goto *targets[0];
13807 return 1;
13808}
13809
13810_ACEOF
13811if ac_fn_c_try_run "$LINENO"; then :
13812 ac_cv_computed_gotos=yes
13813else
13814 ac_cv_computed_gotos=no
13815fi
13816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13817 conftest.$ac_objext conftest.beam conftest.$ac_ext
13818fi
13819
13820fi
13821
13822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13823$as_echo "$ac_cv_computed_gotos" >&6; }
13824if test "$ac_cv_computed_gotos" = yes
13825then
13826
13827$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13828
13829fi
13830
Antoine Pitroub52ec782009-01-25 16:34:23 +000013831# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13833$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013834
13835# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013836if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013837 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013838if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013839then
13840
Matthias Kloseb9621712010-04-24 17:59:49 +000013841$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013842
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13844$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013845fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013846if test "$withval" = no
13847then
13848
13849$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13850
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13852$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013853fi
13854
Antoine Pitrou042b1282010-08-13 21:15:58 +000013855else
13856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13857$as_echo "no value specified" >&6; }
13858fi
13859
Antoine Pitroub52ec782009-01-25 16:34:23 +000013860
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013861case $ac_sys_system in
13862AIX*)
13863
13864$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13865 ;;
13866esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013867
Michael W. Hudson54241132001-12-07 15:38:26 +000013868
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013869
13870
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013871for h in `(cd $srcdir;echo Python/thread_*.h)`
13872do
13873 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13874done
13875
Michael W. Hudson54241132001-12-07 15:38:26 +000013876
Neal Norwitzd24499d2005-12-18 21:36:39 +000013877SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13879$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013880for dir in $SRCDIRS; do
13881 if test ! -d $dir; then
13882 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013883 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013884done
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13886$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013887
Guido van Rossum627b2d71993-12-24 10:39:16 +000013888# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013889ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013890
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013891ac_config_files="$ac_config_files Modules/ld_so_aix"
13892
Martin v. Löwis11437992002-04-12 09:54:03 +000013893cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013894# This file is a shell script that caches the results of configure
13895# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013896# scripts and configure runs, see configure's option --config-cache.
13897# It is not useful on other systems. If it contains results you don't
13898# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013899#
Martin v. Löwis11437992002-04-12 09:54:03 +000013900# config.status only pays attention to the cache file if you give it
13901# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013902#
Skip Montanaro6dead952003-09-25 14:50:04 +000013903# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013904# loading this file, other *unset* `ac_cv_foo' will be assigned the
13905# following values.
13906
13907_ACEOF
13908
Guido van Rossumf78abae1997-01-21 22:02:36 +000013909# The following way of writing the cache mishandles newlines in values,
13910# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013912# Ultrix sh set writes to stderr and can't be redirected directly,
13913# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914(
13915 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13916 eval ac_val=\$$ac_var
13917 case $ac_val in #(
13918 *${as_nl}*)
13919 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13921$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922 esac
13923 case $ac_var in #(
13924 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013925 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13926 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927 esac ;;
13928 esac
13929 done
13930
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13933 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 # `set' does not quote correctly, so add quotes: double-quote
13935 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013937 "s/'/'\\\\''/g;
13938 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 *)
13941 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013944 esac |
13945 sort
13946) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13952 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13954 :end' >>confcache
13955if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13956 if test -w "$cache_file"; then
Charles-François Natali47413c12011-10-06 19:47:44 +020013957 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13959$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natali47413c12011-10-06 19:47:44 +020013960 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013961 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13963$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013964 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013965fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013966rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013968test "x$prefix" = xNONE && prefix=$ac_default_prefix
13969# Let make expand exec_prefix.
13970test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013971
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972DEFS=-DHAVE_CONFIG_H
13973
Skip Montanaro6dead952003-09-25 14:50:04 +000013974ac_libobjs=
13975ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013976U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013977for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13978 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13982 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13984 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013985done
13986LIBOBJS=$ac_libobjs
13987
13988LTLIBOBJS=$ac_ltlibobjs
13989
13990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992
Charles-François Natali47413c12011-10-06 19:47:44 +020013993: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013994ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013995ac_clean_files_save=$ac_clean_files
13996ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013997{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13998$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13999as_write_fail=0
14000cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014001#! $SHELL
14002# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014003# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014004# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014005# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014006
Martin v. Löwis11437992002-04-12 09:54:03 +000014007debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014008ac_cs_recheck=false
14009ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014010
Matthias Kloseb9621712010-04-24 17:59:49 +000014011SHELL=\${CONFIG_SHELL-$SHELL}
14012export SHELL
14013_ASEOF
14014cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14015## -------------------- ##
14016## M4sh Initialization. ##
14017## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019# Be more Bourne compatible
14020DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 emulate sh
14023 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014025 # is contrary to our usage. Disable this feature.
14026 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014028else
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 case `(set -o) 2>/dev/null` in #(
14030 *posix*) :
14031 set -o posix ;; #(
14032 *) :
14033 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014036
14037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038as_nl='
14039'
14040export as_nl
14041# Printing a long string crashes Solaris 7 /usr/bin/printf.
14042as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14043as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14044as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14045# Prefer a ksh shell builtin over an external printf program on Solaris,
14046# but without wasting forks for bash or zsh.
14047if test -z "$BASH_VERSION$ZSH_VERSION" \
14048 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14049 as_echo='print -r --'
14050 as_echo_n='print -rn --'
14051elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14052 as_echo='printf %s\n'
14053 as_echo_n='printf %s'
14054else
14055 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14056 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14057 as_echo_n='/usr/ucb/echo -n'
14058 else
14059 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14060 as_echo_n_body='eval
14061 arg=$1;
14062 case $arg in #(
14063 *"$as_nl"*)
14064 expr "X$arg" : "X\\(.*\\)$as_nl";
14065 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14066 esac;
14067 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14068 '
14069 export as_echo_n_body
14070 as_echo_n='sh -c $as_echo_n_body as_echo'
14071 fi
14072 export as_echo_body
14073 as_echo='sh -c $as_echo_body as_echo'
14074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
14076# The user is always right.
14077if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 PATH_SEPARATOR=:
14079 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14080 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14081 PATH_SEPARATOR=';'
14082 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085
14086# IFS
14087# We need space, tab and new line, in precisely that order. Quoting is
14088# there to prevent editors from complaining about space-tab.
14089# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14090# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091IFS=" "" $as_nl"
14092
14093# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014094case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095 *[\\/]* ) as_myself=$0 ;;
14096 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014097for as_dir in $PATH
14098do
14099 IFS=$as_save_IFS
14100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14102 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014105 ;;
14106esac
14107# We did not find ourselves, most probably we were run as `sh COMMAND'
14108# in which case we are not to be found in the path.
14109if test "x$as_myself" = x; then
14110 as_myself=$0
14111fi
14112if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14114 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014115fi
14116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117# Unset variables that we do not need and which cause bugs (e.g. in
14118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14119# suppresses any "Segmentation fault" message there. '((' could
14120# trigger a bug in pdksh 5.2.14.
14121for as_var in BASH_ENV ENV MAIL MAILPATH
14122do eval test x\${$as_var+set} = xset \
14123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124done
14125PS1='$ '
14126PS2='> '
14127PS4='+ '
14128
14129# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014130LC_ALL=C
14131export LC_ALL
14132LANGUAGE=C
14133export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134
Matthias Kloseb9621712010-04-24 17:59:49 +000014135# CDPATH.
14136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14137
14138
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014139# as_fn_error STATUS ERROR [LINENO LOG_FD]
14140# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014141# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14142# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014143# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014144as_fn_error ()
14145{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014146 as_status=$1; test $as_status -eq 0 && as_status=1
14147 if test "$4"; then
14148 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14149 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014151 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 as_fn_exit $as_status
14153} # as_fn_error
14154
14155
14156# as_fn_set_status STATUS
14157# -----------------------
14158# Set $? to STATUS, without forking.
14159as_fn_set_status ()
14160{
14161 return $1
14162} # as_fn_set_status
14163
14164# as_fn_exit STATUS
14165# -----------------
14166# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14167as_fn_exit ()
14168{
14169 set +e
14170 as_fn_set_status $1
14171 exit $1
14172} # as_fn_exit
14173
14174# as_fn_unset VAR
14175# ---------------
14176# Portably unset VAR.
14177as_fn_unset ()
14178{
14179 { eval $1=; unset $1;}
14180}
14181as_unset=as_fn_unset
14182# as_fn_append VAR VALUE
14183# ----------------------
14184# Append the text in VALUE to the end of the definition contained in VAR. Take
14185# advantage of any shell optimizations that allow amortized linear growth over
14186# repeated appends, instead of the typical quadratic growth present in naive
14187# implementations.
14188if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14189 eval 'as_fn_append ()
14190 {
14191 eval $1+=\$2
14192 }'
14193else
14194 as_fn_append ()
14195 {
14196 eval $1=\$$1\$2
14197 }
14198fi # as_fn_append
14199
14200# as_fn_arith ARG...
14201# ------------------
14202# Perform arithmetic evaluation on the ARGs, and store the result in the
14203# global $as_val. Take advantage of shells that can avoid forks. The arguments
14204# must be portable across $(()) and expr.
14205if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14206 eval 'as_fn_arith ()
14207 {
14208 as_val=$(( $* ))
14209 }'
14210else
14211 as_fn_arith ()
14212 {
14213 as_val=`expr "$@" || test $? -eq 1`
14214 }
14215fi # as_fn_arith
14216
14217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218if expr a : '\(a\)' >/dev/null 2>&1 &&
14219 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14220 as_expr=expr
14221else
14222 as_expr=false
14223fi
14224
14225if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14226 as_basename=basename
14227else
14228 as_basename=false
14229fi
14230
Matthias Kloseb9621712010-04-24 17:59:49 +000014231if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14232 as_dirname=dirname
14233else
14234 as_dirname=false
14235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237as_me=`$as_basename -- "$0" ||
14238$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14239 X"$0" : 'X\(//\)$' \| \
14240 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014241$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242 sed '/^.*\/\([^/][^/]*\)\/*$/{
14243 s//\1/
14244 q
14245 }
14246 /^X\/\(\/\/\)$/{
14247 s//\1/
14248 q
14249 }
14250 /^X\/\(\/\).*/{
14251 s//\1/
14252 q
14253 }
14254 s/.*/./; q'`
14255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256# Avoid depending upon Character Ranges.
14257as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14258as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14259as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14260as_cr_digits='0123456789'
14261as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262
14263ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014264case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 xy) ECHO_C='\c';;
14269 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14270 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271 esac;;
14272*)
14273 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014274esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014275
Martin v. Löwis11437992002-04-12 09:54:03 +000014276rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277if test -d conf$$.dir; then
14278 rm -f conf$$.dir/conf$$.file
14279else
14280 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014283if (echo >conf$$.file) 2>/dev/null; then
14284 if ln -s conf$$.file conf$$ 2>/dev/null; then
14285 as_ln_s='ln -s'
14286 # ... but there are two gotchas:
14287 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14288 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14289 # In both cases, we have to default to `cp -p'.
14290 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14291 as_ln_s='cp -p'
14292 elif ln conf$$.file conf$$ 2>/dev/null; then
14293 as_ln_s=ln
14294 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014295 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014297else
14298 as_ln_s='cp -p'
14299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14301rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014302
Matthias Kloseb9621712010-04-24 17:59:49 +000014303
14304# as_fn_mkdir_p
14305# -------------
14306# Create "$as_dir" as a directory, including parents if necessary.
14307as_fn_mkdir_p ()
14308{
14309
14310 case $as_dir in #(
14311 -*) as_dir=./$as_dir;;
14312 esac
14313 test -d "$as_dir" || eval $as_mkdir_p || {
14314 as_dirs=
14315 while :; do
14316 case $as_dir in #(
14317 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14318 *) as_qdir=$as_dir;;
14319 esac
14320 as_dirs="'$as_qdir' $as_dirs"
14321 as_dir=`$as_dirname -- "$as_dir" ||
14322$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14323 X"$as_dir" : 'X\(//\)[^/]' \| \
14324 X"$as_dir" : 'X\(//\)$' \| \
14325 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14326$as_echo X"$as_dir" |
14327 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14328 s//\1/
14329 q
14330 }
14331 /^X\(\/\/\)[^/].*/{
14332 s//\1/
14333 q
14334 }
14335 /^X\(\/\/\)$/{
14336 s//\1/
14337 q
14338 }
14339 /^X\(\/\).*/{
14340 s//\1/
14341 q
14342 }
14343 s/.*/./; q'`
14344 test -d "$as_dir" && break
14345 done
14346 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014347 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014348
14349
14350} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014351if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014353else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014354 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014355 as_mkdir_p=false
14356fi
14357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014358if test -x / >/dev/null 2>&1; then
14359 as_test_x='test -x'
14360else
14361 if ls -dL / >/dev/null 2>&1; then
14362 as_ls_L_option=L
14363 else
14364 as_ls_L_option=
14365 fi
14366 as_test_x='
14367 eval sh -c '\''
14368 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 case $1 in #(
14372 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375 ???[sx]*):;;*)false;;esac;fi
14376 '\'' sh
14377 '
14378fi
14379as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
14381# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014382as_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 +000014383
14384# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014385as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
14387
Martin v. Löwis11437992002-04-12 09:54:03 +000014388exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014389## ----------------------------------- ##
14390## Main body of $CONFIG_STATUS script. ##
14391## ----------------------------------- ##
14392_ASEOF
14393test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
Matthias Kloseb9621712010-04-24 17:59:49 +000014395cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14396# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014397# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398# values after options handling.
14399ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014400This file was extended by python $as_me 3.3, which was
Charles-François Natali47413c12011-10-06 19:47:44 +020014401generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014402
14403 CONFIG_FILES = $CONFIG_FILES
14404 CONFIG_HEADERS = $CONFIG_HEADERS
14405 CONFIG_LINKS = $CONFIG_LINKS
14406 CONFIG_COMMANDS = $CONFIG_COMMANDS
14407 $ $0 $@
14408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409on `(hostname || uname -n) 2>/dev/null | sed 1q`
14410"
14411
Martin v. Löwis11437992002-04-12 09:54:03 +000014412_ACEOF
14413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414case $ac_config_files in *"
14415"*) set x $ac_config_files; shift; ac_config_files=$*;;
14416esac
14417
14418case $ac_config_headers in *"
14419"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14420esac
14421
14422
14423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014424# Files that config.status was made for.
Benjamin Peterson94b580d2011-08-02 17:30:04 -050014425config_files="$ac_config_files"
14426config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014431ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014432\`$as_me' instantiates files and other configuration actions
14433from templates according to the current configuration. Unless the files
14434and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
14438 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 --config print configuration, then exit
14441 -q, --quiet, --silent
14442 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 -d, --debug don't remove temporary files
14444 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 --file=FILE[:TEMPLATE]
14446 instantiate the configuration file FILE
14447 --header=FILE[:TEMPLATE]
14448 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
14450Configuration files:
14451$config_files
14452
14453Configuration headers:
14454$config_headers
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014459cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14460ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014461ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014462python config.status 3.3
Charles-François Natali47413c12011-10-06 19:47:44 +020014463configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014466Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014467This config.status script is free software; the Free Software Foundation
14468gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469
14470ac_pwd='$ac_pwd'
14471srcdir='$srcdir'
14472INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014473test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014474_ACEOF
14475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14477# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014478ac_need_defaults=:
14479while test $# != 0
14480do
14481 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014482 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14484 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014485 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014487 --*=)
14488 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14489 ac_optarg=
14490 ac_shift=:
14491 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014493 ac_option=$1
14494 ac_optarg=$2
14495 ac_shift=shift
14496 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014497 esac
14498
Skip Montanaro6dead952003-09-25 14:50:04 +000014499 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014501 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14502 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 $as_echo "$ac_cs_version"; exit ;;
14505 --config | --confi | --conf | --con | --co | --c )
14506 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 debug=: ;;
14509 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014510 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 case $ac_optarg in
14512 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014513 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 esac
14515 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 ac_need_defaults=false;;
14517 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014518 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 case $ac_optarg in
14520 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14521 esac
14522 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 --he | --h)
14525 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014526 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014527Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014530 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14531 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14532 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014533
14534 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014535 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014536Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014540
14541 esac
14542 shift
14543done
14544
Skip Montanaro6dead952003-09-25 14:50:04 +000014545ac_configure_extra_args=
14546
14547if $ac_cs_silent; then
14548 exec 6>/dev/null
14549 ac_configure_extra_args="$ac_configure_extra_args --silent"
14550fi
14551
14552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014553cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014554if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14556 shift
14557 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14558 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014561fi
14562
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565exec 5>>config.log
14566{
14567 echo
14568 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14569## Running $as_me. ##
14570_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014575cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579
14580# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014581for ac_config_target in $ac_config_targets
14582do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583 case $ac_config_target in
14584 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14585 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14586 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014587 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14588 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14590 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014591 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014592 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593
Charles-François Natali47413c12011-10-06 19:47:44 +020014594 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 esac
14596done
14597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598
Martin v. Löwis11437992002-04-12 09:54:03 +000014599# If the user did not use the arguments to specify the items to instantiate,
14600# then the envvar interface is used. Set only those that are not.
14601# We use the long form for the default assignment because of an extremely
14602# bizarre bug on SunOS 4.1.3.
14603if $ac_need_defaults; then
14604 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14605 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14606fi
14607
Skip Montanaro6dead952003-09-25 14:50:04 +000014608# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014610# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611# Hook for its removal unless debugging.
14612# Note that there is a small window in which the directory will not be cleaned:
14613# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014614$debug ||
14615{
Charles-François Natali47413c12011-10-06 19:47:44 +020014616 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617 trap 'exit_status=$?
Charles-François Natali47413c12011-10-06 19:47:44 +020014618 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014621}
Martin v. Löwis11437992002-04-12 09:54:03 +000014622# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natali47413c12011-10-06 19:47:44 +020014626 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014627} ||
14628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 tmp=./conf$$-$RANDOM
14630 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014631} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633# Set up the scripts for CONFIG_FILES section.
14634# No need to generate them if there are no CONFIG_FILES.
14635# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638
14639ac_cr=`echo X | tr X '\015'`
14640# On cygwin, bash can eat \r inside `` if the user requested igncr.
14641# But we know of no other shell where ac_cr would be empty at this
14642# point, so we can use a bashism as a fallback.
14643if test "x$ac_cr" = x; then
14644 eval ac_cr=\$\'\\r\'
14645fi
14646ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14647if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014648 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014649else
14650 ac_cs_awk_cr=$ac_cr
14651fi
14652
Charles-François Natali47413c12011-10-06 19:47:44 +020014653echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014654_ACEOF
14655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656
Matthias Kloseb9621712010-04-24 17:59:49 +000014657{
14658 echo "cat >conf$$subs.awk <<_ACEOF" &&
14659 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14660 echo "_ACEOF"
14661} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014662 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14663ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664ac_delim='%!_!# '
14665for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014667 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14670 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671 break
14672 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014673 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 else
14675 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677done
Matthias Kloseb9621712010-04-24 17:59:49 +000014678rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014679
Matthias Kloseb9621712010-04-24 17:59:49 +000014680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natali47413c12011-10-06 19:47:44 +020014681cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014683sed -n '
14684h
14685s/^/S["/; s/!.*/"]=/
14686p
14687g
14688s/^[^!]*!//
14689:repl
14690t repl
14691s/'"$ac_delim"'$//
14692t delim
14693:nl
14694h
14695s/\(.\{148\}\)..*/\1/
14696t more1
14697s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14698p
14699n
14700b repl
14701:more1
14702s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14703p
14704g
14705s/.\{148\}//
14706t nl
14707:delim
14708h
14709s/\(.\{148\}\)..*/\1/
14710t more2
14711s/["\\]/\\&/g; s/^/"/; s/$/"/
14712p
14713b
14714:more2
14715s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14716p
14717g
14718s/.\{148\}//
14719t delim
14720' <conf$$subs.awk | sed '
14721/^[^""]/{
14722 N
14723 s/\n//
14724}
14725' >>$CONFIG_STATUS || ac_write_fail=1
14726rm -f conf$$subs.awk
14727cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14728_ACAWK
Charles-François Natali47413c12011-10-06 19:47:44 +020014729cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 for (key in S) S_is_set[key] = 1
14731 FS = ""
14732
14733}
14734{
14735 line = $ 0
14736 nfields = split(line, field, "@")
14737 substed = 0
14738 len = length(field[1])
14739 for (i = 2; i < nfields; i++) {
14740 key = field[i]
14741 keylen = length(key)
14742 if (S_is_set[key]) {
14743 value = S[key]
14744 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14745 len += length(value) + length(field[++i])
14746 substed = 1
14747 } else
14748 len += 1 + keylen
14749 }
14750
14751 print line
14752}
14753
14754_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14757if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14758 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14759else
14760 cat
Charles-François Natali47413c12011-10-06 19:47:44 +020014761fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014762 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014763_ACEOF
14764
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014765# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14766# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767# trailing colons and then remove the whole line if VPATH becomes empty
14768# (actually we leave an empty line to preserve line numbers).
14769if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014770 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14771h
14772s///
14773s/^/:/
14774s/[ ]*$/:/
14775s/:\$(srcdir):/:/g
14776s/:\${srcdir}:/:/g
14777s/:@srcdir@:/:/g
14778s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014780x
14781s/\(=[ ]*\).*/\1/
14782G
14783s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784s/^[^=]*=[ ]*$//
14785}'
14786fi
14787
Matthias Kloseb9621712010-04-24 17:59:49 +000014788cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014789fi # test -n "$CONFIG_FILES"
14790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791# Set up the scripts for CONFIG_HEADERS section.
14792# No need to generate them if there are no CONFIG_HEADERS.
14793# This happens for instance with `./config.status Makefile'.
14794if test -n "$CONFIG_HEADERS"; then
Charles-François Natali47413c12011-10-06 19:47:44 +020014795cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014796BEGIN {
14797_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798
Matthias Kloseb9621712010-04-24 17:59:49 +000014799# Transform confdefs.h into an awk script `defines.awk', embedded as
14800# here-document in config.status, that substitutes the proper values into
14801# config.h.in to produce config.h.
14802
14803# Create a delimiter string that does not exist in confdefs.h, to ease
14804# handling of long lines.
14805ac_delim='%!_!# '
14806for ac_last_try in false false :; do
Charles-François Natali47413c12011-10-06 19:47:44 +020014807 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14808 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 break
14810 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014811 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 else
14813 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14814 fi
14815done
14816
14817# For the awk script, D is an array of macro values keyed by name,
14818# likewise P contains macro parameters if any. Preserve backslash
14819# newline sequences.
14820
14821ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14822sed -n '
14823s/.\{148\}/&'"$ac_delim"'/g
14824t rset
14825:rset
14826s/^[ ]*#[ ]*define[ ][ ]*/ /
14827t def
14828d
14829:def
14830s/\\$//
14831t bsnl
14832s/["\\]/\\&/g
14833s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14834D["\1"]=" \3"/p
14835s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14836d
14837:bsnl
14838s/["\\]/\\&/g
14839s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14840D["\1"]=" \3\\\\\\n"\\/p
14841t cont
14842s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14843t cont
14844d
14845:cont
14846n
14847s/.\{148\}/&'"$ac_delim"'/g
14848t clear
14849:clear
14850s/\\$//
14851t bsnlc
14852s/["\\]/\\&/g; s/^/"/; s/$/"/p
14853d
14854:bsnlc
14855s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14856b cont
14857' <confdefs.h | sed '
14858s/'"$ac_delim"'/"\\\
14859"/g' >>$CONFIG_STATUS || ac_write_fail=1
14860
14861cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14862 for (key in D) D_is_set[key] = 1
14863 FS = ""
14864}
14865/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14866 line = \$ 0
14867 split(line, arg, " ")
14868 if (arg[1] == "#") {
14869 defundef = arg[2]
14870 mac1 = arg[3]
14871 } else {
14872 defundef = substr(arg[1], 2)
14873 mac1 = arg[2]
14874 }
14875 split(mac1, mac2, "(") #)
14876 macro = mac2[1]
14877 prefix = substr(line, 1, index(line, defundef) - 1)
14878 if (D_is_set[macro]) {
14879 # Preserve the white space surrounding the "#".
14880 print prefix "define", macro P[macro] D[macro]
14881 next
14882 } else {
14883 # Replace #undef with comments. This is necessary, for example,
14884 # in the case of _POSIX_SOURCE, which is predefined and required
14885 # on some systems where configure will not decide to define it.
14886 if (defundef == "undef") {
14887 print "/*", prefix defundef, macro, "*/"
14888 next
14889 }
14890 }
14891}
14892{ print }
14893_ACAWK
14894_ACEOF
14895cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014896 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014897fi # test -n "$CONFIG_HEADERS"
14898
14899
14900eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14901shift
14902for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903do
14904 case $ac_tag in
14905 :[FHLC]) ac_mode=$ac_tag; continue;;
14906 esac
14907 case $ac_mode$ac_tag in
14908 :[FHL]*:*);;
Charles-François Natali47413c12011-10-06 19:47:44 +020014909 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910 :[FH]-) ac_tag=-:-;;
14911 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14912 esac
14913 ac_save_IFS=$IFS
14914 IFS=:
14915 set x $ac_tag
14916 IFS=$ac_save_IFS
14917 shift
14918 ac_file=$1
14919 shift
14920
14921 case $ac_mode in
14922 :L) ac_source=$1;;
14923 :[FH])
14924 ac_file_inputs=
14925 for ac_f
14926 do
14927 case $ac_f in
Charles-François Natali47413c12011-10-06 19:47:44 +020014928 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 *) # Look for the file first in the build tree, then in the source tree
14930 # (if the path is not absolute). The absolute path cannot be DOS-style,
14931 # because $ac_f cannot contain `:'.
14932 test -f "$ac_f" ||
14933 case $ac_f in
14934 [\\/$]*) false;;
14935 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14936 esac ||
Charles-François Natali47413c12011-10-06 19:47:44 +020014937 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14940 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 done
14942
14943 # Let's still pretend it is `configure' which instantiates (i.e., don't
14944 # use $as_me), people would be surprised to read:
14945 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 configure_input='Generated from '`
14947 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14948 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949 if test x"$ac_file" != x-; then
14950 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14952$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 # Neutralize special characters interpreted by sed in replacement strings.
14955 case $configure_input in #(
14956 *\&* | *\|* | *\\* )
14957 ac_sed_conf_input=`$as_echo "$configure_input" |
14958 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14959 *) ac_sed_conf_input=$configure_input;;
14960 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961
14962 case $ac_tag in
Charles-François Natali47413c12011-10-06 19:47:44 +020014963 *:-:* | *:-) cat >"$tmp/stdin" \
14964 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965 esac
14966 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 esac
14968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014970$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014971 X"$ac_file" : 'X\(//\)[^/]' \| \
14972 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014974$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14976 s//\1/
14977 q
14978 }
14979 /^X\(\/\/\)[^/].*/{
14980 s//\1/
14981 q
14982 }
14983 /^X\(\/\/\)$/{
14984 s//\1/
14985 q
14986 }
14987 /^X\(\/\).*/{
14988 s//\1/
14989 q
14990 }
14991 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 ac_builddir=.
14994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995case "$ac_dir" in
14996.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14997*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001 case $ac_top_builddir_sub in
15002 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15003 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15004 esac ;;
15005esac
15006ac_abs_top_builddir=$ac_pwd
15007ac_abs_builddir=$ac_pwd$ac_dir_suffix
15008# for backward compatibility:
15009ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015010
15011case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014 ac_top_srcdir=$ac_top_builddir_sub
15015 ac_abs_top_srcdir=$ac_pwd ;;
15016 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018 ac_top_srcdir=$srcdir
15019 ac_abs_top_srcdir=$srcdir ;;
15020 *) # Relative name.
15021 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15022 ac_top_srcdir=$ac_top_build_prefix$srcdir
15023 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015024esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015026
Martin v. Löwis11437992002-04-12 09:54:03 +000015027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 case $ac_mode in
15029 :F)
15030 #
15031 # CONFIG_FILE
15032 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015033
15034 case $INSTALL in
15035 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015038_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041# If the template does not know about datarootdir, expand it.
15042# FIXME: This hack should be removed a few years after 2.60.
15043ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015044ac_sed_dataroot='
15045/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046 p
15047 q
15048}
15049/@datadir@/p
15050/@docdir@/p
15051/@infodir@/p
15052/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015053/@mandir@/p'
15054case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055*datarootdir*) ac_datarootdir_seen=yes;;
15056*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15058$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015060cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061 ac_datarootdir_hack='
15062 s&@datadir@&$datadir&g
15063 s&@docdir@&$docdir&g
15064 s&@infodir@&$infodir&g
15065 s&@localedir@&$localedir&g
15066 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068esac
15069_ACEOF
15070
15071# Neutralize VPATH when `$srcdir' = `.'.
15072# Shell code in configure.ac might set extrasub.
15073# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15075ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015076$extrasub
15077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015078cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015079:t
15080/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015081s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015083s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084s&@srcdir@&$ac_srcdir&;t t
15085s&@abs_srcdir@&$ac_abs_srcdir&;t t
15086s&@top_srcdir@&$ac_top_srcdir&;t t
15087s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15088s&@builddir@&$ac_builddir&;t t
15089s&@abs_builddir@&$ac_abs_builddir&;t t
15090s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15091s&@INSTALL@&$ac_INSTALL&;t t
15092$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015093"
Charles-François Natali47413c12011-10-06 19:47:44 +020015094eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15095 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natali47413c12011-10-06 19:47:44 +020015098 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15099 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015101which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015102$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015103which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015104
Charles-François Natali47413c12011-10-06 19:47:44 +020015105 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 case $ac_file in
Charles-François Natali47413c12011-10-06 19:47:44 +020015107 -) cat "$tmp/out" && rm -f "$tmp/out";;
15108 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015110 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111 ;;
15112 :H)
15113 #
15114 # CONFIG_HEADER
15115 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 {
15118 $as_echo "/* $configure_input */" \
Charles-François Natali47413c12011-10-06 19:47:44 +020015119 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15120 } >"$tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015121 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natali47413c12011-10-06 19:47:44 +020015122 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15124$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 rm -f "$ac_file"
Charles-François Natali47413c12011-10-06 19:47:44 +020015127 mv "$tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015128 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 fi
15130 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 $as_echo "/* $configure_input */" \
Charles-François Natali47413c12011-10-06 19:47:44 +020015132 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015133 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137
15138 esac
15139
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015140
15141 case $ac_file$ac_mode in
15142 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15143
15144 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145done # for ac_tag
15146
Guido van Rossum627b2d71993-12-24 10:39:16 +000015147
Matthias Kloseb9621712010-04-24 17:59:49 +000015148as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015149_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015150ac_clean_files=$ac_clean_files_save
15151
Matthias Kloseb9621712010-04-24 17:59:49 +000015152test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015153 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015154
Martin v. Löwis11437992002-04-12 09:54:03 +000015155
15156# configure is writing to config.log, and then calls config.status.
15157# config.status does its own redirection, appending to config.log.
15158# Unfortunately, on DOS this fails, as config.log is still kept open
15159# by configure, so config.status won't be able to write to it; its
15160# output is simply discarded. So we exec the FD to /dev/null,
15161# effectively closing config.log, so it can be properly (re)opened and
15162# appended to by config.status. When coming back to configure, we
15163# need to make the FD available again.
15164if test "$no_create" != yes; then
15165 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015166 ac_config_status_args=
15167 test "$silent" = yes &&
15168 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015170 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 exec 5>>config.log
15172 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15173 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015174 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015175fi
15176if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15178$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015179fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015180
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015181
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015182echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015183if test ! -f Modules/Setup
15184then
15185 cp $srcdir/Modules/Setup.dist Modules/Setup
15186fi
15187
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015188echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015189if test ! -f Modules/Setup.local
15190then
15191 echo "# Edit this file for local setup changes" >Modules/Setup.local
15192fi
15193
15194echo "creating Makefile"
15195$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15196 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015197 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015198mv config.c Modules