blob: 0de752f7d6fe2c91836e0f7d1d6a79f27f65912b [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 Natali54ef40b2011-07-22 23:52:02 +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 Natali54ef40b2011-07-22 23:52:02 +0200223 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000224fi
225
226 if test x$as_have_required = xno; then :
227 $as_echo "$0: This script requires a shell more modern than all"
228 $as_echo "$0: the shells that I found on your system."
229 if test x${ZSH_VERSION+set} = xset ; then
230 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232 else
233 $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: http://bugs.python.org/ about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238 fi
239 exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257 { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266 return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274 set +e
275 as_fn_set_status $1
276 exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285 case $as_dir in #(
286 -*) as_dir=./$as_dir;;
287 esac
288 test -d "$as_dir" || eval $as_mkdir_p || {
289 as_dirs=
290 while :; do
291 case $as_dir in #(
292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293 *) as_qdir=$as_dir;;
294 esac
295 as_dirs="'$as_qdir' $as_dirs"
296 as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298 X"$as_dir" : 'X\(//\)[^/]' \| \
299 X"$as_dir" : 'X\(//\)$' \| \
300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303 s//\1/
304 q
305 }
306 /^X\(\/\/\)[^/].*/{
307 s//\1/
308 q
309 }
310 /^X\(\/\/\)$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\).*/{
315 s//\1/
316 q
317 }
318 s/.*/./; q'`
319 test -d "$as_dir" && break
320 done
321 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333 eval 'as_fn_append ()
334 {
335 eval $1+=\$2
336 }'
337else
338 as_fn_append ()
339 {
340 eval $1=\$$1\$2
341 }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350 eval 'as_fn_arith ()
351 {
352 as_val=$(( $* ))
353 }'
354else
355 as_fn_arith ()
356 {
357 as_val=`expr "$@" || test $? -eq 1`
358 }
359fi # as_fn_arith
360
361
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200366# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000367as_fn_error ()
368{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200369 as_status=$1; test $as_status -eq 0 && as_status=1
370 if test "$4"; then
371 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000373 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000375 as_fn_exit $as_status
376} # as_fn_error
377
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000378if expr a : '\(a\)' >/dev/null 2>&1 &&
379 test "X`expr 00001 : '.*\(...\)'`" = X001; then
380 as_expr=expr
381else
382 as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386 as_basename=basename
387else
388 as_basename=false
389fi
390
Matthias Kloseb9621712010-04-24 17:59:49 +0000391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392 as_dirname=dirname
393else
394 as_dirname=false
395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000396
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399 X"$0" : 'X\(//\)$' \| \
400 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000401$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000402 sed '/^.*\/\([^/][^/]*\)\/*$/{
403 s//\1/
404 q
405 }
406 /^X\/\(\/\/\)$/{
407 s//\1/
408 q
409 }
410 /^X\/\(\/\).*/{
411 s//\1/
412 q
413 }
414 s/.*/./; q'`
415
Matthias Kloseb9621712010-04-24 17:59:49 +0000416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424 as_lineno_1=$LINENO as_lineno_1a=$LINENO
425 as_lineno_2=$LINENO as_lineno_2a=$LINENO
426 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000429 sed -n '
430 p
431 /[$]LINENO/=
432 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000434 s/[$]LINENO.*/&-/
435 t lineno
436 b
437 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 :loop
440 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000444 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000446
447 # Don't try to exec as it changes $[0], causing all sort of problems
448 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000449 # original and so on. Autoconf is especially sensitive to this).
450 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 # Exit status is that of the last command.
452 exit
453}
454
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000455ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000456case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000458 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000459 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000460 xy) ECHO_C='\c';;
461 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
462 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463 esac;;
464*)
465 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000467
Martin v. Löwis11437992002-04-12 09:54:03 +0000468rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if test -d conf$$.dir; then
470 rm -f conf$$.dir/conf$$.file
471else
472 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000473 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000474fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000475if (echo >conf$$.file) 2>/dev/null; then
476 if ln -s conf$$.file conf$$ 2>/dev/null; then
477 as_ln_s='ln -s'
478 # ... but there are two gotchas:
479 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481 # In both cases, we have to default to `cp -p'.
482 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483 as_ln_s='cp -p'
484 elif ln conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s=ln
486 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000489else
490 as_ln_s='cp -p'
491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000494
Skip Montanaro6dead952003-09-25 14:50:04 +0000495if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000497else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000498 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000499 as_mkdir_p=false
500fi
501
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000502if test -x / >/dev/null 2>&1; then
503 as_test_x='test -x'
504else
505 if ls -dL / >/dev/null 2>&1; then
506 as_ls_L_option=L
507 else
508 as_ls_L_option=
509 fi
510 as_test_x='
511 eval sh -c '\''
512 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000513 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000515 case $1 in #(
516 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000518 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000519 ???[sx]*):;;*)false;;esac;fi
520 '\'' sh
521 '
522fi
523as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000524
525# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000527
528# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000530
531
Matthias Kloseb9621712010-04-24 17:59:49 +0000532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000534
535# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
Martin v. Löwis11437992002-04-12 09:54:03 +0000540#
541# Initializations.
542#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000543ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000544ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000545ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000546LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000551
Martin v. Löwis11437992002-04-12 09:54:03 +0000552# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000553PACKAGE_NAME='python'
554PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000555PACKAGE_VERSION='3.3'
556PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000557PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000558PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560ac_unique_file="Include/object.h"
561# Factoring default headers for most tests.
562ac_includes_default="\
563#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000564#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# include <sys/types.h>
566#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000567#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000568# include <sys/stat.h>
569#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000570#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000571# include <stdlib.h>
572# include <stddef.h>
573#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# include <stdlib.h>
576# endif
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef HAVE_STRING_H
579# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <memory.h>
581# endif
582# include <string.h>
583#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000584#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000585# include <strings.h>
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000589#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000590#ifdef HAVE_STDINT_H
591# include <stdint.h>
592#endif
593#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <unistd.h>
595#endif"
596
Matthias Kloseb9621712010-04-24 17:59:49 +0000597ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000598SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000599THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000600SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000601LIBC
602LIBM
603HAVE_GETHOSTBYNAME
604HAVE_GETHOSTBYNAME_R
605HAVE_GETHOSTBYNAME_R_3_ARG
606HAVE_GETHOSTBYNAME_R_5_ARG
607HAVE_GETHOSTBYNAME_R_6_ARG
608LIBOBJS
609TRUE
610MACHDEP_OBJS
611DYNLOADFILE
612DLINCLDIR
613THREADOBJ
614LDLAST
615USE_THREAD_MODULE
616SIGNAL_OBJS
617USE_SIGNAL_MODULE
618LIBFFI_INCLUDEDIR
619PKG_CONFIG
620SHLIBS
621CFLAGSFORSHARED
622LINKFORSHARED
623CCSHARED
624BLDSHARED
625LDCXXSHARED
626LDSHARED
627SO
628LIBTOOL_CRUFT
629OTHER_LIBTOOL_OPT
630UNIVERSAL_ARCH_FLAGS
631BASECFLAGS
632OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000633ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000634LN
635INSTALL_DATA
636INSTALL_SCRIPT
637INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500638HAS_PYTHON
639DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000640ARFLAGS
641AR
642RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000643USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000644GNULD
645LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000646LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000647RUNSHARED
648INSTSONAME
649LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000650PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000651BLDLIBRARY
652DLLLIBRARY
653LDLIBRARY
654LIBRARY
655BUILDEXEEXT
656EGREP
657GREP
658CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200659NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000660MAINCC
661CXX
662OBJEXT
663EXEEXT
664ac_ct_CC
665CPPFLAGS
666LDFLAGS
667CFLAGS
668CC
669EXPORT_MACOSX_DEPLOYMENT_TARGET
670CONFIGURE_MACOSX_DEPLOYMENT_TARGET
671SGI_ABI
672MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000673FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000674FRAMEWORKUNIXTOOLSPREFIX
675FRAMEWORKALTINSTALLLAST
676FRAMEWORKALTINSTALLFIRST
677FRAMEWORKINSTALLLAST
678FRAMEWORKINSTALLFIRST
679PYTHONFRAMEWORKINSTALLDIR
680PYTHONFRAMEWORKPREFIX
681PYTHONFRAMEWORKDIR
682PYTHONFRAMEWORKIDENTIFIER
683PYTHONFRAMEWORK
684LIPO_32BIT_FLAGS
685ARCH_RUN_32BIT
686UNIVERSALSDK
687CONFIG_ARGS
688SOVERSION
689VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500690HAS_HG
691HGBRANCH
692HGTAG
693HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000694target_alias
695host_alias
696build_alias
697LIBS
698ECHO_T
699ECHO_N
700ECHO_C
701DEFS
702mandir
703localedir
704libdir
705psdir
706pdfdir
707dvidir
708htmldir
709infodir
710docdir
711oldincludedir
712includedir
713localstatedir
714sharedstatedir
715sysconfdir
716datadir
717datarootdir
718libexecdir
719sbindir
720bindir
721program_transform_name
722prefix
723exec_prefix
724PACKAGE_URL
725PACKAGE_BUGREPORT
726PACKAGE_STRING
727PACKAGE_VERSION
728PACKAGE_TARNAME
729PACKAGE_NAME
730PATH_SEPARATOR
731SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000732ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000733ac_user_opts='
734enable_option_checking
735enable_universalsdk
736with_universal_archs
737with_framework_name
738enable_framework
739with_gcc
740with_cxx_main
741with_suffix
742enable_shared
743enable_profiling
744with_pydebug
745with_libs
746with_system_expat
747with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000748enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000749with_dbmliborder
750with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000751with_threads
752with_thread
753enable_ipv6
754with_doc_strings
755with_tsc
756with_pymalloc
757with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000758with_fpectl
759with_libm
760with_libc
761enable_big_digits
762with_wide_unicode
763with_computed_gotos
764'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000765 ac_precious_vars='build_alias
766host_alias
767target_alias
768CC
769CFLAGS
770LDFLAGS
771LIBS
772CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200773CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774
Guido van Rossum627b2d71993-12-24 10:39:16 +0000775
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000777ac_init_help=
778ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000779ac_unrecognized_opts=
780ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781# The variables have the same names as the options, with
782# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000783cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786no_recursion=
787prefix=NONE
788program_prefix=NONE
789program_suffix=NONE
790program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000791silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795x_includes=NONE
796x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000797
798# Installation directory options.
799# These are left unexpanded so users can "make install exec_prefix=/foo"
800# and all the variables that are supposed to be based on exec_prefix
801# by default will actually change.
802# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804bindir='${exec_prefix}/bin'
805sbindir='${exec_prefix}/sbin'
806libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807datarootdir='${prefix}/share'
808datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000809sysconfdir='${prefix}/etc'
810sharedstatedir='${prefix}/com'
811localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812includedir='${prefix}/include'
813oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
815infodir='${datarootdir}/info'
816htmldir='${docdir}'
817dvidir='${docdir}'
818pdfdir='${docdir}'
819psdir='${docdir}'
820libdir='${exec_prefix}/lib'
821localedir='${datarootdir}/locale'
822mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000823
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000827do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828 # If the previous option needs an argument, assign it.
829 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831 ac_prev=
832 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000835 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200836 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
837 *=) ac_optarg= ;;
838 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841 # Accept the important Cygnus configure options, so we can diagnose typos.
842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_dashdash$ac_option in
844 --)
845 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847 -bindir | --bindir | --bindi | --bind | --bin | --bi)
848 ac_prev=bindir ;;
849 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851
852 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857 -cache-file | --cache-file | --cache-fil | --cache-fi \
858 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
859 ac_prev=cache_file ;;
860 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
861 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 cache_file=$ac_optarg ;;
863
864 --config-cache | -C)
865 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
873 | --dataroo | --dataro | --datar)
874 ac_prev=datarootdir ;;
875 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
876 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
877 datarootdir=$ac_optarg ;;
878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000880 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000882 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200883 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000884 ac_useropt_orig=$ac_useropt
885 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
886 case $ac_user_opts in
887 *"
888"enable_$ac_useropt"
889"*) ;;
890 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
891 ac_unrecognized_sep=', ';;
892 esac
893 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894
895 -docdir | --docdir | --docdi | --doc | --do)
896 ac_prev=docdir ;;
897 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
898 docdir=$ac_optarg ;;
899
900 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
901 ac_prev=dvidir ;;
902 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
903 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
905 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000906 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000908 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200909 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000910 ac_useropt_orig=$ac_useropt
911 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
912 case $ac_user_opts in
913 *"
914"enable_$ac_useropt"
915"*) ;;
916 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
917 ac_unrecognized_sep=', ';;
918 esac
919 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
922 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
923 | --exec | --exe | --ex)
924 ac_prev=exec_prefix ;;
925 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
926 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
927 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
930 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Obsolete; use --with-gas.
932 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 -help | --help | --hel | --he | -h)
935 ac_init_help=long ;;
936 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
937 ac_init_help=recursive ;;
938 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
939 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
941 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
947 ac_prev=htmldir ;;
948 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
949 | --ht=*)
950 htmldir=$ac_optarg ;;
951
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952 -includedir | --includedir | --includedi | --included | --include \
953 | --includ | --inclu | --incl | --inc)
954 ac_prev=includedir ;;
955 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
956 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -infodir | --infodir | --infodi | --infod | --info | --inf)
960 ac_prev=infodir ;;
961 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
964 -libdir | --libdir | --libdi | --libd)
965 ac_prev=libdir ;;
966 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
969 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
970 | --libexe | --libex | --libe)
971 ac_prev=libexecdir ;;
972 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
973 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -localedir | --localedir | --localedi | --localed | --locale)
977 ac_prev=localedir ;;
978 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
979 localedir=$ac_optarg ;;
980
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983 ac_prev=localstatedir ;;
984 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000985 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
989 ac_prev=mandir ;;
990 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Obsolete; use --without-fp.
995 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 no_create=yes ;;
1000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1002 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1003 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1006 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1007 | --oldin | --oldi | --old | --ol | --o)
1008 ac_prev=oldincludedir ;;
1009 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1010 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1011 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1015 ac_prev=prefix ;;
1016 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1020 | --program-pre | --program-pr | --program-p)
1021 ac_prev=program_prefix ;;
1022 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1023 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1027 | --program-suf | --program-su | --program-s)
1028 ac_prev=program_suffix ;;
1029 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1030 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-transform-name | --program-transform-name \
1034 | --program-transform-nam | --program-transform-na \
1035 | --program-transform-n | --program-transform- \
1036 | --program-transform | --program-transfor \
1037 | --program-transfo | --program-transf \
1038 | --program-trans | --program-tran \
1039 | --progr-tra | --program-tr | --program-t)
1040 ac_prev=program_transform_name ;;
1041 -program-transform-name=* | --program-transform-name=* \
1042 | --program-transform-nam=* | --program-transform-na=* \
1043 | --program-transform-n=* | --program-transform-=* \
1044 | --program-transform=* | --program-transfor=* \
1045 | --program-transfo=* | --program-transf=* \
1046 | --program-trans=* | --program-tran=* \
1047 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1051 ac_prev=pdfdir ;;
1052 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1053 pdfdir=$ac_optarg ;;
1054
1055 -psdir | --psdir | --psdi | --psd | --ps)
1056 ac_prev=psdir ;;
1057 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1058 psdir=$ac_optarg ;;
1059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1061 | -silent | --silent | --silen | --sile | --sil)
1062 silent=yes ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1065 ac_prev=sbindir ;;
1066 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1067 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1071 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1072 | --sharedst | --shareds | --shared | --share | --shar \
1073 | --sha | --sh)
1074 ac_prev=sharedstatedir ;;
1075 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1076 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1077 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1078 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 -site | --site | --sit)
1082 ac_prev=site ;;
1083 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1087 ac_prev=srcdir ;;
1088 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1092 | --syscon | --sysco | --sysc | --sys | --sy)
1093 ac_prev=sysconfdir ;;
1094 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1095 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1104 verbose=yes ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 -version | --version | --versio | --versi | --vers | -V)
1107 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001110 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001112 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001113 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001114 ac_useropt_orig=$ac_useropt
1115 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1116 case $ac_user_opts in
1117 *"
1118"with_$ac_useropt"
1119"*) ;;
1120 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1121 ac_unrecognized_sep=', ';;
1122 esac
1123 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
1125 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001128 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001129 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001130 ac_useropt_orig=$ac_useropt
1131 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132 case $ac_user_opts in
1133 *"
1134"with_$ac_useropt"
1135"*) ;;
1136 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1137 ac_unrecognized_sep=', ';;
1138 esac
1139 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 --x)
1142 # Obsolete; use --with-x.
1143 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
1145 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1146 | --x-incl | --x-inc | --x-in | --x-i)
1147 ac_prev=x_includes ;;
1148 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1149 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1153 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1154 ac_prev=x_libraries ;;
1155 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1156 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001159 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1160Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 ;;
1162
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 *=*)
1164 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1165 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 case $ac_envvar in #(
1167 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001168 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001170 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 export $ac_envvar ;;
1172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001178 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 ;;
1180
1181 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182done
1183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001186 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187fi
1188
Matthias Kloseb9621712010-04-24 17:59:49 +00001189if test -n "$ac_unrecognized_opts"; then
1190 case $enable_option_checking in
1191 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001192 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1194 esac
1195fi
1196
1197# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1199 datadir sysconfdir sharedstatedir localstatedir includedir \
1200 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1201 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 # Remove trailing slashes.
1205 case $ac_val in
1206 */ )
1207 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1208 eval $ac_var=\$ac_val;;
1209 esac
1210 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 [\\/$]* | ?:[\\/]* ) continue;;
1213 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001216done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217
Martin v. Löwis11437992002-04-12 09:54:03 +00001218# There might be people who depend on the old broken behavior: `$host'
1219# used to hold the argument of --host etc.
1220# FIXME: To remove some day.
1221build=$build_alias
1222host=$host_alias
1223target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# FIXME: To remove some day.
1226if test "x$host_alias" != x; then
1227 if test "x$build_alias" = x; then
1228 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001229 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1230 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 elif test "x$build_alias" != "x$host_alias"; then
1232 cross_compiling=yes
1233 fi
1234fi
1235
1236ac_tool_prefix=
1237test -n "$host_alias" && ac_tool_prefix=$host_alias-
1238
1239test "$silent" = yes && exec 6>/dev/null
1240
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242ac_pwd=`pwd` && test -n "$ac_pwd" &&
1243ac_ls_di=`ls -di .` &&
1244ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248
1249
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250# Find the source files, if location was not specified.
1251if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 ac_confdir=`$as_dirname -- "$as_myself" ||
1255$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1256 X"$as_myself" : 'X\(//\)[^/]' \| \
1257 X"$as_myself" : 'X\(//\)$' \| \
1258 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1259$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\/\)[^/].*/{
1265 s//\1/
1266 q
1267 }
1268 /^X\(\/\/\)$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\).*/{
1273 s//\1/
1274 q
1275 }
1276 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279 srcdir=..
1280 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281else
1282 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284if test ! -r "$srcdir/$ac_unique_file"; then
1285 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001286 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1289ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 pwd)`
1292# When building in place, set srcdir=.
1293if test "$ac_abs_confdir" = "$ac_pwd"; then
1294 srcdir=.
1295fi
1296# Remove unnecessary trailing slashes from srcdir.
1297# Double slashes in file names in object file debugging info
1298# mess up M-x gdb in Emacs.
1299case $srcdir in
1300*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1301esac
1302for ac_var in $ac_precious_vars; do
1303 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1304 eval ac_env_${ac_var}_value=\$${ac_var}
1305 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1306 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1307done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309#
1310# Report the --help message.
1311#
1312if test "$ac_init_help" = "long"; then
1313 # Omit some internal or obsolete options to make the list less imposing.
1314 # This message is too long to be a string in the A/UX 3.1 sh.
1315 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001316\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318Usage: $0 [OPTION]... [VAR=VALUE]...
1319
1320To assign environment variables (e.g., CC, CFLAGS...), specify them as
1321VAR=VALUE. See below for descriptions of some of the useful variables.
1322
1323Defaults for the options are specified in brackets.
1324
1325Configuration:
1326 -h, --help display this help and exit
1327 --help=short display options specific to this package
1328 --help=recursive display the short help of all the included packages
1329 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001331 --cache-file=FILE cache test results in FILE [disabled]
1332 -C, --config-cache alias for \`--cache-file=config.cache'
1333 -n, --no-create do not create output files
1334 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1335
Martin v. Löwis11437992002-04-12 09:54:03 +00001336Installation directories:
1337 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342By default, \`make install' will install all the files in
1343\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1344an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1345for instance \`--prefix=\$HOME'.
1346
1347For better control, use the options below.
1348
1349Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 --bindir=DIR user executables [EPREFIX/bin]
1351 --sbindir=DIR system admin executables [EPREFIX/sbin]
1352 --libexecdir=DIR program executables [EPREFIX/libexec]
1353 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1354 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1355 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1356 --libdir=DIR object code libraries [EPREFIX/lib]
1357 --includedir=DIR C header files [PREFIX/include]
1358 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1359 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1360 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1361 --infodir=DIR info documentation [DATAROOTDIR/info]
1362 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1363 --mandir=DIR man documentation [DATAROOTDIR/man]
1364 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1365 --htmldir=DIR html documentation [DOCDIR]
1366 --dvidir=DIR dvi documentation [DOCDIR]
1367 --pdfdir=DIR pdf documentation [DOCDIR]
1368 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001369_ACEOF
1370
1371 cat <<\_ACEOF
1372_ACEOF
1373fi
1374
1375if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001376 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001377 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001378 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 cat <<\_ACEOF
1380
1381Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1384 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001385 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001386 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001387 --enable-framework[=INSTALLDIR]
1388 Build (MacOSX|Darwin) framework
1389 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001390 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001391 --enable-loadable-sqlite-extensions
1392 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001393 --enable-ipv6 Enable ipv6 (with ipv4) support
1394 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001395 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398Optional Packages:
1399 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1400 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001401 --with-universal-archs=ARCH
1402 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001403 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001404 --with-framework-name=FRAMEWORK
1405 specify an alternate name of the framework built
1406 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001408 --with-cxx-main=<compiler>
1409 compile main() and link python executable with C++
1410 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --with-suffix=.exe set executable suffix
1412 --with-pydebug build with Py_DEBUG defined
1413 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001414 --with-system-expat build pyexpat module using an installed expat
1415 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001417 --with-dbmliborder=db1:db2:...
1418 order to check db backends for dbm. Valid value is a
1419 colon separated string with the backend names
1420 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with(out)-threads[=DIRECTORY]
1423 disable/enable thread support
1424 --with(out)-thread[=DIRECTORY]
1425 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001427 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001429 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with-fpectl enable SIGFPE catching
1431 --with-libm=STRING math library
1432 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001433 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001434 --with(out)-computed-gotos
1435 Use computed gotos in evaluation loop (enabled by
1436 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438Some influential environment variables:
1439 CC C compiler command
1440 CFLAGS C compiler flags
1441 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1442 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001445 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 CPP C preprocessor
1447
1448Use these variables to override the choices made by `configure' or to help
1449it to find libraries and programs with nonstandard names/locations.
1450
Georg Brandle2e15612009-05-20 18:25:10 +00001451Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001454fi
1455
1456if test "$ac_init_help" = "recursive"; then
1457 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 test -d "$ac_dir" ||
1460 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1461 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 ac_builddir=.
1463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464case "$ac_dir" in
1465.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1466*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001468 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001469 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 case $ac_top_builddir_sub in
1471 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1472 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1473 esac ;;
1474esac
1475ac_abs_top_builddir=$ac_pwd
1476ac_abs_builddir=$ac_pwd$ac_dir_suffix
1477# for backward compatibility:
1478ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001479
1480case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 ac_top_srcdir=$ac_top_builddir_sub
1484 ac_abs_top_srcdir=$ac_pwd ;;
1485 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 ac_top_srcdir=$srcdir
1488 ac_abs_top_srcdir=$srcdir ;;
1489 *) # Relative name.
1490 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1491 ac_top_srcdir=$ac_top_build_prefix$srcdir
1492 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001493esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 cd "$ac_dir" || { ac_status=$?; continue; }
1497 # Check for guested configure.
1498 if test -f "$ac_srcdir/configure.gnu"; then
1499 echo &&
1500 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1501 elif test -f "$ac_srcdir/configure"; then
1502 echo &&
1503 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001505 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 fi || ac_status=$?
1507 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 done
1509fi
1510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001512if $ac_init_version; then
1513 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001514python configure 3.3
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001515generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001516
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001517Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518This configure script is free software; the Free Software Foundation
1519gives unlimited permission to copy, distribute and modify it.
1520_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001523
1524## ------------------------ ##
1525## Autoconf initialization. ##
1526## ------------------------ ##
1527
1528# ac_fn_c_try_compile LINENO
1529# --------------------------
1530# Try to compile conftest.$ac_ext, and return whether this succeeded.
1531ac_fn_c_try_compile ()
1532{
1533 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1534 rm -f conftest.$ac_objext
1535 if { { ac_try="$ac_compile"
1536case "(($ac_try" in
1537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1538 *) ac_try_echo=$ac_try;;
1539esac
1540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1541$as_echo "$ac_try_echo"; } >&5
1542 (eval "$ac_compile") 2>conftest.err
1543 ac_status=$?
1544 if test -s conftest.err; then
1545 grep -v '^ *+' conftest.err >conftest.er1
1546 cat conftest.er1 >&5
1547 mv -f conftest.er1 conftest.err
1548 fi
1549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1550 test $ac_status = 0; } && {
1551 test -z "$ac_c_werror_flag" ||
1552 test ! -s conftest.err
1553 } && test -s conftest.$ac_objext; then :
1554 ac_retval=0
1555else
1556 $as_echo "$as_me: failed program was:" >&5
1557sed 's/^/| /' conftest.$ac_ext >&5
1558
1559 ac_retval=1
1560fi
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001561 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001562 as_fn_set_status $ac_retval
1563
1564} # ac_fn_c_try_compile
1565
Matthias Kloseb9621712010-04-24 17:59:49 +00001566# ac_fn_c_try_link LINENO
1567# -----------------------
1568# Try to link conftest.$ac_ext, and return whether this succeeded.
1569ac_fn_c_try_link ()
1570{
1571 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1572 rm -f conftest.$ac_objext conftest$ac_exeext
1573 if { { ac_try="$ac_link"
1574case "(($ac_try" in
1575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1576 *) ac_try_echo=$ac_try;;
1577esac
1578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1579$as_echo "$ac_try_echo"; } >&5
1580 (eval "$ac_link") 2>conftest.err
1581 ac_status=$?
1582 if test -s conftest.err; then
1583 grep -v '^ *+' conftest.err >conftest.er1
1584 cat conftest.er1 >&5
1585 mv -f conftest.er1 conftest.err
1586 fi
1587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1588 test $ac_status = 0; } && {
1589 test -z "$ac_c_werror_flag" ||
1590 test ! -s conftest.err
1591 } && test -s conftest$ac_exeext && {
1592 test "$cross_compiling" = yes ||
1593 $as_test_x conftest$ac_exeext
1594 }; then :
1595 ac_retval=0
1596else
1597 $as_echo "$as_me: failed program was:" >&5
1598sed 's/^/| /' conftest.$ac_ext >&5
1599
1600 ac_retval=1
1601fi
1602 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1603 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1604 # interfere with the next link command; also delete a directory that is
1605 # left behind by Apple's compiler. We do this before executing the actions.
1606 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001607 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 as_fn_set_status $ac_retval
1609
1610} # ac_fn_c_try_link
1611
Matthias Kloseb9621712010-04-24 17:59:49 +00001612# ac_fn_c_try_cpp LINENO
1613# ----------------------
1614# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1615ac_fn_c_try_cpp ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1618 if { { ac_try="$ac_cpp conftest.$ac_ext"
1619case "(($ac_try" in
1620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1621 *) ac_try_echo=$ac_try;;
1622esac
1623eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1624$as_echo "$ac_try_echo"; } >&5
1625 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1626 ac_status=$?
1627 if test -s conftest.err; then
1628 grep -v '^ *+' conftest.err >conftest.er1
1629 cat conftest.er1 >&5
1630 mv -f conftest.er1 conftest.err
1631 fi
1632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001633 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1635 test ! -s conftest.err
1636 }; then :
1637 ac_retval=0
1638else
1639 $as_echo "$as_me: failed program was:" >&5
1640sed 's/^/| /' conftest.$ac_ext >&5
1641
1642 ac_retval=1
1643fi
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001644 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001645 as_fn_set_status $ac_retval
1646
1647} # ac_fn_c_try_cpp
1648
1649# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1650# -------------------------------------------------------
1651# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1652# the include files in INCLUDES and setting the cache variable VAR
1653# accordingly.
1654ac_fn_c_check_header_mongrel ()
1655{
1656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001657 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1659$as_echo_n "checking for $2... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001660if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001661 $as_echo_n "(cached) " >&6
1662fi
1663eval ac_res=\$$3
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1665$as_echo "$ac_res" >&6; }
1666else
1667 # Is the header compilable?
1668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1669$as_echo_n "checking $2 usability... " >&6; }
1670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1671/* end confdefs.h. */
1672$4
1673#include <$2>
1674_ACEOF
1675if ac_fn_c_try_compile "$LINENO"; then :
1676 ac_header_compiler=yes
1677else
1678 ac_header_compiler=no
1679fi
1680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1682$as_echo "$ac_header_compiler" >&6; }
1683
1684# Is the header present?
1685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1686$as_echo_n "checking $2 presence... " >&6; }
1687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1688/* end confdefs.h. */
1689#include <$2>
1690_ACEOF
1691if ac_fn_c_try_cpp "$LINENO"; then :
1692 ac_header_preproc=yes
1693else
1694 ac_header_preproc=no
1695fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001696rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1698$as_echo "$ac_header_preproc" >&6; }
1699
1700# So? What about this header?
1701case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1702 yes:no: )
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1704$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1706$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1707 ;;
1708 no:yes:* )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1710$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1712$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1714$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1716$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1718$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001719( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001720## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001721## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001722 ) | sed "s/^/$as_me: WARNING: /" >&2
1723 ;;
1724esac
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1726$as_echo_n "checking for $2... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001727if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 $as_echo_n "(cached) " >&6
1729else
1730 eval "$3=\$ac_header_compiler"
1731fi
1732eval ac_res=\$$3
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1734$as_echo "$ac_res" >&6; }
1735fi
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001736 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001737
1738} # ac_fn_c_check_header_mongrel
1739
1740# ac_fn_c_try_run LINENO
1741# ----------------------
1742# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1743# that executables *can* be run.
1744ac_fn_c_try_run ()
1745{
1746 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1747 if { { ac_try="$ac_link"
1748case "(($ac_try" in
1749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1750 *) ac_try_echo=$ac_try;;
1751esac
1752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1753$as_echo "$ac_try_echo"; } >&5
1754 (eval "$ac_link") 2>&5
1755 ac_status=$?
1756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1757 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1758 { { case "(($ac_try" in
1759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1760 *) ac_try_echo=$ac_try;;
1761esac
1762eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1763$as_echo "$ac_try_echo"; } >&5
1764 (eval "$ac_try") 2>&5
1765 ac_status=$?
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; }; }; then :
1768 ac_retval=0
1769else
1770 $as_echo "$as_me: program exited with status $ac_status" >&5
1771 $as_echo "$as_me: failed program was:" >&5
1772sed 's/^/| /' conftest.$ac_ext >&5
1773
1774 ac_retval=$ac_status
1775fi
1776 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001777 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 as_fn_set_status $ac_retval
1779
1780} # ac_fn_c_try_run
1781
1782# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1783# -------------------------------------------------------
1784# Tests whether HEADER exists and can be compiled using the include files in
1785# INCLUDES, setting the cache variable VAR accordingly.
1786ac_fn_c_check_header_compile ()
1787{
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1790$as_echo_n "checking for $2... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001791if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 $as_echo_n "(cached) " >&6
1793else
1794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1795/* end confdefs.h. */
1796$4
1797#include <$2>
1798_ACEOF
1799if ac_fn_c_try_compile "$LINENO"; then :
1800 eval "$3=yes"
1801else
1802 eval "$3=no"
1803fi
1804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1805fi
1806eval ac_res=\$$3
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1808$as_echo "$ac_res" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001809 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001810
1811} # ac_fn_c_check_header_compile
1812
Matthias Kloseb9621712010-04-24 17:59:49 +00001813# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1814# -------------------------------------------
1815# Tests whether TYPE exists after having included INCLUDES, setting cache
1816# variable VAR accordingly.
1817ac_fn_c_check_type ()
1818{
1819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1821$as_echo_n "checking for $2... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001822if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001823 $as_echo_n "(cached) " >&6
1824else
1825 eval "$3=no"
1826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1827/* end confdefs.h. */
1828$4
1829int
1830main ()
1831{
1832if (sizeof ($2))
1833 return 0;
1834 ;
1835 return 0;
1836}
1837_ACEOF
1838if ac_fn_c_try_compile "$LINENO"; then :
1839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1840/* end confdefs.h. */
1841$4
1842int
1843main ()
1844{
1845if (sizeof (($2)))
1846 return 0;
1847 ;
1848 return 0;
1849}
1850_ACEOF
1851if ac_fn_c_try_compile "$LINENO"; then :
1852
1853else
1854 eval "$3=yes"
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001863 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001864
1865} # ac_fn_c_check_type
1866
1867# ac_fn_c_find_uintX_t LINENO BITS VAR
1868# ------------------------------------
1869# Finds an unsigned integer type with width BITS, setting cache variable VAR
1870# accordingly.
1871ac_fn_c_find_uintX_t ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1875$as_echo_n "checking for uint$2_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001876if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 $as_echo_n "(cached) " >&6
1878else
1879 eval "$3=no"
1880 # Order is important - never check a type that is potentially smaller
1881 # than half of the expected target width.
1882 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1883 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885/* end confdefs.h. */
1886$ac_includes_default
1887int
1888main ()
1889{
1890static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1891test_array [0] = 0
1892
1893 ;
1894 return 0;
1895}
1896_ACEOF
1897if ac_fn_c_try_compile "$LINENO"; then :
1898 case $ac_type in #(
1899 uint$2_t) :
1900 eval "$3=yes" ;; #(
1901 *) :
1902 eval "$3=\$ac_type" ;;
1903esac
1904fi
1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001906 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907
1908else
1909 break
1910fi
1911 done
1912fi
1913eval ac_res=\$$3
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1915$as_echo "$ac_res" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001916 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001917
1918} # ac_fn_c_find_uintX_t
1919
1920# ac_fn_c_find_intX_t LINENO BITS VAR
1921# -----------------------------------
1922# Finds a signed integer type with width BITS, setting cache variable VAR
1923# accordingly.
1924ac_fn_c_find_intX_t ()
1925{
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1928$as_echo_n "checking for int$2_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001929if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=no"
1933 # Order is important - never check a type that is potentially smaller
1934 # than half of the expected target width.
1935 for ac_type in int$2_t 'int' 'long int' \
1936 'long long int' 'short int' 'signed char'; do
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001940 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001941int
1942main ()
1943{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001944static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001945test_array [0] = 0
1946
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_compile "$LINENO"; then :
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001955 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001956int
1957main ()
1958{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001959static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001960 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1961test_array [0] = 0
1962
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968
1969else
1970 case $ac_type in #(
1971 int$2_t) :
1972 eval "$3=yes" ;; #(
1973 *) :
1974 eval "$3=\$ac_type" ;;
1975esac
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001980 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02001990 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_intX_t
1993
1994# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1995# --------------------------------------------
1996# Tries to find the compile-time value of EXPR in a program that includes
1997# INCLUDES, setting VAR accordingly. Returns whether the value could be
1998# computed
1999ac_fn_c_compute_int ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 if test "$cross_compiling" = yes; then
2003 # Depending upon the size, compute the lo and hi bounds.
2004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) >= 0)];
2011test_array [0] = 0
2012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_lo=0 ac_mid=0
2019 while :; do
2020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021/* end confdefs.h. */
2022$4
2023int
2024main ()
2025{
2026static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2027test_array [0] = 0
2028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 ac_hi=$ac_mid; break
2035else
2036 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2037 if test $ac_lo -le $ac_mid; then
2038 ac_lo= ac_hi=
2039 break
2040 fi
2041 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2044 done
2045else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052static int test_array [1 - 2 * !(($2) < 0)];
2053test_array [0] = 0
2054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_hi=-1 ac_mid=-1
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2069test_array [0] = 0
2070
2071 ;
2072 return 0;
2073}
2074_ACEOF
2075if ac_fn_c_try_compile "$LINENO"; then :
2076 ac_lo=$ac_mid; break
2077else
2078 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2079 if test $ac_mid -le $ac_hi; then
2080 ac_lo= ac_hi=
2081 break
2082 fi
2083 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086 done
2087else
2088 ac_lo= ac_hi=
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093# Binary search between lo and hi bounds.
2094while test "x$ac_lo" != "x$ac_hi"; do
2095 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
2098$4
2099int
2100main ()
2101{
2102static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2103test_array [0] = 0
2104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=$ac_mid
2111else
2112 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115done
2116case $ac_lo in #((
2117?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2118'') ac_retval=1 ;;
2119esac
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124static long int longval () { return $2; }
2125static unsigned long int ulongval () { return $2; }
2126#include <stdio.h>
2127#include <stdlib.h>
2128int
2129main ()
2130{
2131
2132 FILE *f = fopen ("conftest.val", "w");
2133 if (! f)
2134 return 1;
2135 if (($2) < 0)
2136 {
2137 long int i = longval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%ld", i);
2141 }
2142 else
2143 {
2144 unsigned long int i = ulongval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%lu", i);
2148 }
2149 /* Do not output a trailing newline, as this causes \r\n confusion
2150 on some platforms. */
2151 return ferror (f) || fclose (f) != 0;
2152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_run "$LINENO"; then :
2158 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2159else
2160 ac_retval=1
2161fi
2162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2163 conftest.$ac_objext conftest.beam conftest.$ac_ext
2164rm -f conftest.val
2165
2166 fi
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002167 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_compute_int
2171
2172# ac_fn_c_check_func LINENO FUNC VAR
2173# ----------------------------------
2174# Tests whether FUNC exists, setting the cache variable VAR accordingly
2175ac_fn_c_check_func ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2179$as_echo_n "checking for $2... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002180if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 $as_echo_n "(cached) " >&6
2182else
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2187#define $2 innocuous_$2
2188
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $2 (); below.
2191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2192 <limits.h> exists even on freestanding compilers. */
2193
2194#ifdef __STDC__
2195# include <limits.h>
2196#else
2197# include <assert.h>
2198#endif
2199
2200#undef $2
2201
2202/* Override any GCC internal prototype to avoid an error.
2203 Use char because int might match the return type of a GCC
2204 builtin and then its argument prototype would still apply. */
2205#ifdef __cplusplus
2206extern "C"
2207#endif
2208char $2 ();
2209/* The GNU C library defines this for functions which it implements
2210 to always fail with ENOSYS. Some functions are actually named
2211 something starting with __ and the normal name is an alias. */
2212#if defined __stub_$2 || defined __stub___$2
2213choke me
2214#endif
2215
2216int
2217main ()
2218{
2219return $2 ();
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_link "$LINENO"; then :
2225 eval "$3=yes"
2226else
2227 eval "$3=no"
2228fi
2229rm -f core conftest.err conftest.$ac_objext \
2230 conftest$ac_exeext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002235 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002236
2237} # ac_fn_c_check_func
2238
2239# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2240# ----------------------------------------------------
2241# Tries to find if the field MEMBER exists in type AGGR, after including
2242# INCLUDES, setting cache variable VAR accordingly.
2243ac_fn_c_check_member ()
2244{
2245 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2247$as_echo_n "checking for $2.$3... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002248if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$5
2254int
2255main ()
2256{
2257static $2 ac_aggr;
2258if (ac_aggr.$3)
2259return 0;
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$4=yes"
2266else
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$5
2270int
2271main ()
2272{
2273static $2 ac_aggr;
2274if (sizeof ac_aggr.$3)
2275return 0;
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$4=yes"
2282else
2283 eval "$4=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289eval ac_res=\$$4
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2291$as_echo "$ac_res" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002292 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002293
2294} # ac_fn_c_check_member
2295
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002296# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2297# ---------------------------------------------
2298# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2299# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002300ac_fn_c_check_decl ()
2301{
2302 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002303 as_decl_name=`echo $2|sed 's/ *(.*//'`
2304 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2306$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002307if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002308 $as_echo_n "(cached) " >&6
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$4
2313int
2314main ()
2315{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002316#ifndef $as_decl_name
2317#ifdef __cplusplus
2318 (void) $as_decl_use;
2319#else
2320 (void) $as_decl_name;
2321#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002322#endif
2323
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329 eval "$3=yes"
2330else
2331 eval "$3=no"
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334fi
2335eval ac_res=\$$3
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337$as_echo "$ac_res" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002338 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002339
2340} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002341cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002342This file contains any messages produced by compilers while
2343running configure, to aid debugging if configure makes a mistake.
2344
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002345It was created by python $as_me 3.3, which was
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002346generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002347
2348 $ $0 $@
2349
2350_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002352{
2353cat <<_ASUNAME
2354## --------- ##
2355## Platform. ##
2356## --------- ##
2357
2358hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2359uname -m = `(uname -m) 2>/dev/null || echo unknown`
2360uname -r = `(uname -r) 2>/dev/null || echo unknown`
2361uname -s = `(uname -s) 2>/dev/null || echo unknown`
2362uname -v = `(uname -v) 2>/dev/null || echo unknown`
2363
2364/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2365/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2366
2367/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2368/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2369/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002371/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2372/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2373/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2374
2375_ASUNAME
2376
2377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2378for as_dir in $PATH
2379do
2380 IFS=$as_save_IFS
2381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002382 $as_echo "PATH: $as_dir"
2383 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002385
2386} >&5
2387
2388cat >&5 <<_ACEOF
2389
2390
2391## ----------- ##
2392## Core tests. ##
2393## ----------- ##
2394
2395_ACEOF
2396
2397
2398# Keep a trace of the command line.
2399# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002403ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_configure_args0=
2405ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002406ac_must_keep_next=false
2407for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002408do
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 for ac_arg
2410 do
2411 case $ac_arg in
2412 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2413 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2414 | -silent | --silent | --silen | --sile | --sil)
2415 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002416 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 esac
2419 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002426 case $ac_arg in
2427 *=* | --config-cache | -C | -disable-* | --disable-* \
2428 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2429 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2430 | -with-* | --with-* | -without-* | --without-* | --x)
2431 case "$ac_configure_args0 " in
2432 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2433 esac
2434 ;;
2435 -* ) ac_must_keep_next=true ;;
2436 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002438 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 ;;
2440 esac
2441 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002442done
Matthias Kloseb9621712010-04-24 17:59:49 +00002443{ ac_configure_args0=; unset ac_configure_args0;}
2444{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446# When interrupted or exit'd, cleanup temporary files, and complete
2447# config.log. We remove comments because anyway the quotes in there
2448# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449# WARNING: Use '\'' to represent an apostrophe within the trap.
2450# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002451trap 'exit_status=$?
2452 # Save into config.log some information that might help in debugging.
2453 {
2454 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002455
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002457## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002458## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 echo
2460 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461(
2462 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2463 eval ac_val=\$$ac_var
2464 case $ac_val in #(
2465 *${as_nl}*)
2466 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2468$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac
2470 case $ac_var in #(
2471 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2473 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac ;;
2475 esac
2476 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2479 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 "s/'\''/'\''\\\\'\'''\''/g;
2482 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2483 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002486 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 esac |
2488 sort
2489)
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002491
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002493## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 echo
2496 for ac_var in $ac_subst_vars
2497 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 eval ac_val=\$$ac_var
2499 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 done | sort
2504 echo
2505
2506 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002509## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 echo
2511 for ac_var in $ac_subst_files
2512 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 eval ac_val=\$$ac_var
2514 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 done | sort
2519 echo
2520 fi
2521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 fi
2530 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$as_me: caught signal $ac_signal"
2532 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 rm -f core *.core core.conftest.* &&
2535 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002538for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541ac_signal=0
2542
2543# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002545
Matthias Kloseb9621712010-04-24 17:59:49 +00002546$as_echo "/* confdefs.h */" > confdefs.h
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548# Predefined preprocessor variables.
2549
2550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_NAME "$PACKAGE_NAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_VERSION "$PACKAGE_VERSION"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_STRING "$PACKAGE_STRING"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2568_ACEOF
2569
Matthias Kloseb9621712010-04-24 17:59:49 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_URL "$PACKAGE_URL"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574
2575# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002576# Prefer an explicitly selected file to automatically selected ones.
2577ac_site_file1=NONE
2578ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580 # We do not want a PATH search for config.site.
2581 case $CONFIG_SITE in #((
2582 -*) ac_site_file1=./$CONFIG_SITE;;
2583 */*) ac_site_file1=$CONFIG_SITE;;
2584 *) ac_site_file1=./$CONFIG_SITE;;
2585 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$prefix/share/config.site
2588 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589else
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 ac_site_file1=$ac_default_prefix/share/config.site
2591 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002593for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594do
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 test "x$ac_site_file" = xNONE && continue
2596 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2598$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600 . "$ac_site_file" \
2601 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2603as_fn_error $? "failed to load site script $ac_site_file
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002604See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605 fi
2606done
2607
2608if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 # Some versions of bash will fail to source /dev/null (special files
2610 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2611 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2613$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2616 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 esac
2618 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619else
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2621$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 >$cache_file
2623fi
2624
2625# Check that the precious variables saved in the cache have kept the same
2626# value.
2627ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2630 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2632 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 case $ac_old_set,$ac_new_set in
2634 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_cache_corrupted=: ;;
2638 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2640$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 ac_cache_corrupted=: ;;
2642 ,);;
2643 *)
2644 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 # differences in whitespace do not lead to failure.
2646 ac_old_val_w=`echo x $ac_old_val`
2647 ac_new_val_w=`echo x $ac_new_val`
2648 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2650$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2651 ac_cache_corrupted=:
2652 else
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2654$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2655 eval $ac_var=\$ac_old_val
2656 fi
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2658$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2660$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 fi;;
2662 esac
2663 # Pass precious variables to config.status.
2664 if test "$ac_new_set" = set; then
2665 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 *) ac_arg=$ac_var=$ac_new_val ;;
2668 esac
2669 case " $ac_configure_args " in
2670 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 esac
2673 fi
2674done
2675if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2679$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002680 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002682## -------------------- ##
2683## Main body of script. ##
2684## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685
Guido van Rossum7f43da71994-08-01 12:15:30 +00002686ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2690ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691
Guido van Rossum627b2d71993-12-24 10:39:16 +00002692
Michael W. Hudson54241132001-12-07 15:38:26 +00002693
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002694
2695
2696
2697
2698if test -e $srcdir/.hg/00changelog.i
2699then
2700# Extract the first word of "hg", so it can be a program name with args.
2701set dummy hg; ac_word=$2
2702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2703$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02002704if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705 $as_echo_n "(cached) " >&6
2706else
2707 if test -n "$HAS_HG"; then
2708 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2709else
2710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2711for as_dir in $PATH
2712do
2713 IFS=$as_save_IFS
2714 test -z "$as_dir" && as_dir=.
2715 for ac_exec_ext in '' $ac_executable_extensions; do
2716 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2717 ac_cv_prog_HAS_HG="found"
2718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2719 break 2
2720 fi
2721done
2722 done
2723IFS=$as_save_IFS
2724
2725 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2726fi
2727fi
2728HAS_HG=$ac_cv_prog_HAS_HG
2729if test -n "$HAS_HG"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2731$as_echo "$HAS_HG" >&6; }
2732else
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2734$as_echo "no" >&6; }
2735fi
2736
2737
2738else
2739HAS_HG=no-repository
2740fi
2741if test $HAS_HG = found
2742then
2743 HGVERSION="hg id -i \$(srcdir)"
2744 HGTAG="hg id -t \$(srcdir)"
2745 HGBRANCH="hg id -b \$(srcdir)"
2746else
2747 HGVERSION=""
2748 HGTAG=""
2749 HGBRANCH=""
2750fi
2751
2752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002754
2755
Martin v. Löwis11437992002-04-12 09:54:03 +00002756
Benjamin Petersond23f8222009-04-05 19:13:16 +00002757if test "$prefix" != "/"; then
2758 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2759fi
2760
2761
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
2763
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002764# We don't use PACKAGE_ variables, and they cause conflicts
2765# with other autoconf-based packages that include Python.h
2766grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2767rm confdefs.h
2768mv confdefs.h.new confdefs.h
2769
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002770
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002771VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002772
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002773# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002774
2775SOVERSION=1.0
2776
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002777# The later defininition of _XOPEN_SOURCE disables certain features
2778# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2779
Matthias Kloseb9621712010-04-24 17:59:49 +00002780$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002781
2782
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002783# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2784# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2785# them.
2786
Matthias Kloseb9621712010-04-24 17:59:49 +00002787$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002788
2789
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002790# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2791# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2792# them.
2793
Matthias Kloseb9621712010-04-24 17:59:49 +00002794$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002795
2796
Martin v. Löwisd6320502004-08-12 13:45:08 +00002797# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2798# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2799
Matthias Kloseb9621712010-04-24 17:59:49 +00002800$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002801
2802
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002803# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2804# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2805# them.
2806
Matthias Kloseb9621712010-04-24 17:59:49 +00002807$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808
2809
2810
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002811define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002812
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002813# Arguments passed to configure.
2814
2815CONFIG_ARGS="$ac_configure_args"
2816
Matthias Kloseb9621712010-04-24 17:59:49 +00002817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2818$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002819# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002820if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002821 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002822 case $enableval in
2823 yes)
2824 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002825 if test ! -d "${enableval}"
2826 then
2827 enableval=/
2828 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002829 ;;
2830 esac
2831 case $enableval in
2832 no)
2833 UNIVERSALSDK=
2834 enable_universalsdk=
2835 ;;
2836 *)
2837 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002838 if test ! -d "${UNIVERSALSDK}"
2839 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002840 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002841 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002842 ;;
2843 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002844
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002845
Thomas Wouters477c8d52006-05-27 19:21:47 +00002846else
2847
2848 UNIVERSALSDK=
2849 enable_universalsdk=
2850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002852
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002853if test -n "${UNIVERSALSDK}"
2854then
Matthias Kloseb9621712010-04-24 17:59:49 +00002855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2856$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002857else
Matthias Kloseb9621712010-04-24 17:59:49 +00002858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2859$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002860fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002862
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002863
2864
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002865UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002866
Matthias Kloseb9621712010-04-24 17:59:49 +00002867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2868$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002869
2870# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002871if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002872 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2874$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002875 UNIVERSAL_ARCHS="$withval"
2876
2877else
2878
Matthias Kloseb9621712010-04-24 17:59:49 +00002879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2880$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002881
2882fi
2883
2884
2885
2886
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002887
2888# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002889if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002890 withval=$with_framework_name;
2891 PYTHONFRAMEWORK=${withval}
2892 PYTHONFRAMEWORKDIR=${withval}.framework
2893 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2894
2895else
2896
2897 PYTHONFRAMEWORK=Python
2898 PYTHONFRAMEWORKDIR=Python.framework
2899 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2900
2901fi
2902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002903# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002904if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002905 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002906 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002908 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002909 esac
2910 case $enableval in
2911 no)
2912 PYTHONFRAMEWORK=
2913 PYTHONFRAMEWORKDIR=no-framework
2914 PYTHONFRAMEWORKPREFIX=
2915 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916 FRAMEWORKINSTALLFIRST=
2917 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002918 FRAMEWORKALTINSTALLFIRST=
2919 FRAMEWORKALTINSTALLLAST=
2920 if test "x${prefix}" = "xNONE"; then
2921 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2922 else
2923 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2924 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002925 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002926 ;;
2927 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002928 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002929 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002931 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002932 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2933 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002934 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002935
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002936 if test "x${prefix}" = "xNONE" ; then
2937 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002938
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002939 else
2940 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2941 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002942
2943 case "${enableval}" in
2944 /System*)
2945 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2946 if test "${prefix}" = "NONE" ; then
2947 # See below
2948 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2949 fi
2950 ;;
2951
2952 /Library*)
2953 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2954 ;;
2955
2956 */Library/Frameworks)
2957 MDIR="`dirname "${enableval}"`"
2958 MDIR="`dirname "${MDIR}"`"
2959 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2960
2961 if test "${prefix}" = "NONE"; then
2962 # User hasn't specified the
2963 # --prefix option, but wants to install
2964 # the framework in a non-default location,
2965 # ensure that the compatibility links get
2966 # installed relative to that prefix as well
2967 # instead of in /usr/local.
2968 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2969 fi
2970 ;;
2971
2972 *)
2973 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2974 ;;
2975 esac
2976
Jack Jansen127e56e2001-09-11 14:41:54 +00002977 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002978
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002979 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002980 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002981 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002983 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002984
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002985 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2986
2987 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2988
Jack Jansene578a632001-08-15 01:27:14 +00002989 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002990
Guido van Rossum563e7081996-09-10 18:20:48 +00002991else
Martin v. Löwis11437992002-04-12 09:54:03 +00002992
Jack Jansene578a632001-08-15 01:27:14 +00002993 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002994 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002995 PYTHONFRAMEWORKPREFIX=
2996 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002997 FRAMEWORKINSTALLFIRST=
2998 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002999 FRAMEWORKALTINSTALLFIRST=
3000 FRAMEWORKALTINSTALLLAST=
3001 if test "x${prefix}" = "xNONE" ; then
3002 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3003 else
3004 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3005 fi
Jack Jansene578a632001-08-15 01:27:14 +00003006 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003007
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009fi
3010
Thomas Wouters477c8d52006-05-27 19:21:47 +00003011
3012
Michael W. Hudson54241132001-12-07 15:38:26 +00003013
3014
3015
3016
Jack Jansene578a632001-08-15 01:27:14 +00003017
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003018
3019
3020
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003021
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003022
Jack Jansene578a632001-08-15 01:27:14 +00003023##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003024## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003025## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003026##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003027# Set name for machine-dependent library files
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3030$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003031if test -z "$MACHDEP"
3032then
Guido van Rossum563e7081996-09-10 18:20:48 +00003033 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003034 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003035 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003036 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003037 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003038 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003039 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003040 ac_md_system=`echo $ac_sys_system |
3041 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3042 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003043 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003044 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003045
Guido van Rossum07397971997-04-29 21:49:50 +00003046 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003047 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003048 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003049 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003050 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003051 esac
3052fi
Guido van Rossum91922671997-10-09 20:24:13 +00003053
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003054# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3055# disable features if it is defined, without any means to access these
3056# features as extensions. For these systems, we skip the definition of
3057# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3058# some feature, make sure there is no alternative way to access this
3059# feature. Also, when using wildcards, make sure you have verified the
3060# need for not defining _XOPEN_SOURCE on all systems matching the
3061# wildcard, and that the wildcard does not include future systems
3062# (which may remove their limitations).
3063case $ac_sys_system/$ac_sys_release in
3064 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3065 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003066 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003067 # In addition, Stefan Krah confirms that issue #1244610 exists through
3068 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003069 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003070 define_xopen_source=no
3071 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3072 # also defined. This can be overridden by defining _BSD_SOURCE
3073 # As this has a different meaning on Linux, only define it on OpenBSD
3074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003076
3077 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003078 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003079 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3080 # also defined. This can be overridden by defining _BSD_SOURCE
3081 # As this has a different meaning on Linux, only define it on OpenBSD
3082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003084
3085 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003086 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3087 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3088 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003089 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003090 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003091 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3092 # request to enable features supported by the standard as a request
3093 # to disable features not supported by the standard. The best way
3094 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3095 # entirely and define __EXTENSIONS__ instead.
3096 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003097 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003098 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3099 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003100 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003101 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003102 define_xopen_source=no;;
3103 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003104 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003105 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003106 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003107 # On FreeBSD 4, the math functions C89 does not cover are never defined
3108 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3109 FreeBSD/4.*)
3110 define_xopen_source=no;;
3111 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3112 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3113 # identifies itself as Darwin/7.*
3114 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3115 # disables platform specific features beyond repair.
3116 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3117 # has no effect, don't bother defining them
3118 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003119 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003120 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003121 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003122 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3123 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3124 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003125 AIX/4)
3126 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003127 AIX/5)
3128 if test `uname -r` -eq 1; then
3129 define_xopen_source=no
3130 fi
3131 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003132 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3133 # defining NI_NUMERICHOST.
3134 QNX/6.3.2)
3135 define_xopen_source=no
3136 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003137
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003138esac
3139
3140if test $define_xopen_source = yes
3141then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003142
Matthias Kloseb9621712010-04-24 17:59:49 +00003143$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003144
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003145
3146 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3147 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3148 # several APIs are not declared. Since this is also needed in some
3149 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003150
Matthias Kloseb9621712010-04-24 17:59:49 +00003151$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003152
3153
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003154
Matthias Kloseb9621712010-04-24 17:59:49 +00003155$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003156
3157
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003158fi
3159
Guido van Rossum91922671997-10-09 20:24:13 +00003160#
3161# SGI compilers allow the specification of the both the ABI and the
3162# ISA on the command line. Depending on the values of these switches,
3163# different and often incompatable code will be generated.
3164#
3165# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3166# thus supply support for various ABI/ISA combinations. The MACHDEP
3167# variable is also adjusted.
3168#
3169
3170if test ! -z "$SGI_ABI"
3171then
3172 CC="cc $SGI_ABI"
3173 LDFLAGS="$SGI_ABI $LDFLAGS"
3174 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3177$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003178
Jack Jansen6b08a402004-06-03 12:41:45 +00003179# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3180# it may influence the way we can build extensions, so distutils
3181# needs to check it
3182
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183
Jack Jansen6b08a402004-06-03 12:41:45 +00003184CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003186
Matthias Kloseb9621712010-04-24 17:59:49 +00003187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3188$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003189ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3191$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003192
Guido van Rossum627b2d71993-12-24 10:39:16 +00003193# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003194
3195# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3196# for debug/optimization stuff. BASECFLAGS is for flags that are required
3197# just to get things to compile and link. Users are free to override OPT
3198# when running configure or make. The build should not break if they do.
3199# BASECFLAGS should generally not be messed with, however.
3200
3201# XXX shouldn't some/most/all of this code be merged with the stuff later
3202# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3204$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003207if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003209 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003210 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003211 without_gcc=yes;;
3212 yes) CC=gcc
3213 without_gcc=no;;
3214 *) CC=$withval
3215 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003216 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003217else
Martin v. Löwis11437992002-04-12 09:54:03 +00003218
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003219 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003220 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003221 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003222 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003223 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224fi
3225
Matthias Kloseb9621712010-04-24 17:59:49 +00003226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3227$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003228
Guido van Rossum8b131c51995-03-09 14:10:13 +00003229# If the user switches compilers, we can't believe the cache
3230if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3231then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003232 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003233(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003234fi
3235
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003236# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3237# when the compiler supports them, but we don't always want -O2, and
3238# we set -g later.
3239if test -z "$CFLAGS"; then
3240 CFLAGS=
3241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003242ac_ext=c
3243ac_cpp='$CPP $CPPFLAGS'
3244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3246ac_compiler_gnu=$ac_cv_c_compiler_gnu
3247if test -n "$ac_tool_prefix"; then
3248 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3249set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3251$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003252if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003253 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003254else
3255 if test -n "$CC"; then
3256 ac_cv_prog_CC="$CC" # Let the user override the test.
3257else
Martin v. Löwis11437992002-04-12 09:54:03 +00003258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259for as_dir in $PATH
3260do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003263 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003265 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003267 break 2
3268 fi
3269done
Matthias Kloseb9621712010-04-24 17:59:49 +00003270 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003272
Jack Jansendd19cf82001-12-06 22:36:17 +00003273fi
3274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003275CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003276if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3278$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003279else
Matthias Kloseb9621712010-04-24 17:59:49 +00003280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3281$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003282fi
3283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284
Martin v. Löwis11437992002-04-12 09:54:03 +00003285fi
3286if test -z "$ac_cv_prog_CC"; then
3287 ac_ct_CC=$CC
3288 # Extract the first word of "gcc", so it can be a program name with args.
3289set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3291$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003292if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003294else
3295 if test -n "$ac_ct_CC"; then
3296 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3297else
3298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3299for as_dir in $PATH
3300do
3301 IFS=$as_save_IFS
3302 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003305 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003307 break 2
3308 fi
3309done
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003312
3313fi
3314fi
3315ac_ct_CC=$ac_cv_prog_ac_ct_CC
3316if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3318$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003319else
Matthias Kloseb9621712010-04-24 17:59:49 +00003320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3321$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003322fi
3323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003324 if test "x$ac_ct_CC" = x; then
3325 CC=""
3326 else
3327 case $cross_compiling:$ac_tool_warned in
3328yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003329{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3330$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331ac_tool_warned=yes ;;
3332esac
3333 CC=$ac_ct_CC
3334 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003335else
3336 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003337fi
3338
Jack Jansendd19cf82001-12-06 22:36:17 +00003339if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003340 if test -n "$ac_tool_prefix"; then
3341 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003342set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3344$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003346 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003347else
3348 if test -n "$CC"; then
3349 ac_cv_prog_CC="$CC" # Let the user override the test.
3350else
Martin v. Löwis11437992002-04-12 09:54:03 +00003351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3352for as_dir in $PATH
3353do
3354 IFS=$as_save_IFS
3355 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003356 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003357 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003358 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003359 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 break 2
3361 fi
3362done
Matthias Kloseb9621712010-04-24 17:59:49 +00003363 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003364IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003365
3366fi
3367fi
3368CC=$ac_cv_prog_CC
3369if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3371$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003372else
Matthias Kloseb9621712010-04-24 17:59:49 +00003373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3374$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003375fi
3376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003377
Martin v. Löwis11437992002-04-12 09:54:03 +00003378 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003379fi
3380if test -z "$CC"; then
3381 # Extract the first word of "cc", so it can be a program name with args.
3382set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3384$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003385if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003386 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003387else
3388 if test -n "$CC"; then
3389 ac_cv_prog_CC="$CC" # Let the user override the test.
3390else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003391 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3393for as_dir in $PATH
3394do
3395 IFS=$as_save_IFS
3396 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003397 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003398 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3400 ac_prog_rejected=yes
3401 continue
3402 fi
3403 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 break 2
3406 fi
3407done
Matthias Kloseb9621712010-04-24 17:59:49 +00003408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003411if test $ac_prog_rejected = yes; then
3412 # We found a bogon in the path, so make sure we never use it.
3413 set dummy $ac_cv_prog_CC
3414 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003416 # We chose a different compiler from the bogus one.
3417 # However, it has the same basename, so the bogon will be chosen
3418 # first if we set CC to just the basename; use the full file name.
3419 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003420 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421 fi
3422fi
3423fi
3424fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003425CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003426if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3428$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429else
Matthias Kloseb9621712010-04-24 17:59:49 +00003430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3431$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003432fi
3433
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434
Martin v. Löwis11437992002-04-12 09:54:03 +00003435fi
3436if test -z "$CC"; then
3437 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003438 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 do
3440 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3441set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3443$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003444if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003446else
3447 if test -n "$CC"; then
3448 ac_cv_prog_CC="$CC" # Let the user override the test.
3449else
Martin v. Löwis11437992002-04-12 09:54:03 +00003450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3451for as_dir in $PATH
3452do
3453 IFS=$as_save_IFS
3454 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003455 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461done
Matthias Kloseb9621712010-04-24 17:59:49 +00003462 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
3465fi
3466fi
3467CC=$ac_cv_prog_CC
3468if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3470$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471else
Matthias Kloseb9621712010-04-24 17:59:49 +00003472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3473$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003474fi
3475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 test -n "$CC" && break
3478 done
3479fi
3480if test -z "$CC"; then
3481 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003483do
3484 # Extract the first word of "$ac_prog", so it can be a program name with args.
3485set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3487$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003488if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003490else
3491 if test -n "$ac_ct_CC"; then
3492 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3493else
3494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3495for as_dir in $PATH
3496do
3497 IFS=$as_save_IFS
3498 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003499 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003500 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 break 2
3504 fi
3505done
Matthias Kloseb9621712010-04-24 17:59:49 +00003506 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003508
Martin v. Löwis11437992002-04-12 09:54:03 +00003509fi
3510fi
3511ac_ct_CC=$ac_cv_prog_ac_ct_CC
3512if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3514$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003515else
Matthias Kloseb9621712010-04-24 17:59:49 +00003516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3517$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003518fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 test -n "$ac_ct_CC" && break
3522done
Michael W. Hudson54241132001-12-07 15:38:26 +00003523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003524 if test "x$ac_ct_CC" = x; then
3525 CC=""
3526 else
3527 case $cross_compiling:$ac_tool_warned in
3528yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531ac_tool_warned=yes ;;
3532esac
3533 CC=$ac_ct_CC
3534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003535fi
3536
3537fi
3538
3539
Matthias Kloseb9621712010-04-24 17:59:49 +00003540test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003542as_fn_error $? "no acceptable C compiler found in \$PATH
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003543See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003544
3545# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003546$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3547set X $ac_compile
3548ac_compiler=$2
3549for ac_option in --version -v -V -qversion; do
3550 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551case "(($ac_try" in
3552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3553 *) ac_try_echo=$ac_try;;
3554esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3556$as_echo "$ac_try_echo"; } >&5
3557 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003559 if test -s conftest.err; then
3560 sed '10a\
3561... rest of stderr output deleted ...
3562 10q' conftest.err >conftest.er1
3563 cat conftest.er1 >&5
3564 fi
3565 rm -f conftest.er1 conftest.err
3566 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3567 test $ac_status = 0; }
3568done
Martin v. Löwis11437992002-04-12 09:54:03 +00003569
Matthias Kloseb9621712010-04-24 17:59:49 +00003570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003571/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573int
3574main ()
3575{
3576
3577 ;
3578 return 0;
3579}
3580_ACEOF
3581ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003582ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003583# Try to create an executable without -o first, disregard a.out.
3584# It will help us diagnose broken compilers, and finding out an intuition
3585# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3587$as_echo_n "checking whether the C compiler works... " >&6; }
3588ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3589
3590# The possible output files:
3591ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593ac_rmfiles=
3594for ac_file in $ac_files
3595do
3596 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3599 esac
3600done
3601rm -f $ac_rmfiles
3602
Matthias Kloseb9621712010-04-24 17:59:49 +00003603if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604case "(($ac_try" in
3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3606 *) ac_try_echo=$ac_try;;
3607esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003608eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3609$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3613 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3615# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3616# in a Makefile. We should not override ac_cv_exeext if it was cached,
3617# so that the user can short-circuit this test for compilers unknown to
3618# Autoconf.
3619for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003620do
3621 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003624 ;;
3625 [ab].out )
3626 # We found the default executable, but exeext='' is most
3627 # certainly right.
3628 break;;
3629 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 then :; else
3632 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3633 fi
3634 # We set ac_cv_exeext here because the later test for it is not
3635 # safe: cross compilers may not add the suffix if given an `-o'
3636 # argument, so we may need to know it at that point already.
3637 # Even if this section looks crufty: it has the advantage of
3638 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003639 break;;
3640 * )
3641 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 esac
3643done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644test "$ac_cv_exeext" = no && ac_cv_exeext=
3645
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003646else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647 ac_file=''
3648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003649if test -z "$ac_file"; then :
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3651$as_echo "no" >&6; }
3652$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003653sed 's/^/| /' conftest.$ac_ext >&5
3654
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003657as_fn_error 77 "C compiler cannot create executables
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003658See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003659else
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3661$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3664$as_echo_n "checking for C compiler default output file name... " >&6; }
3665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3666$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003667ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003668
Matthias Kloseb9621712010-04-24 17:59:49 +00003669rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003670ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3672$as_echo_n "checking for suffix of executables... " >&6; }
3673if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674case "(($ac_try" in
3675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3676 *) ac_try_echo=$ac_try;;
3677esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3679$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3683 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003684 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3685# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3686# work properly (i.e., refer to `conftest.exe'), while it won't with
3687# `rm'.
3688for ac_file in conftest.exe conftest conftest.*; do
3689 test -f "$ac_file" || continue
3690 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003692 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3693 break;;
3694 * ) break;;
3695 esac
3696done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003697else
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003700as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003701See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003703rm -f conftest conftest$ac_cv_exeext
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3705$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003706
3707rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003708EXEEXT=$ac_cv_exeext
3709ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3711/* end confdefs.h. */
3712#include <stdio.h>
3713int
3714main ()
3715{
3716FILE *f = fopen ("conftest.out", "w");
3717 return ferror (f) || fclose (f) != 0;
3718
3719 ;
3720 return 0;
3721}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003723ac_clean_files="$ac_clean_files conftest.out"
3724# Check that the compiler produces executables we can run. If not, either
3725# the compiler is broken, or we cross compile.
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3727$as_echo_n "checking whether we are cross compiling... " >&6; }
3728if test "$cross_compiling" != yes; then
3729 { { ac_try="$ac_link"
3730case "(($ac_try" in
3731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3732 *) ac_try_echo=$ac_try;;
3733esac
3734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3735$as_echo "$ac_try_echo"; } >&5
3736 (eval "$ac_link") 2>&5
3737 ac_status=$?
3738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3739 test $ac_status = 0; }
3740 if { ac_try='./conftest$ac_cv_exeext'
3741 { { case "(($ac_try" in
3742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3743 *) ac_try_echo=$ac_try;;
3744esac
3745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3746$as_echo "$ac_try_echo"; } >&5
3747 (eval "$ac_try") 2>&5
3748 ac_status=$?
3749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3750 test $ac_status = 0; }; }; then
3751 cross_compiling=no
3752 else
3753 if test "$cross_compiling" = maybe; then
3754 cross_compiling=yes
3755 else
3756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003758as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003759If you meant to cross compile, use \`--host'.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003760See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 fi
3762 fi
3763fi
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3765$as_echo "$cross_compiling" >&6; }
3766
3767rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3768ac_clean_files=$ac_clean_files_save
3769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3770$as_echo_n "checking for suffix of object files... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003771if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $as_echo_n "(cached) " >&6
3773else
3774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003775/* end confdefs.h. */
3776
3777int
3778main ()
3779{
3780
3781 ;
3782 return 0;
3783}
3784_ACEOF
3785rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003786if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787case "(($ac_try" in
3788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3789 *) ac_try_echo=$ac_try;;
3790esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3792$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3796 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797 for ac_file in conftest.o conftest.obj conftest.*; do
3798 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3802 break;;
3803 esac
3804done
3805else
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003807sed 's/^/| /' conftest.$ac_ext >&5
3808
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003811as_fn_error $? "cannot compute suffix of object files: cannot compile
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003812See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003814rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3817$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003818OBJEXT=$ac_cv_objext
3819ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3821$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003822if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828int
3829main ()
3830{
3831#ifndef __GNUC__
3832 choke me
3833#endif
3834
3835 ;
3836 return 0;
3837}
3838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003839if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 ac_compiler_gnu=yes
3841else
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003845ac_cv_c_compiler_gnu=$ac_compiler_gnu
3846
3847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3849$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3850if test $ac_compiler_gnu = yes; then
3851 GCC=yes
3852else
3853 GCC=
3854fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003855ac_test_CFLAGS=${CFLAGS+set}
3856ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3858$as_echo_n "checking whether $CC accepts -g... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003859if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003861else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862 ac_save_c_werror_flag=$ac_c_werror_flag
3863 ac_c_werror_flag=yes
3864 ac_cv_prog_cc_g=no
3865 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869int
3870main ()
3871{
3872
3873 ;
3874 return 0;
3875}
3876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003877if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003878 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003879else
Matthias Kloseb9621712010-04-24 17:59:49 +00003880 CFLAGS=""
3881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882/* end confdefs.h. */
3883
3884int
3885main ()
3886{
3887
3888 ;
3889 return 0;
3890}
3891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003892if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893
Matthias Kloseb9621712010-04-24 17:59:49 +00003894else
3895 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898/* end confdefs.h. */
3899
3900int
3901main ()
3902{
3903
3904 ;
3905 return 0;
3906}
3907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003908if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3916 ac_c_werror_flag=$ac_save_c_werror_flag
3917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3919$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003920if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003921 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003922elif test $ac_cv_prog_cc_g = yes; then
3923 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003924 CFLAGS="-g -O2"
3925 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003926 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003927 fi
3928else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003929 if test "$GCC" = yes; then
3930 CFLAGS="-O2"
3931 else
3932 CFLAGS=
3933 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3936$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003937if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003939else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003941ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003943/* end confdefs.h. */
3944#include <stdarg.h>
3945#include <stdio.h>
3946#include <sys/types.h>
3947#include <sys/stat.h>
3948/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3949struct buf { int x; };
3950FILE * (*rcsopen) (struct buf *, struct stat *, int);
3951static char *e (p, i)
3952 char **p;
3953 int i;
3954{
3955 return p[i];
3956}
3957static char *f (char * (*g) (char **, int), char **p, ...)
3958{
3959 char *s;
3960 va_list v;
3961 va_start (v,p);
3962 s = g (p, va_arg (v,int));
3963 va_end (v);
3964 return s;
3965}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966
3967/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3968 function prototypes and stuff, but not '\xHH' hex character constants.
3969 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003971 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3972 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003974int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3977 inside strings and character constants. */
3978#define FOO(x) 'x'
3979int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3980
Skip Montanaro6dead952003-09-25 14:50:04 +00003981int test (int i, double x);
3982struct s1 {int (*f) (int a);};
3983struct s2 {int (*f) (double a);};
3984int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3985int argc;
3986char **argv;
3987int
3988main ()
3989{
3990return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3991 ;
3992 return 0;
3993}
3994_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3996 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003997do
3998 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003999 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002rm -f core conftest.err conftest.$ac_objext
4003 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004006CC=$ac_save_CC
4007
4008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009# AC_CACHE_VAL
4010case "x$ac_cv_prog_cc_c89" in
4011 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4013$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4016$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004017 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4020$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004021esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004022if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004023
Matthias Kloseb9621712010-04-24 17:59:49 +00004024fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004025
Martin v. Löwis11437992002-04-12 09:54:03 +00004026ac_ext=c
4027ac_cpp='$CPP $CPPFLAGS'
4028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4030ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004032
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004033
4034
Matthias Kloseb9621712010-04-24 17:59:49 +00004035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4036$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004039if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041
4042 case $withval in
4043 no) with_cxx_main=no
4044 MAINCC='$(CC)';;
4045 yes) with_cxx_main=yes
4046 MAINCC='$(CXX)';;
4047 *) with_cxx_main=yes
4048 MAINCC=$withval
4049 if test -z "$CXX"
4050 then
4051 CXX=$withval
4052 fi;;
4053 esac
4054else
4055
4056 with_cxx_main=no
4057 MAINCC='$(CC)'
4058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059fi
4060
Matthias Kloseb9621712010-04-24 17:59:49 +00004061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4062$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063
4064preset_cxx="$CXX"
4065if test -z "$CXX"
4066then
4067 case "$CC" in
4068 gcc) # Extract the first word of "g++", so it can be a program name with args.
4069set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4071$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004072if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004074else
4075 case $CXX in
4076 [\\/]* | ?:[\\/]*)
4077 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4078 ;;
4079 *)
4080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4081for as_dir in notfound
4082do
4083 IFS=$as_save_IFS
4084 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004086 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004087 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004089 break 2
4090 fi
4091done
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004093IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004094
4095 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4096 ;;
4097esac
4098fi
4099CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004100if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4102$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004103else
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4105$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004108 ;;
4109 cc) # Extract the first word of "c++", so it can be a program name with args.
4110set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4112$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004113if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004115else
4116 case $CXX in
4117 [\\/]* | ?:[\\/]*)
4118 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4119 ;;
4120 *)
4121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4122for as_dir in notfound
4123do
4124 IFS=$as_save_IFS
4125 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004127 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004128 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130 break 2
4131 fi
4132done
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004135
4136 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4137 ;;
4138esac
4139fi
4140CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004141if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4143$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004144else
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4146$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004149 ;;
4150 esac
4151 if test "$CXX" = "notfound"
4152 then
4153 CXX=""
4154 fi
4155fi
4156if test -z "$CXX"
4157then
4158 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4159do
4160 # Extract the first word of "$ac_prog", so it can be a program name with args.
4161set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4163$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004164if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004166else
4167 if test -n "$CXX"; then
4168 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4169else
4170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4171for as_dir in $PATH
4172do
4173 IFS=$as_save_IFS
4174 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004177 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004179 break 2
4180 fi
4181done
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004184
4185fi
4186fi
4187CXX=$ac_cv_prog_CXX
4188if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4190$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004191else
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4193$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004194fi
4195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004197 test -n "$CXX" && break
4198done
4199test -n "$CXX" || CXX="notfound"
4200
4201 if test "$CXX" = "notfound"
4202 then
4203 CXX=""
4204 fi
4205fi
4206if test "$preset_cxx" != "$CXX"
4207then
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004209
4210 By default, distutils will build C++ extension modules with \"$CXX\".
4211 If this is not intended, then set CXX on the configure command line.
4212 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004213$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004214
4215 By default, distutils will build C++ extension modules with \"$CXX\".
4216 If this is not intended, then set CXX on the configure command line.
4217 " >&2;}
4218fi
4219
4220
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4222$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4223save_LDFLAGS="$LDFLAGS"
4224LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004225
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227/* end confdefs.h. */
4228
4229int
4230main ()
4231{
4232
4233 ;
4234 return 0;
4235}
4236_ACEOF
4237if ac_fn_c_try_link "$LINENO"; then :
4238 NO_AS_NEEDED="-Wl,--no-as-needed"
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4240$as_echo "yes" >&6; }
4241else
4242 NO_AS_NEEDED=""
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4244$as_echo "no" >&6; }
4245fi
4246rm -f core conftest.err conftest.$ac_objext \
4247 conftest$ac_exeext conftest.$ac_ext
4248LDFLAGS="$save_LDFLAGS"
4249
4250
4251
4252# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004253ac_ext=c
4254ac_cpp='$CPP $CPPFLAGS'
4255ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4256ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4257ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4259$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004260# On Suns, sometimes $CPP names a directory.
4261if test -n "$CPP" && test -d "$CPP"; then
4262 CPP=
4263fi
4264if test -z "$CPP"; then
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004265 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004267else
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 # Double quotes because CPP needs to be expanded
4269 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4270 do
4271 ac_preproc_ok=false
4272for ac_c_preproc_warn_flag in '' yes
4273do
4274 # Use a header file that comes with gcc, so configuring glibc
4275 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004276 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4277 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004278 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004281/* end confdefs.h. */
4282#ifdef __STDC__
4283# include <limits.h>
4284#else
4285# include <assert.h>
4286#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004289if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004290
Matthias Kloseb9621712010-04-24 17:59:49 +00004291else
Martin v. Löwis11437992002-04-12 09:54:03 +00004292 # Broken: fails on valid input.
4293continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004294fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004295rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004296
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004298 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004301#include <ac_nonexistent.h>
4302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004303if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004304 # Broken: success on invalid input.
4305continue
4306else
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 # Passes both tests.
4308ac_preproc_ok=:
4309break
4310fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004311rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004312
4313done
4314# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004315rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004316if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 break
4318fi
4319
4320 done
4321 ac_cv_prog_CPP=$CPP
4322
4323fi
4324 CPP=$ac_cv_prog_CPP
4325else
4326 ac_cv_prog_CPP=$CPP
4327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4329$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004330ac_preproc_ok=false
4331for ac_c_preproc_warn_flag in '' yes
4332do
4333 # Use a header file that comes with gcc, so configuring glibc
4334 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004335 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4336 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004337 # On the NeXT, cc -E runs the code through the compiler's parser,
4338 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004340/* end confdefs.h. */
4341#ifdef __STDC__
4342# include <limits.h>
4343#else
4344# include <assert.h>
4345#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004346 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004348if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004349
Matthias Kloseb9621712010-04-24 17:59:49 +00004350else
Martin v. Löwis11437992002-04-12 09:54:03 +00004351 # Broken: fails on valid input.
4352continue
4353fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004354rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004357 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004360#include <ac_nonexistent.h>
4361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004362if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004363 # Broken: success on invalid input.
4364continue
4365else
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 # Passes both tests.
4367ac_preproc_ok=:
4368break
4369fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004370rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004371
4372done
4373# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004374rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004375if $ac_preproc_ok; then :
4376
Martin v. Löwis11437992002-04-12 09:54:03 +00004377else
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004380as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004381See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004382fi
4383
4384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
4389
4390
Matthias Kloseb9621712010-04-24 17:59:49 +00004391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4392$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004393if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004395else
Matthias Kloseb9621712010-04-24 17:59:49 +00004396 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004398 # Loop through the user's path and test for each of PROGNAME-LIST
4399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4401do
4402 IFS=$as_save_IFS
4403 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 for ac_prog in grep ggrep; do
4405 for ac_exec_ext in '' $ac_executable_extensions; do
4406 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4407 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4408# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409 # Check for GNU $ac_path_GREP
4410case `"$ac_path_GREP" --version 2>&1` in
4411*GNU*)
4412 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4413*)
4414 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004415 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416 while :
4417 do
4418 cat "conftest.in" "conftest.in" >"conftest.tmp"
4419 mv "conftest.tmp" "conftest.in"
4420 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4423 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4426 # Best one so far, save it but keep looking for a better one
4427 ac_cv_path_GREP="$ac_path_GREP"
4428 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004429 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 # 10*(2^10) chars as input seems more than enough
4431 test $ac_count -gt 10 && break
4432 done
4433 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4434esac
4435
Matthias Kloseb9621712010-04-24 17:59:49 +00004436 $ac_path_GREP_found && break 3
4437 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004442 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444else
4445 ac_cv_path_GREP=$GREP
4446fi
4447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4450$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004451 GREP="$ac_cv_path_GREP"
4452
4453
Matthias Kloseb9621712010-04-24 17:59:49 +00004454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4455$as_echo_n "checking for egrep... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004456if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004457 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004458else
4459 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4460 then ac_cv_path_EGREP="$GREP -E"
4461 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004463 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 # Loop through the user's path and test for each of PROGNAME-LIST
4465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4467do
4468 IFS=$as_save_IFS
4469 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 for ac_prog in egrep; do
4471 for ac_exec_ext in '' $ac_executable_extensions; do
4472 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4473 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4474# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004475 # Check for GNU $ac_path_EGREP
4476case `"$ac_path_EGREP" --version 2>&1` in
4477*GNU*)
4478 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4479*)
4480 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004481 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482 while :
4483 do
4484 cat "conftest.in" "conftest.in" >"conftest.tmp"
4485 mv "conftest.tmp" "conftest.in"
4486 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004487 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004488 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4489 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004490 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4492 # Best one so far, save it but keep looking for a better one
4493 ac_cv_path_EGREP="$ac_path_EGREP"
4494 ac_path_EGREP_max=$ac_count
4495 fi
4496 # 10*(2^10) chars as input seems more than enough
4497 test $ac_count -gt 10 && break
4498 done
4499 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4500esac
4501
Matthias Kloseb9621712010-04-24 17:59:49 +00004502 $ac_path_EGREP_found && break 3
4503 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004504 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004506IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004507 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004508 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004509 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004510else
4511 ac_cv_path_EGREP=$EGREP
4512fi
4513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004514 fi
4515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4517$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004518 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004519
4520
Matthias Kloseb9621712010-04-24 17:59:49 +00004521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4522$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004523if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004524 $as_echo_n "(cached) " >&6
4525else
4526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004527/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004528#include <stdlib.h>
4529#include <stdarg.h>
4530#include <string.h>
4531#include <float.h>
4532
4533int
4534main ()
4535{
4536
4537 ;
4538 return 0;
4539}
4540_ACEOF
4541if ac_fn_c_try_compile "$LINENO"; then :
4542 ac_cv_header_stdc=yes
4543else
4544 ac_cv_header_stdc=no
4545fi
4546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4547
4548if test $ac_cv_header_stdc = yes; then
4549 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4551/* end confdefs.h. */
4552#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004553
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004554_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004557
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004558else
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004560fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004561rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004562
Matthias Kloseb9621712010-04-24 17:59:49 +00004563fi
4564
4565if test $ac_cv_header_stdc = yes; then
4566 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4568/* end confdefs.h. */
4569#include <stdlib.h>
4570
4571_ACEOF
4572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4573 $EGREP "free" >/dev/null 2>&1; then :
4574
4575else
4576 ac_cv_header_stdc=no
4577fi
4578rm -f conftest*
4579
4580fi
4581
4582if test $ac_cv_header_stdc = yes; then
4583 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4584 if test "$cross_compiling" = yes; then :
4585 :
4586else
4587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588/* end confdefs.h. */
4589#include <ctype.h>
4590#include <stdlib.h>
4591#if ((' ' & 0x0FF) == 0x020)
4592# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4593# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4594#else
4595# define ISLOWER(c) \
4596 (('a' <= (c) && (c) <= 'i') \
4597 || ('j' <= (c) && (c) <= 'r') \
4598 || ('s' <= (c) && (c) <= 'z'))
4599# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4600#endif
4601
4602#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4603int
4604main ()
4605{
4606 int i;
4607 for (i = 0; i < 256; i++)
4608 if (XOR (islower (i), ISLOWER (i))
4609 || toupper (i) != TOUPPER (i))
4610 return 2;
4611 return 0;
4612}
4613_ACEOF
4614if ac_fn_c_try_run "$LINENO"; then :
4615
4616else
4617 ac_cv_header_stdc=no
4618fi
4619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4620 conftest.$ac_objext conftest.beam conftest.$ac_ext
4621fi
4622
4623fi
4624fi
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4626$as_echo "$ac_cv_header_stdc" >&6; }
4627if test $ac_cv_header_stdc = yes; then
4628
4629$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4630
4631fi
4632
4633# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4634for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4635 inttypes.h stdint.h unistd.h
4636do :
4637 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4638ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4639"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004640if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004641 cat >>confdefs.h <<_ACEOF
4642#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4643_ACEOF
4644
4645fi
4646
4647done
4648
4649
4650
4651 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004652if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004653 MINIX=yes
4654else
4655 MINIX=
4656fi
4657
4658
4659 if test "$MINIX" = yes; then
4660
4661$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4662
4663
4664$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4665
4666
4667$as_echo "#define _MINIX 1" >>confdefs.h
4668
4669 fi
4670
4671
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4673$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004674if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004675 $as_echo_n "(cached) " >&6
4676else
4677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678/* end confdefs.h. */
4679
4680# define __EXTENSIONS__ 1
4681 $ac_includes_default
4682int
4683main ()
4684{
4685
4686 ;
4687 return 0;
4688}
4689_ACEOF
4690if ac_fn_c_try_compile "$LINENO"; then :
4691 ac_cv_safe_to_define___extensions__=yes
4692else
4693 ac_cv_safe_to_define___extensions__=no
4694fi
4695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4696fi
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4698$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4699 test $ac_cv_safe_to_define___extensions__ = yes &&
4700 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4701
4702 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4703
4704 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4705
4706 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4707
4708 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4709
4710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004712# Check for unsupported systems
4713case $ac_sys_system/$ac_sys_release in
4714atheos*|Linux*/1*)
4715 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4716 echo See README for details.
4717 exit 1;;
4718esac
4719
4720
Matthias Kloseb9621712010-04-24 17:59:49 +00004721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4722$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004723
4724# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004725if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004726 withval=$with_suffix;
4727 case $withval in
4728 no) EXEEXT=;;
4729 yes) EXEEXT=.exe;;
4730 *) EXEEXT=$withval;;
4731 esac
4732fi
4733
Matthias Kloseb9621712010-04-24 17:59:49 +00004734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4735$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736
4737# Test whether we're running on a non-case-sensitive system, in which
4738# case we give a warning if no ext is given
4739
Matthias Kloseb9621712010-04-24 17:59:49 +00004740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4741$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004742if test ! -d CaseSensitiveTestDir; then
4743mkdir CaseSensitiveTestDir
4744fi
4745
4746if test -d casesensitivetestdir
4747then
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4749$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750 BUILDEXEEXT=.exe
4751else
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4753$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754 BUILDEXEEXT=$EXEEXT
4755fi
4756rmdir CaseSensitiveTestDir
4757
4758case $MACHDEP in
4759bsdos*)
4760 case $CC in
4761 gcc) CC="$CC -D_HAVE_BSDI";;
4762 esac;;
4763esac
4764
4765case $ac_sys_system in
4766hp*|HP*)
4767 case $CC in
4768 cc|*/cc) CC="$CC -Ae";;
4769 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004770esac
4771
4772
4773
Matthias Kloseb9621712010-04-24 17:59:49 +00004774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4775$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776if test -z "$LIBRARY"
4777then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004778 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4781$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782
4783# LDLIBRARY is the name of the library to link against (as opposed to the
4784# name of the library into which to insert object files). BLDLIBRARY is also
4785# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4786# is blank as the main program is not linked directly against LDLIBRARY.
4787# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4788# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4789# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4790# DLLLIBRARY is the shared (i.e., DLL) library.
4791#
4792# RUNSHARED is used to run shared python without installed libraries
4793#
4794# INSTSONAME is the name of the shared library that will be use to install
4795# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004796#
4797# LDVERSION is the shared library version number, normally the Python version
4798# with the ABI build flags appended.
4799
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004800
4801
4802
4803
4804
4805
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004806
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807LDLIBRARY="$LIBRARY"
4808BLDLIBRARY='$(LDLIBRARY)'
4809INSTSONAME='$(LDLIBRARY)'
4810DLLLIBRARY=''
4811LDLIBRARYDIR=''
4812RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004813LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004814
4815# LINKCC is the command that links the python executable -- default is $(CC).
4816# If CXX is set, and if it is needed to link a main function that was
4817# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4818# python might then depend on the C++ runtime
4819# This is altered for AIX in order to build the export list before
4820# linking.
4821
Matthias Kloseb9621712010-04-24 17:59:49 +00004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4823$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824if test -z "$LINKCC"
4825then
4826 LINKCC='$(PURIFY) $(MAINCC)'
4827 case $ac_sys_system in
4828 AIX*)
4829 exp_extra="\"\""
4830 if test $ac_sys_release -ge 5 -o \
4831 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4832 exp_extra="."
4833 fi
4834 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 QNX*)
4836 # qcc must be used because the other compilers do not
4837 # support -N.
4838 LINKCC=qcc;;
4839 esac
4840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4842$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843
4844# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4845# make sure we default having it set to "no": this is used by
4846# distutils.unixccompiler to know if it should add --enable-new-dtags
4847# to linker command lines, and failing to detect GNU ld simply results
4848# in the same bahaviour as before.
4849
Matthias Kloseb9621712010-04-24 17:59:49 +00004850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4851$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852ac_prog=ld
4853if test "$GCC" = yes; then
4854 ac_prog=`$CC -print-prog-name=ld`
4855fi
4856case `"$ac_prog" -V 2>&1 < /dev/null` in
4857 *GNU*)
4858 GNULD=yes;;
4859 *)
4860 GNULD=no;;
4861esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4863$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4866$as_echo_n "checking for inline... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02004867if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004868 $as_echo_n "(cached) " >&6
4869else
4870 ac_cv_c_inline=no
4871for ac_kw in inline __inline__ __inline; do
4872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4873/* end confdefs.h. */
4874#ifndef __cplusplus
4875typedef int foo_t;
4876static $ac_kw foo_t static_foo () {return 0; }
4877$ac_kw foo_t foo () {return 0; }
4878#endif
4879
4880_ACEOF
4881if ac_fn_c_try_compile "$LINENO"; then :
4882 ac_cv_c_inline=$ac_kw
4883fi
4884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4885 test "$ac_cv_c_inline" != no && break
4886done
4887
4888fi
4889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4890$as_echo "$ac_cv_c_inline" >&6; }
4891
4892case $ac_cv_c_inline in
4893 inline | yes) ;;
4894 *)
4895 case $ac_cv_c_inline in
4896 no) ac_val=;;
4897 *) ac_val=$ac_cv_c_inline;;
4898 esac
4899 cat >>confdefs.h <<_ACEOF
4900#ifndef __cplusplus
4901#define inline $ac_val
4902#endif
4903_ACEOF
4904 ;;
4905esac
4906
4907if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004908
4909$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004910
4911
4912fi
4913
4914
Matthias Kloseb9621712010-04-24 17:59:49 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4916$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004918if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919 enableval=$enable_shared;
4920fi
4921
4922
4923if test -z "$enable_shared"
4924then
4925 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004926 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 enable_shared="yes";;
4928 *)
4929 enable_shared="no";;
4930 esac
4931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4933$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934
Matthias Kloseb9621712010-04-24 17:59:49 +00004935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4936$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004938if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939 enableval=$enable_profiling; ac_save_cc="$CC"
4940 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004941 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942 ac_enable_profiling="no"
4943else
Matthias Kloseb9621712010-04-24 17:59:49 +00004944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945/* end confdefs.h. */
4946int main() { return 0; }
4947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004948if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 ac_enable_profiling="yes"
4950else
Matthias Kloseb9621712010-04-24 17:59:49 +00004951 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955fi
4956
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 CC="$ac_save_cc"
4958fi
4959
Matthias Kloseb9621712010-04-24 17:59:49 +00004960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4961$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962
4963case "$ac_enable_profiling" in
4964 "yes")
4965 BASECFLAGS="-pg $BASECFLAGS"
4966 LDFLAGS="-pg $LDFLAGS"
4967 ;;
4968esac
4969
Matthias Kloseb9621712010-04-24 17:59:49 +00004970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4971$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972
4973# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4974# library that we build, but we do not want to link against it (we
4975# will find it with a -framework option). For this reason there is an
4976# extra variable BLDLIBRARY against which Python and the extension
4977# modules are linked, BLDLIBRARY. This is normally the same as
4978# LDLIBRARY, but empty for MacOSX framework builds.
4979if test "$enable_framework"
4980then
4981 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4982 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4983 BLDLIBRARY=''
4984else
4985 BLDLIBRARY='$(LDLIBRARY)'
4986fi
4987
4988# Other platforms follow
4989if test $enable_shared = "yes"; then
4990
Matthias Kloseb9621712010-04-24 17:59:49 +00004991$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992
4993 case $ac_sys_system in
4994 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004995 LDLIBRARY='libpython$(LDVERSION).dll.a'
4996 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997 ;;
4998 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004999 LDLIBRARY='libpython$(LDVERSION).so'
5000 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005001 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5002 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005003 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005004 then
5005 PY3LIBRARY=libpython3.so
5006 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007 ;;
5008 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005009 LDLIBRARY='libpython$(LDVERSION).so'
5010 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5012 case $ac_sys_system in
5013 FreeBSD*)
5014 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5015 ;;
5016 esac
5017 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005018 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005019 then
5020 PY3LIBRARY=libpython3.so
5021 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022 ;;
5023 hp*|HP*)
5024 case `uname -m` in
5025 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005026 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027 ;;
5028 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005029 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030 ;;
5031 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005032 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5034 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005036 LDLIBRARY='libpython$(LDVERSION).dylib'
5037 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5039 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005040 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005041 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005042 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5043 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044
5045 esac
5046else # shared is disabled
5047 case $ac_sys_system in
5048 CYGWIN*)
5049 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005050 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051 ;;
5052 esac
5053fi
5054
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5056$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057
5058if test -n "$ac_tool_prefix"; then
5059 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5060set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005063if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065else
5066 if test -n "$RANLIB"; then
5067 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5068else
5069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070for as_dir in $PATH
5071do
5072 IFS=$as_save_IFS
5073 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5076 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078 break 2
5079 fi
5080done
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082IFS=$as_save_IFS
5083
5084fi
5085fi
5086RANLIB=$ac_cv_prog_RANLIB
5087if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5089$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090else
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093fi
5094
5095
5096fi
5097if test -z "$ac_cv_prog_RANLIB"; then
5098 ac_ct_RANLIB=$RANLIB
5099 # Extract the first word of "ranlib", so it can be a program name with args.
5100set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5102$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005103if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005105else
5106 if test -n "$ac_ct_RANLIB"; then
5107 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5108else
5109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5110for as_dir in $PATH
5111do
5112 IFS=$as_save_IFS
5113 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005115 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5116 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118 break 2
5119 fi
5120done
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122IFS=$as_save_IFS
5123
5124fi
5125fi
5126ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5127if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5129$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130else
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5132$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133fi
5134
5135 if test "x$ac_ct_RANLIB" = x; then
5136 RANLIB=":"
5137 else
5138 case $cross_compiling:$ac_tool_warned in
5139yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142ac_tool_warned=yes ;;
5143esac
5144 RANLIB=$ac_ct_RANLIB
5145 fi
5146else
5147 RANLIB="$ac_cv_prog_RANLIB"
5148fi
5149
5150
5151for ac_prog in ar aal
5152do
5153 # Extract the first word of "$ac_prog", so it can be a program name with args.
5154set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005157if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005158 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159else
5160 if test -n "$AR"; then
5161 ac_cv_prog_AR="$AR" # Let the user override the test.
5162else
5163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5164for as_dir in $PATH
5165do
5166 IFS=$as_save_IFS
5167 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005168 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5170 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172 break 2
5173 fi
5174done
Matthias Kloseb9621712010-04-24 17:59:49 +00005175 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005176IFS=$as_save_IFS
5177
5178fi
5179fi
5180AR=$ac_cv_prog_AR
5181if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5183$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184else
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5186$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005187fi
5188
5189
5190 test -n "$AR" && break
5191done
5192test -n "$AR" || AR="ar"
5193
5194
5195# tweak ARFLAGS only if the user didn't set it on the command line
5196
5197if test -z "$ARFLAGS"
5198then
5199 ARFLAGS="rc"
5200fi
5201
5202
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005203DISABLE_ASDLGEN=""
5204# Extract the first word of "python", so it can be a program name with args.
5205set dummy python; ac_word=$2
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5207$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005208if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005209 $as_echo_n "(cached) " >&6
5210else
5211 if test -n "$HAS_PYTHON"; then
5212 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5213else
5214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5215for as_dir in $PATH
5216do
5217 IFS=$as_save_IFS
5218 test -z "$as_dir" && as_dir=.
5219 for ac_exec_ext in '' $ac_executable_extensions; do
5220 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5221 ac_cv_prog_HAS_PYTHON="found"
5222 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5223 break 2
5224 fi
5225done
5226 done
5227IFS=$as_save_IFS
5228
5229 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5230fi
5231fi
5232HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5233if test -n "$HAS_PYTHON"; then
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5235$as_echo "$HAS_PYTHON" >&6; }
5236else
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238$as_echo "no" >&6; }
5239fi
5240
5241
5242if test $HAS_HG != found -o $HAS_PYTHON != found
5243then
5244 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5245fi
5246
5247
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005248case $MACHDEP in
5249bsdos*|hp*|HP*)
5250 # install -d does not work on BSDI or HP-UX
5251 if test -z "$INSTALL"
5252 then
5253 INSTALL="${srcdir}/install-sh -c"
5254 fi
5255esac
5256ac_aux_dir=
5257for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005258 if test -f "$ac_dir/install-sh"; then
5259 ac_aux_dir=$ac_dir
5260 ac_install_sh="$ac_aux_dir/install-sh -c"
5261 break
5262 elif test -f "$ac_dir/install.sh"; then
5263 ac_aux_dir=$ac_dir
5264 ac_install_sh="$ac_aux_dir/install.sh -c"
5265 break
5266 elif test -f "$ac_dir/shtool"; then
5267 ac_aux_dir=$ac_dir
5268 ac_install_sh="$ac_aux_dir/shtool install -c"
5269 break
5270 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005271done
5272if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005273 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274fi
5275
5276# These three variables are undocumented and unsupported,
5277# and are intended to be withdrawn in a future Autoconf release.
5278# They can cause serious problems if a builder's source tree is in a directory
5279# whose full name contains unusual characters.
5280ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5281ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5282ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5283
5284
5285# Find a good install program. We prefer a C program (faster),
5286# so one script is as good as another. But avoid the broken or
5287# incompatible versions:
5288# SysV /etc/install, /usr/sbin/install
5289# SunOS /usr/etc/install
5290# IRIX /sbin/install
5291# AIX /bin/install
5292# AmigaOS /C/install, which installs bootblocks on floppy discs
5293# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5294# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5295# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5296# OS/2's system install, which has a completely different semantic
5297# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005298# Reject install programs that cannot install multiple files.
5299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5300$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301if test -z "$INSTALL"; then
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005302if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005303 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304else
5305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5306for as_dir in $PATH
5307do
5308 IFS=$as_save_IFS
5309 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005310 # Account for people who put trailing slashes in PATH elements.
5311case $as_dir/ in #((
5312 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005314 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315 /usr/ucb/* ) ;;
5316 *)
5317 # OSF1 and SCO ODT 3.0 have their own names for install.
5318 # Don't use installbsd from OSF since it installs stuff as root
5319 # by default.
5320 for ac_prog in ginstall scoinst install; do
5321 for ac_exec_ext in '' $ac_executable_extensions; do
5322 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5323 if test $ac_prog = install &&
5324 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5325 # AIX install. It has an incompatible calling convention.
5326 :
5327 elif test $ac_prog = install &&
5328 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5329 # program-specific install script used by HP pwplus--don't use.
5330 :
5331 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005332 rm -rf conftest.one conftest.two conftest.dir
5333 echo one > conftest.one
5334 echo two > conftest.two
5335 mkdir conftest.dir
5336 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5337 test -s conftest.one && test -s conftest.two &&
5338 test -s conftest.dir/conftest.one &&
5339 test -s conftest.dir/conftest.two
5340 then
5341 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5342 break 3
5343 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344 fi
5345 fi
5346 done
5347 done
5348 ;;
5349esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005350
5351 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352IFS=$as_save_IFS
5353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355
5356fi
5357 if test "${ac_cv_path_install+set}" = set; then
5358 INSTALL=$ac_cv_path_install
5359 else
5360 # As a last resort, use the slow shell script. Don't cache a
5361 # value for INSTALL within a source directory, because that will
5362 # break other packages using the cache if that directory is
5363 # removed, or if the value is a relative name.
5364 INSTALL=$ac_install_sh
5365 fi
5366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5368$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369
5370# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5371# It thinks the first close brace ends the variable substitution.
5372test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5373
5374test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5375
5376test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5377
5378
5379# Not every filesystem supports hard links
5380
5381if test -z "$LN" ; then
5382 case $ac_sys_system in
5383 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005384 *) LN=ln;;
5385 esac
5386fi
5387
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005388# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005389
5390ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005391
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5394$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005395
5396# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005397if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398 withval=$with_pydebug;
5399if test "$withval" != no
5400then
5401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5405$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005407 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005408else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5409$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410fi
5411else
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5413$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414fi
5415
5416
5417# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5418# merged with this chunk of code?
5419
5420# Optimizer/debugger flags
5421# ------------------------
5422# (The following bit of code is complicated enough - please keep things
5423# indented properly. Just pretend you're editing Python code. ;-)
5424
5425# There are two parallel sets of case statements below, one that checks to
5426# see if OPT was set and one that does BASECFLAGS setting based upon
5427# compiler and platform. BASECFLAGS tweaks need to be made even if the
5428# user set OPT.
5429
5430# tweak OPT based on compiler and platform, only if the user didn't set
5431# it on the command line
5432
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005433if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434then
5435 case $GCC in
5436 yes)
5437 if test "$CC" != 'g++' ; then
5438 STRICT_PROTO="-Wstrict-prototypes"
5439 fi
5440 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5441 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5442 WRAP="-fwrapv"
5443 fi
5444 case $ac_cv_prog_cc_g in
5445 yes)
5446 if test "$Py_DEBUG" = 'true' ; then
5447 # Optimization messes up debuggers, so turn it off for
5448 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005449 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450 else
5451 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5452 fi
5453 ;;
5454 *)
5455 OPT="-O3 -Wall $STRICT_PROTO"
5456 ;;
5457 esac
5458 case $ac_sys_system in
5459 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5460 ;;
5461 esac
5462 ;;
5463
5464 *)
5465 OPT="-O"
5466 ;;
5467 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468fi
5469
5470
5471
5472# The -arch flags for universal builds on OSX
5473UNIVERSAL_ARCH_FLAGS=
5474
5475
5476# tweak BASECFLAGS based on compiler and platform
5477case $GCC in
5478yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005479 # Python doesn't violate C99 aliasing rules, but older versions of
5480 # GCC produce warnings for legal Python code. Enable
5481 # -fno-strict-aliasing on versions of GCC that support but produce
5482 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5484$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485 ac_save_cc="$CC"
5486 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005487 save_CFLAGS="$CFLAGS"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005488 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005489 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005490else
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005493
Matthias Kloseb159a552010-04-25 21:00:44 +00005494
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005495int
5496main ()
5497{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005498
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005499 ;
5500 return 0;
5501}
Matthias Kloseb159a552010-04-25 21:00:44 +00005502
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005504if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005505
5506 CC="$ac_save_cc -fstrict-aliasing"
5507 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005509/* end confdefs.h. */
5510
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005511 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005512int
5513main ()
5514{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005515double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005516 ;
5517 return 0;
5518}
Matthias Kloseb159a552010-04-25 21:00:44 +00005519
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005521if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005522
5523 ac_cv_no_strict_aliasing=no
5524
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525else
Matthias Kloseb159a552010-04-25 21:00:44 +00005526
5527 ac_cv_no_strict_aliasing=yes
5528
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005529fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005531
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005532else
Matthias Kloseb159a552010-04-25 21:00:44 +00005533
5534 ac_cv_no_strict_aliasing=no
5535
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005538fi
5539
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005540 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5543$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005544 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545 then
5546 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5547 fi
5548
5549 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5550 # support. Without this, treatment of subnormals doesn't follow
5551 # the standard.
5552 case $ac_sys_machine in
5553 alpha*)
5554 BASECFLAGS="$BASECFLAGS -mieee"
5555 ;;
5556 esac
5557
5558 case $ac_sys_system in
5559 SCO_SV*)
5560 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5561 ;;
5562 # is there any other compiler on Darwin besides gcc?
5563 Darwin*)
5564 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5565 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005566 if test "${CC}" = gcc
5567 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5569$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005570 case "${UNIVERSALSDK}" in
5571 */MacOSX10.4u.sdk)
5572 # Build using 10.4 SDK, force usage of gcc when the
5573 # compiler is gcc, otherwise the user will get very
5574 # confusing error messages when building on OSX 10.6
5575 CC=gcc-4.0
5576 CPP=cpp-4.0
5577 ;;
5578 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5580$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005581 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582
5583
5584 if test "${enable_universalsdk}"; then
5585 UNIVERSAL_ARCH_FLAGS=""
5586 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5587 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5588 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005589 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5591 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005592 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005593 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594
5595 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5596 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005597 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005598 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005600 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5601 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005602 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005603 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005604
5605 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5606 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005607 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005608 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005611 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612
5613 fi
5614
5615
Ronald Oussoren666028b2010-04-18 19:07:43 +00005616 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5617 if test "${UNIVERSALSDK}" != "/"
5618 then
5619 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5620 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005621 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 fi
5623 fi
5624
5625 # Calculate the right deployment target for this build.
5626 #
5627 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5628 if test ${cur_target} '>' 10.2; then
5629 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005630 if test ${enable_universalsdk}; then
5631 if test "${UNIVERSAL_ARCHS}" = "all"; then
5632 # Ensure that the default platform for a
5633 # 4-way universal build is OSX 10.5,
5634 # that's the first OS release where
5635 # 4-way builds make sense.
5636 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005637
5638 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5639 cur_target='10.5'
5640
5641 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5642 cur_target='10.5'
5643
5644 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5645 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005646 fi
5647 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005648 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005649 # On Intel macs default to a deployment
5650 # target of 10.4, that's the first OSX
5651 # release with Intel support.
5652 cur_target="10.4"
5653 fi
5654 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 fi
5656 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5657
5658 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5659 # environment with a value that is the same as what we'll use
5660 # in the Makefile to ensure that we'll get the same compiler
5661 # environment during configure and build time.
5662 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5663 export MACOSX_DEPLOYMENT_TARGET
5664 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5665
5666 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 esac
5668 ;;
5669
5670*)
5671 case $ac_sys_system in
5672 OpenUNIX*|UnixWare*)
5673 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5674 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 SCO_SV*)
5676 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5677 ;;
5678 esac
5679 ;;
5680esac
5681
5682if test "$Py_DEBUG" = 'true'; then
5683 :
5684else
5685 OPT="-DNDEBUG $OPT"
5686fi
5687
5688if test "$ac_arch_flags"
5689then
5690 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5691fi
5692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693# Check whether GCC supports PyArg_ParseTuple format
5694if test "$GCC" = "yes"
5695then
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5697$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698 save_CFLAGS=$CFLAGS
5699 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701/* end confdefs.h. */
5702
5703 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704int
5705main ()
5706{
5707
5708 ;
5709 return 0;
5710}
Matthias Kloseb159a552010-04-25 21:00:44 +00005711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005713if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
Matthias Kloseb159a552010-04-25 21:00:44 +00005715
Matthias Kloseb9621712010-04-24 17:59:49 +00005716$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
Matthias Kloseb159a552010-04-25 21:00:44 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005719$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721else
Matthias Kloseb159a552010-04-25 21:00:44 +00005722
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005724$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
5726fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5728 CFLAGS=$save_CFLAGS
5729fi
5730
5731# On some compilers, pthreads are available without further options
5732# (e.g. MacOS X). On some of these systems, the compiler will not
5733# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5734# So we have to see first whether pthreads are available without
5735# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5737$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005738if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740else
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742 ac_cv_pthread_is_default=no
5743else
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745/* end confdefs.h. */
5746
5747#include <pthread.h>
5748
5749void* routine(void* p){return NULL;}
5750
5751int main(){
5752 pthread_t p;
5753 if(pthread_create(&p,NULL,routine,NULL)!=0)
5754 return 1;
5755 (void)pthread_detach(p);
5756 return 0;
5757}
5758
5759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005760if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761
5762 ac_cv_pthread_is_default=yes
5763 ac_cv_kthread=no
5764 ac_cv_pthread=no
5765
5766else
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771fi
5772
5773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774fi
5775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5777$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779
5780if test $ac_cv_pthread_is_default = yes
5781then
5782 ac_cv_kpthread=no
5783else
5784# -Kpthread, if available, provides the right #defines
5785# and linker options to make pthread_create available
5786# Some compilers won't report that they do not support -Kpthread,
5787# so we need to run a program to see whether it really made the
5788# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5790$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005791if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005792 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793else
5794 ac_save_cc="$CC"
5795CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005796if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797 ac_cv_kpthread=no
5798else
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800/* end confdefs.h. */
5801
5802#include <pthread.h>
5803
5804void* routine(void* p){return NULL;}
5805
5806int main(){
5807 pthread_t p;
5808 if(pthread_create(&p,NULL,routine,NULL)!=0)
5809 return 1;
5810 (void)pthread_detach(p);
5811 return 0;
5812}
5813
5814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005815if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 ac_cv_kpthread=yes
5817else
Matthias Kloseb9621712010-04-24 17:59:49 +00005818 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822fi
5823
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824CC="$ac_save_cc"
5825fi
5826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5828$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829fi
5830
5831if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5832then
5833# -Kthread, if available, provides the right #defines
5834# and linker options to make pthread_create available
5835# Some compilers won't report that they do not support -Kthread,
5836# so we need to run a program to see whether it really made the
5837# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5839$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005840if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005841 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842else
5843 ac_save_cc="$CC"
5844CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005845if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 ac_cv_kthread=no
5847else
Matthias Kloseb9621712010-04-24 17:59:49 +00005848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849/* end confdefs.h. */
5850
5851#include <pthread.h>
5852
5853void* routine(void* p){return NULL;}
5854
5855int main(){
5856 pthread_t p;
5857 if(pthread_create(&p,NULL,routine,NULL)!=0)
5858 return 1;
5859 (void)pthread_detach(p);
5860 return 0;
5861}
5862
5863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 ac_cv_kthread=yes
5866else
Matthias Kloseb9621712010-04-24 17:59:49 +00005867 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
5872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873CC="$ac_save_cc"
5874fi
5875
Matthias Kloseb9621712010-04-24 17:59:49 +00005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5877$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878fi
5879
5880if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5881then
5882# -pthread, if available, provides the right #defines
5883# and linker options to make pthread_create available
5884# Some compilers won't report that they do not support -pthread,
5885# so we need to run a program to see whether it really made the
5886# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5888$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005889if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005890 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891else
5892 ac_save_cc="$CC"
5893CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005894if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 ac_cv_pthread=no
5896else
Matthias Kloseb9621712010-04-24 17:59:49 +00005897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898/* end confdefs.h. */
5899
5900#include <pthread.h>
5901
5902void* routine(void* p){return NULL;}
5903
5904int main(){
5905 pthread_t p;
5906 if(pthread_create(&p,NULL,routine,NULL)!=0)
5907 return 1;
5908 (void)pthread_detach(p);
5909 return 0;
5910}
5911
5912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005913if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ac_cv_pthread=yes
5915else
Matthias Kloseb9621712010-04-24 17:59:49 +00005916 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920fi
5921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922CC="$ac_save_cc"
5923fi
5924
Matthias Kloseb9621712010-04-24 17:59:49 +00005925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5926$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927fi
5928
5929# If we have set a CC compiler flag for thread support then
5930# check if it works for CXX, too.
5931ac_cv_cxx_thread=no
5932if test ! -z "$CXX"
5933then
Matthias Kloseb9621712010-04-24 17:59:49 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5935$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936ac_save_cxx="$CXX"
5937
5938if test "$ac_cv_kpthread" = "yes"
5939then
5940 CXX="$CXX -Kpthread"
5941 ac_cv_cxx_thread=yes
5942elif test "$ac_cv_kthread" = "yes"
5943then
5944 CXX="$CXX -Kthread"
5945 ac_cv_cxx_thread=yes
5946elif test "$ac_cv_pthread" = "yes"
5947then
5948 CXX="$CXX -pthread"
5949 ac_cv_cxx_thread=yes
5950fi
5951
5952if test $ac_cv_cxx_thread = yes
5953then
5954 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5955 $CXX -c conftest.$ac_ext 2>&5
5956 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5957 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5958 then
5959 ac_cv_cxx_thread=yes
5960 else
5961 ac_cv_cxx_thread=no
5962 fi
5963 rm -fr conftest*
5964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5966$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967fi
5968CXX="$ac_save_cxx"
5969
5970
5971# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5973$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02005974if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976else
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978/* end confdefs.h. */
5979#include <stdlib.h>
5980#include <stdarg.h>
5981#include <string.h>
5982#include <float.h>
5983
5984int
5985main ()
5986{
5987
5988 ;
5989 return 0;
5990}
5991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005992if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ac_cv_header_stdc=yes
5994else
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5998
5999if test $ac_cv_header_stdc = yes; then
6000 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002/* end confdefs.h. */
6003#include <string.h>
6004
6005_ACEOF
6006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 $EGREP "memchr" >/dev/null 2>&1; then :
6008
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009else
6010 ac_cv_header_stdc=no
6011fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006012rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013
6014fi
6015
6016if test $ac_cv_header_stdc = yes; then
6017 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019/* end confdefs.h. */
6020#include <stdlib.h>
6021
6022_ACEOF
6023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 $EGREP "free" >/dev/null 2>&1; then :
6025
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026else
6027 ac_cv_header_stdc=no
6028fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006029rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030
6031fi
6032
6033if test $ac_cv_header_stdc = yes; then
6034 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036 :
6037else
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039/* end confdefs.h. */
6040#include <ctype.h>
6041#include <stdlib.h>
6042#if ((' ' & 0x0FF) == 0x020)
6043# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6044# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6045#else
6046# define ISLOWER(c) \
6047 (('a' <= (c) && (c) <= 'i') \
6048 || ('j' <= (c) && (c) <= 'r') \
6049 || ('s' <= (c) && (c) <= 'z'))
6050# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6051#endif
6052
6053#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6054int
6055main ()
6056{
6057 int i;
6058 for (i = 0; i < 256; i++)
6059 if (XOR (islower (i), ISLOWER (i))
6060 || toupper (i) != TOUPPER (i))
6061 return 2;
6062 return 0;
6063}
6064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006065if ac_fn_c_try_run "$LINENO"; then :
6066
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067else
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6071 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072fi
6073
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074fi
6075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6077$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078if test $ac_cv_header_stdc = yes; then
6079
Matthias Kloseb9621712010-04-24 17:59:49 +00006080$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081
6082fi
6083
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006084for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6085fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006086ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Antoine Pitrou37009202011-07-08 23:47:50 +02006087shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006088unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006089sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6090sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006091sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6092sys/stat.h sys/termio.h sys/time.h \
6093sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006094libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006095bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006096do :
6097 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6098ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006099if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006100 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006101#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006102_ACEOF
6103
6104fi
6105
Guido van Rossum627b2d71993-12-24 10:39:16 +00006106done
6107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006108ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006109for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6112$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006113if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006114 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006115else
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006117/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006118#include <sys/types.h>
6119#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006120
Martin v. Löwis11437992002-04-12 09:54:03 +00006121int
6122main ()
6123{
6124if ((DIR *) 0)
6125return 0;
6126 ;
6127 return 0;
6128}
6129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006131 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006132else
Matthias Kloseb9621712010-04-24 17:59:49 +00006133 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006137eval ac_res=\$$as_ac_Header
6138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6139$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006140if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006141 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006142#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006143_ACEOF
6144
6145ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148done
6149# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6150if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6152$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006153if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006155else
Martin v. Löwis11437992002-04-12 09:54:03 +00006156 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160/* Override any GCC internal prototype to avoid an error.
6161 Use char because int might match the return type of a GCC
6162 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006163#ifdef __cplusplus
6164extern "C"
6165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006166char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006167int
6168main ()
6169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006171 ;
6172 return 0;
6173}
6174_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175for ac_lib in '' dir; do
6176 if test -z "$ac_lib"; then
6177 ac_res="none required"
6178 else
6179 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006180 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006185rm -f core conftest.err conftest.$ac_objext \
6186 conftest$ac_exeext
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006187 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006188 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190done
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006191if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006193else
6194 ac_cv_search_opendir=no
6195fi
6196rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006197LIBS=$ac_func_search_save_LIBS
6198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6200$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006202if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006204
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006205fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006206
Michael W. Hudson54241132001-12-07 15:38:26 +00006207else
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6209$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006210if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006212else
6213 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006217/* Override any GCC internal prototype to avoid an error.
6218 Use char because int might match the return type of a GCC
6219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006220#ifdef __cplusplus
6221extern "C"
6222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006223char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006224int
6225main ()
6226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006227return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006228 ;
6229 return 0;
6230}
6231_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232for ac_lib in '' x; do
6233 if test -z "$ac_lib"; then
6234 ac_res="none required"
6235 else
6236 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006237 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006239 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006242rm -f core conftest.err conftest.$ac_objext \
6243 conftest$ac_exeext
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006244 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006245 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006247done
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006248if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006250else
6251 ac_cv_search_opendir=no
6252fi
6253rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006254LIBS=$ac_func_search_save_LIBS
6255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6257$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006258ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006259if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006261
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006262fi
6263
6264fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006265
Matthias Kloseb9621712010-04-24 17:59:49 +00006266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6267$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006268if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006269 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006270else
Matthias Kloseb9621712010-04-24 17:59:49 +00006271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006272/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274int
6275main ()
6276{
6277return makedev(0, 0);
6278 ;
6279 return 0;
6280}
6281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006282if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283 ac_cv_header_sys_types_h_makedev=yes
6284else
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006287rm -f core conftest.err conftest.$ac_objext \
6288 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289
6290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6292$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006293
6294if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006295ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006296if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006297
Matthias Kloseb9621712010-04-24 17:59:49 +00006298$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299
6300fi
6301
6302
6303
6304 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006305 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006306if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006307
Matthias Kloseb9621712010-04-24 17:59:49 +00006308$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006309
6310fi
6311
6312
6313 fi
6314fi
6315
Michael W. Hudson54241132001-12-07 15:38:26 +00006316
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006317# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6318for ac_header in net/if.h
6319do :
6320 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6321#ifdef STDC_HEADERS
6322# include <stdlib.h>
6323# include <stddef.h>
6324#else
6325# ifdef HAVE_STDLIB_H
6326# include <stdlib.h>
6327# endif
6328#endif
6329#ifdef HAVE_SYS_SOCKET_H
6330# include <sys/socket.h>
6331#endif
6332
6333"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006334if test "x$ac_cv_header_net_if_h" = x""yes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006335 cat >>confdefs.h <<_ACEOF
6336#define HAVE_NET_IF_H 1
6337_ACEOF
6338
6339fi
6340
6341done
6342
6343
6344
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006346for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006347do :
6348 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006349#ifdef HAVE_CURSES_H
6350#include <curses.h>
6351#endif
6352
Matthias Kloseb9621712010-04-24 17:59:49 +00006353"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006354if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006355 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006356#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006357_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006359fi
6360
6361done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362
6363
Martin v. Löwis11017b12006-01-14 18:12:57 +00006364# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006365for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006366do :
6367 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006368#ifdef HAVE_ASM_TYPES_H
6369#include <asm/types.h>
6370#endif
6371#ifdef HAVE_SYS_SOCKET_H
6372#include <sys/socket.h>
6373#endif
6374
Matthias Kloseb9621712010-04-24 17:59:49 +00006375"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006376if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006378#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006379_ACEOF
6380
6381fi
6382
6383done
6384
6385
Guido van Rossum627b2d71993-12-24 10:39:16 +00006386# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006387was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6389$as_echo_n "checking for clock_t in time.h... " >&6; }
6390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006391/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006392#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006393
6394_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006396 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006397 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006398else
Martin v. Löwis11437992002-04-12 09:54:03 +00006399
6400
Matthias Kloseb9621712010-04-24 17:59:49 +00006401$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006402
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006403
Guido van Rossum627b2d71993-12-24 10:39:16 +00006404fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006405rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006406
Matthias Kloseb9621712010-04-24 17:59:49 +00006407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6408$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6411$as_echo_n "checking for makedev... " >&6; }
6412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006413/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006414
Jesus Cea740f53a2010-04-28 11:35:30 +00006415#if defined(MAJOR_IN_MKDEV)
6416#include <sys/mkdev.h>
6417#elif defined(MAJOR_IN_SYSMACROS)
6418#include <sys/sysmacros.h>
6419#else
6420#include <sys/types.h>
6421#endif
6422
Neal Norwitz11690112002-07-30 01:08:28 +00006423int
6424main ()
6425{
Jesus Cea740f53a2010-04-28 11:35:30 +00006426
6427 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006428 ;
6429 return 0;
6430}
Matthias Kloseb159a552010-04-25 21:00:44 +00006431
Neal Norwitz11690112002-07-30 01:08:28 +00006432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006433if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006434 ac_cv_has_makedev=yes
6435else
Matthias Kloseb9621712010-04-24 17:59:49 +00006436 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006438rm -f core conftest.err conftest.$ac_objext \
6439 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6441$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006442if test "$ac_cv_has_makedev" = "yes"; then
6443
Matthias Kloseb9621712010-04-24 17:59:49 +00006444$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006445
6446fi
6447
Martin v. Löwis399a6892002-10-04 10:22:02 +00006448# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6449# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6450# defined, but the compiler does not support pragma redefine_extname,
6451# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6452# structures (such as rlimit64) without declaring them. As a
6453# work-around, disable LFS on such configurations
6454
6455use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6457$as_echo_n "checking Solaris LFS bug... " >&6; }
6458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006459/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006460
6461#define _LARGEFILE_SOURCE 1
6462#define _FILE_OFFSET_BITS 64
6463#include <sys/resource.h>
6464
Martin v. Löwis399a6892002-10-04 10:22:02 +00006465int
6466main ()
6467{
6468struct rlimit foo;
6469 ;
6470 return 0;
6471}
6472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474 sol_lfs_bug=no
6475else
Matthias Kloseb9621712010-04-24 17:59:49 +00006476 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6480$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006481if test "$sol_lfs_bug" = "yes"; then
6482 use_lfs=no
6483fi
6484
6485if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006486# Two defines needed to enable largefile support on various platforms
6487# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006488case $ac_sys_system/$ac_sys_release in
6489AIX*)
6490
6491$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6492
6493 ;;
6494esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006495
Matthias Kloseb9621712010-04-24 17:59:49 +00006496$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006497
6498
Matthias Kloseb9621712010-04-24 17:59:49 +00006499$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006500
Martin v. Löwis399a6892002-10-04 10:22:02 +00006501fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006502
Guido van Rossum84e7b241996-08-19 21:59:00 +00006503# Add some code to confdefs.h so that the test for off_t works on SCO
6504cat >> confdefs.h <<\EOF
6505#if defined(SCO_DS)
6506#undef _OFF_T
6507#endif
6508EOF
6509
Guido van Rossumef2255b2000-03-10 22:30:29 +00006510# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006511ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006512if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006513
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006514else
Martin v. Löwis11437992002-04-12 09:54:03 +00006515
6516cat >>confdefs.h <<_ACEOF
6517#define mode_t int
6518_ACEOF
6519
6520fi
6521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006523if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525else
Martin v. Löwis11437992002-04-12 09:54:03 +00006526
6527cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006528#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006529_ACEOF
6530
6531fi
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006534if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006536else
Martin v. Löwis11437992002-04-12 09:54:03 +00006537
6538cat >>confdefs.h <<_ACEOF
6539#define pid_t int
6540_ACEOF
6541
6542fi
6543
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006544
Martin v. Löwis11437992002-04-12 09:54:03 +00006545cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006546#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006548
Matthias Kloseb9621712010-04-24 17:59:49 +00006549ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006550if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006552else
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
6554cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006556_ACEOF
6557
6558fi
6559
Matthias Kloseb9621712010-04-24 17:59:49 +00006560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6561$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006562if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006563 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006564else
Matthias Kloseb9621712010-04-24 17:59:49 +00006565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006566/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006568
6569_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006572 ac_cv_type_uid_t=yes
6573else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006574 ac_cv_type_uid_t=no
6575fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006576rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006577
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6580$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006581if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006582
Matthias Kloseb9621712010-04-24 17:59:49 +00006583$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006584
6585
Matthias Kloseb9621712010-04-24 17:59:49 +00006586$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006587
6588fi
6589
Matthias Kloseb9621712010-04-24 17:59:49 +00006590ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6591case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006592 no|yes) ;; #(
6593 *)
6594
Matthias Kloseb9621712010-04-24 17:59:49 +00006595$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006596
6597
6598cat >>confdefs.h <<_ACEOF
6599#define uint32_t $ac_cv_c_uint32_t
6600_ACEOF
6601;;
6602 esac
6603
Matthias Kloseb9621712010-04-24 17:59:49 +00006604ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6605case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006606 no|yes) ;; #(
6607 *)
6608
Matthias Kloseb9621712010-04-24 17:59:49 +00006609$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006610
6611
6612cat >>confdefs.h <<_ACEOF
6613#define uint64_t $ac_cv_c_uint64_t
6614_ACEOF
6615;;
6616 esac
6617
Matthias Kloseb9621712010-04-24 17:59:49 +00006618ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6619case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006620 no|yes) ;; #(
6621 *)
6622
6623cat >>confdefs.h <<_ACEOF
6624#define int32_t $ac_cv_c_int32_t
6625_ACEOF
6626;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006627esac
6628
Matthias Kloseb9621712010-04-24 17:59:49 +00006629ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6630case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006631 no|yes) ;; #(
6632 *)
6633
6634cat >>confdefs.h <<_ACEOF
6635#define int64_t $ac_cv_c_int64_t
6636_ACEOF
6637;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006638esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006639
Matthias Kloseb9621712010-04-24 17:59:49 +00006640ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006641if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006642
Matthias Kloseb9621712010-04-24 17:59:49 +00006643$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006644
6645fi
6646
Jack Jansendd19cf82001-12-06 22:36:17 +00006647
Michael W. Hudson54241132001-12-07 15:38:26 +00006648# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006649# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650# The cast to long int works around a bug in the HP C Compiler
6651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6653# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6655$as_echo_n "checking size of int... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006656if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006658else
Matthias Kloseb9621712010-04-24 17:59:49 +00006659 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006660
Martin v. Löwis11437992002-04-12 09:54:03 +00006661else
Matthias Kloseb9621712010-04-24 17:59:49 +00006662 if test "$ac_cv_type_int" = yes; then
6663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006665as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006666See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667 else
6668 ac_cv_sizeof_int=0
6669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6674$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675
6676
6677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006679#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006680_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006681
6682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683# The cast to long int works around a bug in the HP C Compiler
6684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6686# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6688$as_echo_n "checking size of long... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006689if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006691else
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694else
Matthias Kloseb9621712010-04-24 17:59:49 +00006695 if test "$ac_cv_type_long" = yes; then
6696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006698as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006699See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700 else
6701 ac_cv_sizeof_long=0
6702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6707$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006708
6709
6710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006712#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006713_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006714
6715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006716# The cast to long int works around a bug in the HP C Compiler
6717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6719# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6721$as_echo_n "checking size of void *... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006722if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006724else
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 if test "$ac_cv_type_void_p" = yes; then
6729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006731as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006732See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733 else
6734 ac_cv_sizeof_void_p=0
6735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6740$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006741
6742
6743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006745#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006746_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006747
6748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006749# The cast to long int works around a bug in the HP C Compiler
6750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6752# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6754$as_echo_n "checking size of short... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006755if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006756 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006757else
Matthias Kloseb9621712010-04-24 17:59:49 +00006758 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006759
Martin v. Löwis11437992002-04-12 09:54:03 +00006760else
Matthias Kloseb9621712010-04-24 17:59:49 +00006761 if test "$ac_cv_type_short" = yes; then
6762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006764as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006765See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766 else
6767 ac_cv_sizeof_short=0
6768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6773$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774
6775
6776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006778#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006779_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006780
6781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782# The cast to long int works around a bug in the HP C Compiler
6783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6785# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6787$as_echo_n "checking size of float... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006788if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793else
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 if test "$ac_cv_type_float" = yes; then
6795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006797as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006798See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799 else
6800 ac_cv_sizeof_float=0
6801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006803
Martin v. Löwis11437992002-04-12 09:54:03 +00006804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6806$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807
6808
6809
Martin v. Löwis11437992002-04-12 09:54:03 +00006810cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006812_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006813
6814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815# The cast to long int works around a bug in the HP C Compiler
6816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6818# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6820$as_echo_n "checking size of double... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006821if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006823else
Matthias Kloseb9621712010-04-24 17:59:49 +00006824 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006825
Martin v. Löwis11437992002-04-12 09:54:03 +00006826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 if test "$ac_cv_type_double" = yes; then
6828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006830as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006831See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006832 else
6833 ac_cv_sizeof_double=0
6834 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006836
Martin v. Löwis11437992002-04-12 09:54:03 +00006837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6839$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006840
6841
6842
Martin v. Löwis11437992002-04-12 09:54:03 +00006843cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006844#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006845_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006846
6847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006848# The cast to long int works around a bug in the HP C Compiler
6849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6851# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6853$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006854if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006855 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006856else
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006858
Martin v. Löwis11437992002-04-12 09:54:03 +00006859else
Matthias Kloseb9621712010-04-24 17:59:49 +00006860 if test "$ac_cv_type_fpos_t" = yes; then
6861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006863as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006864See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006865 else
6866 ac_cv_sizeof_fpos_t=0
6867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006869
Martin v. Löwis11437992002-04-12 09:54:03 +00006870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6872$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873
6874
6875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006877#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006878_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006879
Michael W. Hudson54241132001-12-07 15:38:26 +00006880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006881# The cast to long int works around a bug in the HP C Compiler
6882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6884# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6886$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006887if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006889else
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00006891
Martin v. Löwis18e16552006-02-15 17:27:45 +00006892else
Matthias Kloseb9621712010-04-24 17:59:49 +00006893 if test "$ac_cv_type_size_t" = yes; then
6894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006896as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006897See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006898 else
6899 ac_cv_sizeof_size_t=0
6900 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006902
Martin v. Löwis18e16552006-02-15 17:27:45 +00006903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6905$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906
6907
6908
Martin v. Löwis18e16552006-02-15 17:27:45 +00006909cat >>confdefs.h <<_ACEOF
6910#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6911_ACEOF
6912
6913
Christian Heimes400adb02008-02-01 08:12:03 +00006914# The cast to long int works around a bug in the HP C Compiler
6915# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6916# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6917# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6919$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006920if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006921 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006922else
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006924
Christian Heimes400adb02008-02-01 08:12:03 +00006925else
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 if test "$ac_cv_type_pid_t" = yes; then
6927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006929as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006930See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006931 else
6932 ac_cv_sizeof_pid_t=0
6933 fi
6934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006935
Christian Heimes400adb02008-02-01 08:12:03 +00006936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6938$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006939
6940
6941
6942cat >>confdefs.h <<_ACEOF
6943#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6944_ACEOF
6945
6946
Michael W. Hudson54241132001-12-07 15:38:26 +00006947
Matthias Kloseb9621712010-04-24 17:59:49 +00006948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6949$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006950have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006952/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006953
Martin v. Löwis11437992002-04-12 09:54:03 +00006954int
6955main ()
6956{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006957long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 ;
6959 return 0;
6960}
6961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006963
6964
Matthias Kloseb9621712010-04-24 17:59:49 +00006965$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006966
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006967 have_long_long=yes
6968
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6972$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006973if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006974# The cast to long int works around a bug in the HP C Compiler
6975# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6976# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6977# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6979$as_echo_n "checking size of long long... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006980if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006982else
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006984
Martin v. Löwis11437992002-04-12 09:54:03 +00006985else
Matthias Kloseb9621712010-04-24 17:59:49 +00006986 if test "$ac_cv_type_long_long" = yes; then
6987 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006989as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02006990See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006991 else
6992 ac_cv_sizeof_long_long=0
6993 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006995
Martin v. Löwis11437992002-04-12 09:54:03 +00006996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6998$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006999
7000
7001
Martin v. Löwis11437992002-04-12 09:54:03 +00007002cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007003#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007004_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007005
Michael W. Hudson54241132001-12-07 15:38:26 +00007006
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007007fi
7008
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7010$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007011have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007013/* end confdefs.h. */
7014
7015int
7016main ()
7017{
7018long double x; x = (long double)0;
7019 ;
7020 return 0;
7021}
7022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007023if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007024
7025
Matthias Kloseb9621712010-04-24 17:59:49 +00007026$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007027
7028 have_long_double=yes
7029
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007030fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7033$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007034if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007035# The cast to long int works around a bug in the HP C Compiler
7036# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7037# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7038# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7040$as_echo_n "checking size of long double... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007041if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007042 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007045
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 if test "$ac_cv_type_long_double" = yes; then
7048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007050as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007051See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007052 else
7053 ac_cv_sizeof_long_double=0
7054 fi
7055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007056
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7059$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007060
7061
7062
7063cat >>confdefs.h <<_ACEOF
7064#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7065_ACEOF
7066
7067
7068fi
7069
7070
Matthias Kloseb9621712010-04-24 17:59:49 +00007071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7072$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007073have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007075/* end confdefs.h. */
7076
7077int
7078main ()
7079{
7080_Bool x; x = (_Bool)0;
7081 ;
7082 return 0;
7083}
7084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007085if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007086
7087
Matthias Kloseb9621712010-04-24 17:59:49 +00007088$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007089
7090 have_c99_bool=yes
7091
Thomas Woutersb2137042007-02-01 18:02:27 +00007092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7095$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007096if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097# The cast to long int works around a bug in the HP C Compiler
7098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7100# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7102$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007103if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007105else
Matthias Kloseb9621712010-04-24 17:59:49 +00007106 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007107
Thomas Woutersb2137042007-02-01 18:02:27 +00007108else
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 if test "$ac_cv_type__Bool" = yes; then
7110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007112as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007113See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114 else
7115 ac_cv_sizeof__Bool=0
7116 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118
Thomas Woutersb2137042007-02-01 18:02:27 +00007119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7121$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007122
7123
7124
Thomas Woutersb2137042007-02-01 18:02:27 +00007125cat >>confdefs.h <<_ACEOF
7126#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7127_ACEOF
7128
7129
7130fi
7131
Matthias Kloseb9621712010-04-24 17:59:49 +00007132ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007133 #include <stdint.h>
7134 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007135 #ifdef HAVE_INTTYPES_H
7136 #include <inttypes.h>
7137 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007138"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007139if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007140
7141cat >>confdefs.h <<_ACEOF
7142#define HAVE_UINTPTR_T 1
7143_ACEOF
7144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007145# The cast to long int works around a bug in the HP C Compiler
7146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7148# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7150$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007151if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007152 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007153else
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007155
Martin v. Löwis11437992002-04-12 09:54:03 +00007156else
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 if test "$ac_cv_type_uintptr_t" = yes; then
7158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007160as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007161See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007162 else
7163 ac_cv_sizeof_uintptr_t=0
7164 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007166
Martin v. Löwis11437992002-04-12 09:54:03 +00007167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7169$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007170
7171
7172
Martin v. Löwis11437992002-04-12 09:54:03 +00007173cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007174#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007175_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007176
Michael W. Hudson54241132001-12-07 15:38:26 +00007177
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007178fi
7179
Thomas Wouters89f507f2006-12-13 04:49:30 +00007180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007181# The cast to long int works around a bug in the HP C Compiler
7182# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7183# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7184# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7186$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007187if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007189else
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007191#ifdef HAVE_SYS_TYPES_H
7192#include <sys/types.h>
7193#endif
7194
Matthias Kloseb9621712010-04-24 17:59:49 +00007195"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197else
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 if test "$ac_cv_type_off_t" = yes; then
7199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007201as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007202See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203 else
7204 ac_cv_sizeof_off_t=0
7205 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007207
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7210$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007211
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212
7213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007215#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007216_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007217
Michael W. Hudson54241132001-12-07 15:38:26 +00007218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219
Matthias Kloseb9621712010-04-24 17:59:49 +00007220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7221$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007222if test "$have_long_long" = yes
7223then
7224if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007225 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007226
Matthias Kloseb9621712010-04-24 17:59:49 +00007227$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007228
Matthias Kloseb9621712010-04-24 17:59:49 +00007229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7230$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007231else
Matthias Kloseb9621712010-04-24 17:59:49 +00007232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7233$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007234fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7237$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007238fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007239
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007240# The cast to long int works around a bug in the HP C Compiler
7241# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7242# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7243# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7245$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007246if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248else
Matthias Kloseb9621712010-04-24 17:59:49 +00007249 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250#ifdef HAVE_SYS_TYPES_H
7251#include <sys/types.h>
7252#endif
7253#ifdef HAVE_TIME_H
7254#include <time.h>
7255#endif
7256
Matthias Kloseb9621712010-04-24 17:59:49 +00007257"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259else
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 if test "$ac_cv_type_time_t" = yes; then
7261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007263as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007264See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265 else
7266 ac_cv_sizeof_time_t=0
7267 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007269
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7272$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007273
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274
7275
Martin v. Löwis11437992002-04-12 09:54:03 +00007276cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007277#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007278_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007279
Michael W. Hudson54241132001-12-07 15:38:26 +00007280
7281
Trent Mick635f6fb2000-08-23 21:33:05 +00007282# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007283ac_save_cc="$CC"
7284if test "$ac_cv_kpthread" = "yes"
7285then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007286elif test "$ac_cv_kthread" = "yes"
7287then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007288elif test "$ac_cv_pthread" = "yes"
7289then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007290fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007291
Matthias Kloseb9621712010-04-24 17:59:49 +00007292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7293$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007294have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007296/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007297
7298 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007299int
7300main ()
7301{
Guido van Rossum12580492000-09-24 16:47:19 +00007302pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007303 ;
7304 return 0;
7305}
Matthias Kloseb159a552010-04-25 21:00:44 +00007306
Martin v. Löwis11437992002-04-12 09:54:03 +00007307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007308if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007309 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7313$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007314if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7318# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7320$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007321if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007322 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007323else
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007325#ifdef HAVE_PTHREAD_H
7326#include <pthread.h>
7327#endif
7328
Matthias Kloseb9621712010-04-24 17:59:49 +00007329"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 if test "$ac_cv_type_pthread_t" = yes; then
7333 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007335as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007336See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007337 else
7338 ac_cv_sizeof_pthread_t=0
7339 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007341
Trent Mick635f6fb2000-08-23 21:33:05 +00007342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7344$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007345
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007346
7347
Martin v. Löwis11437992002-04-12 09:54:03 +00007348cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007349#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007350_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007351
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007352
Trent Mick635f6fb2000-08-23 21:33:05 +00007353fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007354CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007355
Michael W. Hudson54241132001-12-07 15:38:26 +00007356
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007357case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007358 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007359 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7360 ;;
7361 Darwin/*)
7362 OTHER_LIBTOOL_OPT=""
7363 ;;
7364esac
7365
7366
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007367ARCH_RUN_32BIT=""
7368
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007369case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007370 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007371 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7372 if test "${enable_universalsdk}"; then
7373 :
7374 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007375 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007376 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007377 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007378 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007379 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007380 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007381 if test ${gcc_version} '<' 4.0
7382 then
7383 LIBTOOL_CRUFT="-lcc_dynamic"
7384 else
7385 LIBTOOL_CRUFT=""
7386 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007388 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007389else
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007391/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007392
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007393 #include <unistd.h>
7394 int main(int argc, char*argv[])
7395 {
7396 if (sizeof(long) == 4) {
7397 return 0;
7398 } else {
7399 return 1;
7400 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007401 }
7402
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007404if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007405 ac_osx_32bit=yes
7406else
Matthias Kloseb9621712010-04-24 17:59:49 +00007407 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7410 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007411fi
7412
7413
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007414 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007415 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007416 i386)
7417 MACOSX_DEFAULT_ARCH="i386"
7418 ;;
7419 ppc)
7420 MACOSX_DEFAULT_ARCH="ppc"
7421 ;;
7422 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007423 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007424 ;;
7425 esac
7426 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007427 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007428 i386)
7429 MACOSX_DEFAULT_ARCH="x86_64"
7430 ;;
7431 ppc)
7432 MACOSX_DEFAULT_ARCH="ppc64"
7433 ;;
7434 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007435 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007436 ;;
7437 esac
7438
7439 #ARCH_RUN_32BIT="true"
7440 fi
7441
7442 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007443 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007444 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007445esac
7446
Matthias Kloseb9621712010-04-24 17:59:49 +00007447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7448$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007449if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007450then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007451 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007452 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007453 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7458$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007459 if test $enable_shared = "yes"
7460 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007461 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007462 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007463else
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007466fi
7467
Matthias Kloseb9621712010-04-24 17:59:49 +00007468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7469$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007470case $ac_sys_system/$ac_sys_release in
7471 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007472
Matthias Kloseb9621712010-04-24 17:59:49 +00007473$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7476$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007477 ;;
7478 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7480$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007481 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007482esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007483
Guido van Rossum0a516c91994-09-12 10:58:40 +00007484# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007485
Michael W. Hudson54241132001-12-07 15:38:26 +00007486
7487
7488
7489
Benjamin Peterson99f03762010-04-11 22:15:28 +00007490
Thomas Wouters477c8d52006-05-27 19:21:47 +00007491
Georg Brandlb1441c72009-01-03 22:33:39 +00007492
Thomas Wouters477c8d52006-05-27 19:21:47 +00007493cat >>confdefs.h <<_ACEOF
7494#define SHLIB_EXT "$SO"
7495_ACEOF
7496
Guido van Rossum0a516c91994-09-12 10:58:40 +00007497# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007498# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007499# (Shared libraries in this instance are shared modules to be loaded into
7500# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7502$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007503if test -z "$LDSHARED"
7504then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007505 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007506 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007507 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007508 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007509 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007510 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007511 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007512 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007513 if test "$GCC" = "yes" ; then
7514 LDSHARED='$(CC) -shared'
7515 LDCXXSHARED='$(CXX) -shared'
7516 else
7517 LDSHARED='$(CC) -G'
7518 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007519 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007520 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007521 if test "$GCC" = "yes" ; then
7522 LDSHARED='$(CC) -shared'
7523 LDCXXSHARED='$(CXX) -shared'
7524 else
7525 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007526 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007527 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007528 LDSHARED='$(CC) -bundle'
7529 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007530 if test "$enable_framework" ; then
7531 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007532 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7533 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007534 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007535 else
7536 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007537 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007538 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007539 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007540 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007541 LDSHARED='$(CC) -bundle'
7542 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007543 if test "$enable_framework" ; then
7544 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007545 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7546 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007548 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007549 # No framework, use the Python app as bundle-loader
7550 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007551 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007552 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007553 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007554 Darwin/*)
7555 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7556 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007557
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007558 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007559 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007560 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007561 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007562 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007563 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7564 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007565 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007566 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007567 LDSHARED='$(CC) -bundle'
7568 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007569 if test "$enable_framework" ; then
7570 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007571 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7572 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007573 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007574 else
7575 # No framework, use the Python app as bundle-loader
7576 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7577 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007578 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007579 fi
7580 fi
7581 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007582 Linux*|GNU*|QNX*)
7583 LDSHARED='$(CC) -shared'
7584 LDCXXSHARED='$(CXX) -shared';;
7585 BSD/OS*/4*)
7586 LDSHARED="gcc -shared"
7587 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007588 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007589 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007590 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007591 LDSHARED='$(CC) -shared'
7592 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007593 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007594 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007595 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007596 OpenBSD*)
7597 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7598 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007599 LDSHARED='$(CC) -shared $(CCSHARED)'
7600 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007601 else
7602 case `uname -r` in
7603 [01].* | 2.[0-7] | 2.[0-7].*)
7604 LDSHARED="ld -Bshareable ${LDFLAGS}"
7605 ;;
7606 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007607 LDSHARED='$(CC) -shared $(CCSHARED)'
7608 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007609 ;;
7610 esac
7611 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007612 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007613 LDSHARED='$(CC) -shared'
7614 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007615 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007616 if test "$GCC" = "yes" ; then
7617 LDSHARED='$(CC) -shared'
7618 LDCXXSHARED='$(CXX) -shared'
7619 else
7620 LDSHARED='$(CC) -G'
7621 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007622 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007623 SCO_SV*)
7624 LDSHARED='$(CC) -Wl,-G,-Bexport'
7625 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7626 CYGWIN*)
7627 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7628 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007629 *) LDSHARED="ld";;
7630 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7633$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007634LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007635BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007636# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007637# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7639$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640if test -z "$CCSHARED"
7641then
Guido van Rossum07397971997-04-29 21:49:50 +00007642 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007643 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007644 then CCSHARED="-fPIC";
7645 elif test `uname -p` = sparc;
7646 then CCSHARED="-xcode=pic32";
7647 else CCSHARED="-Kpic";
7648 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007649 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007650 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007651 else CCSHARED="+z";
7652 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007653 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007654 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007655 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007656 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007657 if test "$GCC" = "yes"
7658 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007659 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007660 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007661 SCO_SV*)
7662 if test "$GCC" = "yes"
7663 then CCSHARED="-fPIC"
7664 else CCSHARED="-Kpic -belf"
7665 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007666 IRIX*/6*) case $CC in
7667 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007668 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007669 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007670 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7673$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007674# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007675# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7677$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007678if test -z "$LINKFORSHARED"
7679then
Guido van Rossum07397971997-04-29 21:49:50 +00007680 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007681 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007682 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007683 LINKFORSHARED="-Wl,-E -Wl,+s";;
7684# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007685 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007686 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007687 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007688 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007689 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007690 if test "$enable_framework"
7691 then
Jack Jansenda49e192005-01-07 13:08:22 +00007692 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007693 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007694 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007695 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007696 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007697 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007698 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007699 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7700 then
7701 LINKFORSHARED="-Wl,--export-dynamic"
7702 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007703 SunOS/5*) case $CC in
7704 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007705 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007706 then
7707 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007708 fi;;
7709 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007710 CYGWIN*)
7711 if test $enable_shared = "no"
7712 then
7713 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7714 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007715 QNX*)
7716 # -Wl,-E causes the symbols to be added to the dynamic
7717 # symbol table so that they can be found when a module
7718 # is loaded. -N 2048K causes the stack size to be set
7719 # to 2048 kilobytes so that the stack doesn't overflow
7720 # when running test_compile.py.
7721 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007722 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7725$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007726
Michael W. Hudson54241132001-12-07 15:38:26 +00007727
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007728
Matthias Kloseb9621712010-04-24 17:59:49 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7730$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007731if test ! "$LIBRARY" = "$LDLIBRARY"
7732then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007733 case $ac_sys_system in
7734 CYGWIN*)
7735 # Cygwin needs CCSHARED when building extension DLLs
7736 # but not when building the interpreter DLL.
7737 CFLAGSFORSHARED='';;
7738 *)
7739 CFLAGSFORSHARED='$(CCSHARED)'
7740 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7743$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007744
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007745# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7746# library (with --enable-shared).
7747# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007748# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7749# if it is not required, since it creates a dependency of the shared library
7750# to LIBS. This, in turn, means that applications linking the shared libpython
7751# don't need to link LIBS explicitly. The default should be only changed
7752# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007753
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7755$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007756case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007757 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007758 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007759esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7761$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007762
7763
Guido van Rossum627b2d71993-12-24 10:39:16 +00007764# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7766$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007767if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007768 $as_echo_n "(cached) " >&6
7769else
7770 ac_check_lib_save_LIBS=$LIBS
7771LIBS="-lsendfile $LIBS"
7772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7773/* end confdefs.h. */
7774
7775/* Override any GCC internal prototype to avoid an error.
7776 Use char because int might match the return type of a GCC
7777 builtin and then its argument prototype would still apply. */
7778#ifdef __cplusplus
7779extern "C"
7780#endif
7781char sendfile ();
7782int
7783main ()
7784{
7785return sendfile ();
7786 ;
7787 return 0;
7788}
7789_ACEOF
7790if ac_fn_c_try_link "$LINENO"; then :
7791 ac_cv_lib_sendfile_sendfile=yes
7792else
7793 ac_cv_lib_sendfile_sendfile=no
7794fi
7795rm -f core conftest.err conftest.$ac_objext \
7796 conftest$ac_exeext conftest.$ac_ext
7797LIBS=$ac_check_lib_save_LIBS
7798fi
7799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7800$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007801if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007802 cat >>confdefs.h <<_ACEOF
7803#define HAVE_LIBSENDFILE 1
7804_ACEOF
7805
7806 LIBS="-lsendfile $LIBS"
7807
7808fi
7809
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7811$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007812if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007814else
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007816LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820/* Override any GCC internal prototype to avoid an error.
7821 Use char because int might match the return type of a GCC
7822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007823#ifdef __cplusplus
7824extern "C"
7825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007826char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007827int
7828main ()
7829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 ;
7832 return 0;
7833}
7834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007835if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007836 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007837else
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007840rm -f core conftest.err conftest.$ac_objext \
7841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007842LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7845$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007846if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 cat >>confdefs.h <<_ACEOF
7848#define HAVE_LIBDL 1
7849_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007850
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007851 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007852
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007853fi
7854 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7856$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007857if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859else
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007861LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865/* Override any GCC internal prototype to avoid an error.
7866 Use char because int might match the return type of a GCC
7867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007868#ifdef __cplusplus
7869extern "C"
7870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007871char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007872int
7873main ()
7874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 ;
7877 return 0;
7878}
7879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007882else
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007885rm -f core conftest.err conftest.$ac_objext \
7886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007887LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7890$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007891if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 cat >>confdefs.h <<_ACEOF
7893#define HAVE_LIBDLD 1
7894_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007895
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007896 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007897
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007898fi
7899 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007900
Georg Brandlb1441c72009-01-03 22:33:39 +00007901# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007902if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7904$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007905if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007907else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007908 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912/* Override any GCC internal prototype to avoid an error.
7913 Use char because int might match the return type of a GCC
7914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007915#ifdef __cplusplus
7916extern "C"
7917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007918char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007919int
7920main ()
7921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 ;
7924 return 0;
7925}
7926_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927for ac_lib in '' pthread rt posix4; do
7928 if test -z "$ac_lib"; then
7929 ac_res="none required"
7930 else
7931 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007932 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937rm -f core conftest.err conftest.$ac_objext \
7938 conftest$ac_exeext
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007939 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942done
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007943if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945else
7946 ac_cv_search_sem_init=no
7947fi
7948rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007949LIBS=$ac_func_search_save_LIBS
7950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7952$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007954if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007956
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007957fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007958 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007959 # posix4 on Solaris 2.6
7960 # pthread (first!) on Linux
7961fi
7962
Martin v. Löwis19d17342003-06-14 21:03:05 +00007963# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7965$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02007966if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007967 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007968else
7969 ac_check_lib_save_LIBS=$LIBS
7970LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974/* Override any GCC internal prototype to avoid an error.
7975 Use char because int might match the return type of a GCC
7976 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007977#ifdef __cplusplus
7978extern "C"
7979#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007980char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007981int
7982main ()
7983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007985 ;
7986 return 0;
7987}
7988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007990 ac_cv_lib_intl_textdomain=yes
7991else
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994rm -f core conftest.err conftest.$ac_objext \
7995 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007996LIBS=$ac_check_lib_save_LIBS
7997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7999$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008000if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008001
Matthias Kloseb9621712010-04-24 17:59:49 +00008002$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008003
Brett Cannonc6d936e2009-06-07 20:09:53 +00008004 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005fi
8006
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008007
8008# checks for system dependent C++ extensions support
8009case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8011$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008014
Georg Brandl59e87bd2011-02-15 19:48:59 +00008015 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008016int
8017main ()
8018{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008019loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ;
8021 return 0;
8022}
Matthias Kloseb159a552010-04-25 21:00:44 +00008023
Martin v. Löwis11437992002-04-12 09:54:03 +00008024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008025if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008026
Matthias Kloseb159a552010-04-25 21:00:44 +00008027
Matthias Kloseb9621712010-04-24 17:59:49 +00008028$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008029
Matthias Kloseb159a552010-04-25 21:00:44 +00008030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008031$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008032
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008033else
Matthias Kloseb159a552010-04-25 21:00:44 +00008034
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008036$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008037
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008039rm -f core conftest.err conftest.$ac_objext \
8040 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008041 *) ;;
8042esac
8043
Guido van Rossum70c7f481998-03-26 18:44:10 +00008044# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8046$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008047if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008049else
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008051LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055/* Override any GCC internal prototype to avoid an error.
8056 Use char because int might match the return type of a GCC
8057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008058#ifdef __cplusplus
8059extern "C"
8060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008061char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008062int
8063main ()
8064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 ;
8067 return 0;
8068}
8069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008070if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008075rm -f core conftest.err conftest.$ac_objext \
8076 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008077LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8080$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008081if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008082 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008084 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8086$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008087if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008089else
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008091LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095/* Override any GCC internal prototype to avoid an error.
8096 Use char because int might match the return type of a GCC
8097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008098#ifdef __cplusplus
8099extern "C"
8100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008101char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008102int
8103main ()
8104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 ;
8107 return 0;
8108}
8109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008112else
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115rm -f core conftest.err conftest.$ac_objext \
8116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008117LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8120$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008121if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008122 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008123fi
8124 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8127$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008130if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8133$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008134LIBS="$withval $LIBS"
8135
8136else
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8138$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139fi
8140
Guido van Rossum7f43da71994-08-01 12:15:30 +00008141
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008142if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8144set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8146$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008147if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008149else
8150 case $PKG_CONFIG in
8151 [\\/]* | ?:[\\/]*)
8152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8153 ;;
8154 *)
8155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8156for as_dir in $PATH
8157do
8158 IFS=$as_save_IFS
8159 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008161 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8162 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008164 break 2
8165 fi
8166done
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008168IFS=$as_save_IFS
8169
8170 ;;
8171esac
8172fi
8173PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8174if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8176$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008177else
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8179$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008180fi
8181
8182
8183fi
8184if test -z "$ac_cv_path_PKG_CONFIG"; then
8185 ac_pt_PKG_CONFIG=$PKG_CONFIG
8186 # Extract the first word of "pkg-config", so it can be a program name with args.
8187set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8189$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008190if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008191 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008192else
8193 case $ac_pt_PKG_CONFIG in
8194 [\\/]* | ?:[\\/]*)
8195 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8196 ;;
8197 *)
8198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8199for as_dir in $PATH
8200do
8201 IFS=$as_save_IFS
8202 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008203 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8205 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008207 break 2
8208 fi
8209done
Matthias Kloseb9621712010-04-24 17:59:49 +00008210 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008211IFS=$as_save_IFS
8212
8213 ;;
8214esac
8215fi
8216ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8217if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8219$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008220else
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8222$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008223fi
8224
8225 if test "x$ac_pt_PKG_CONFIG" = x; then
8226 PKG_CONFIG=""
8227 else
8228 case $cross_compiling:$ac_tool_warned in
8229yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8231$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008232ac_tool_warned=yes ;;
8233esac
8234 PKG_CONFIG=$ac_pt_PKG_CONFIG
8235 fi
8236else
8237 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8238fi
8239
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008240
8241# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8243$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008244
8245# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008246if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008247 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008248else
8249 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008250fi
8251
8252
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8254$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008255
8256# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8258$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008259
8260# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008262 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008263else
8264 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008265fi
8266
8267
8268if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008269 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8270else
8271 LIBFFI_INCLUDEDIR=""
8272fi
8273
8274
Matthias Kloseb9621712010-04-24 17:59:49 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8276$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008277
Benjamin Peterson076ed002010-10-31 17:11:02 +00008278# Check for support for loadable sqlite extensions
8279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8280$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8281# Check whether --enable-loadable-sqlite-extensions was given.
8282if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8283 enableval=$enable_loadable_sqlite_extensions;
8284else
8285 enable_loadable_sqlite_extensions="no"
8286fi
8287
8288
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8290$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8291
Matthias Klose55708cc2009-04-30 08:06:49 +00008292# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8294$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008295
8296# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008297if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008298 withval=$with_dbmliborder;
8299if test x$with_dbmliborder = xyes
8300then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008301as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008302else
8303 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8304 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8305 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008306 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008307 fi
8308 done
8309fi
8310fi
8311
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8313$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008314
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008315# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008316
8317
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8319$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008321# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008322if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008323 withval=$with_signal_module;
8324fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008325
8326
8327if test -z "$with_signal_module"
8328then with_signal_module="yes"
8329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8331$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008332
8333if test "${with_signal_module}" = "yes"; then
8334 USE_SIGNAL_MODULE=""
8335 SIGNAL_OBJS=""
8336else
8337 USE_SIGNAL_MODULE="#"
8338 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8339fi
8340
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008341# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008342
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008343USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
8347# Templates for things AC_DEFINEd more than once.
8348# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008349
8350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8353$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008354
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008356if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357 withval=$with_threads;
8358fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008359
8360
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008361# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008364if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365 withval=$with_thread; with_threads=$with_thread
8366fi
8367
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008368
8369if test -z "$with_threads"
8370then with_threads="yes"
8371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8373$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008374
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008375
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008376if test "$with_threads" = "no"
8377then
8378 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008379elif test "$ac_cv_pthread_is_default" = yes
8380then
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008382
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008383 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008385
8386 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008387 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008388elif test "$ac_cv_kpthread" = "yes"
8389then
8390 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008391 if test "$ac_cv_cxx_thread" = "yes"; then
8392 CXX="$CXX -Kpthread"
8393 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008395
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008396 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008397 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008398elif test "$ac_cv_kthread" = "yes"
8399then
8400 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008401 if test "$ac_cv_cxx_thread" = "yes"; then
8402 CXX="$CXX -Kthread"
8403 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008405
8406 posix_threads=yes
8407 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008408elif test "$ac_cv_pthread" = "yes"
8409then
8410 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008411 if test "$ac_cv_cxx_thread" = "yes"; then
8412 CXX="$CXX -pthread"
8413 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008415
8416 posix_threads=yes
8417 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008418else
8419 if test ! -z "$with_threads" -a -d "$with_threads"
8420 then LDFLAGS="$LDFLAGS -L$with_threads"
8421 fi
8422 if test ! -z "$withval" -a -d "$withval"
8423 then LDFLAGS="$LDFLAGS -L$withval"
8424 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008425
8426 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008427 # define _POSIX_THREADS in unistd.h. Some apparently don't
8428 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8430$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008432/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008433
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008434#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008435#ifdef _POSIX_THREADS
8436yes
8437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
8439_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008442 unistd_defines_pthreads=yes
8443else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008444 unistd_defines_pthreads=no
8445fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008446rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008447
Matthias Kloseb9621712010-04-24 17:59:49 +00008448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8449$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008450
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008452
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008453 # Just looking for pthread_create in libpthread is not enough:
8454 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8455 # So we really have to include pthread.h, and then link.
8456 _libs=$LIBS
8457 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8459$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008461/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008462#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008463
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008464void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008465int
8466main ()
8467{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008468
8469pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ;
8471 return 0;
8472}
8473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8477$as_echo "yes" >&6; }
8478 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008479
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008480 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008481 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008482else
Martin v. Löwis11437992002-04-12 09:54:03 +00008483
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008484 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008486if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008488
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008489 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008490 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008491else
Guido van Rossumad678af1998-10-02 14:42:15 +00008492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8494$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008495if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008497else
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008499LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503/* Override any GCC internal prototype to avoid an error.
8504 Use char because int might match the return type of a GCC
8505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008506#ifdef __cplusplus
8507extern "C"
8508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008509char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510int
8511main ()
8512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ;
8515 return 0;
8516}
8517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523rm -f core conftest.err conftest.$ac_objext \
8524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008525LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8528$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008529if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008532 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008533 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008534 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008535else
Greg Steinadf63d62000-07-05 10:38:09 +00008536
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8538$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008539if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008541else
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008543LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547/* Override any GCC internal prototype to avoid an error.
8548 Use char because int might match the return type of a GCC
8549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008550#ifdef __cplusplus
8551extern "C"
8552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008553char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008554int
8555main ()
8556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 ;
8559 return 0;
8560}
8561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008562if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567rm -f core conftest.err conftest.$ac_objext \
8568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008569LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8572$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008573if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008575
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008576 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008577 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008578 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008579else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008580
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8582$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008583if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008585else
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008587LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591/* Override any GCC internal prototype to avoid an error.
8592 Use char because int might match the return type of a GCC
8593 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008594#ifdef __cplusplus
8595extern "C"
8596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008597char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008598int
8599main ()
8600{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008602 ;
8603 return 0;
8604}
8605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008606if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008611rm -f core conftest.err conftest.$ac_objext \
8612 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008613LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8616$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008617if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008619
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008620 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008621 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008622 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008623else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008624
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8626$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008627if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008629else
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008631LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635/* Override any GCC internal prototype to avoid an error.
8636 Use char because int might match the return type of a GCC
8637 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008638#ifdef __cplusplus
8639extern "C"
8640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008641char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008642int
8643main ()
8644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 ;
8647 return 0;
8648}
8649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008652else
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008655rm -f core conftest.err conftest.$ac_objext \
8656 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008657LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8660$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008661if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008663
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008664 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008665 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008666 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008667else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008668
Martin v. Löwis130fb172001-07-19 11:00:41 +00008669 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008670fi
8671
Guido van Rossum627b2d71993-12-24 10:39:16 +00008672
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008673fi
8674
Guido van Rossum0be3e491997-05-22 20:33:33 +00008675fi
8676
Guido van Rossum49545951997-12-02 19:28:29 +00008677fi
8678
Guido van Rossumb93a8621998-05-07 13:27:32 +00008679fi
8680
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682rm -f core conftest.err conftest.$ac_objext \
8683 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008684
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8686$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008687if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008689else
Martin v. Löwis11437992002-04-12 09:54:03 +00008690 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008691LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695/* Override any GCC internal prototype to avoid an error.
8696 Use char because int might match the return type of a GCC
8697 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008698#ifdef __cplusplus
8699extern "C"
8700#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008701char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008702int
8703main ()
8704{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008706 ;
8707 return 0;
8708}
8709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008710if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008712else
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008715rm -f core conftest.err conftest.$ac_objext \
8716 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008717LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8720$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008721if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008723
Martin v. Löwis130fb172001-07-19 11:00:41 +00008724 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008725 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008726 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008727fi
8728
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008729
Neal Norwitza978ab02002-11-02 16:58:05 +00008730 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8732$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008733if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008734 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008735else
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008737LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741/* Override any GCC internal prototype to avoid an error.
8742 Use char because int might match the return type of a GCC
8743 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008744#ifdef __cplusplus
8745extern "C"
8746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008747char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008748int
8749main ()
8750{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008751return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 ;
8753 return 0;
8754}
8755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008756if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008761rm -f core conftest.err conftest.$ac_objext \
8762 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008763LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8766$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008767if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008769
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008770 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008771 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008772 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008773fi
8774
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008775 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008776fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008777
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778if test "$posix_threads" = "yes"; then
8779 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008782
8783 fi
8784
8785 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8786 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008787 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008788$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008789
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008790 ;;
8791 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008792$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008793
8794 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008795 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008796$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008797
8798 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008799 esac
8800
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8802$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008803 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008805else
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008807 ac_cv_pthread_system_supported=no
8808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008810/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008811#include <pthread.h>
8812 void *foo(void *parm) {
8813 return NULL;
8814 }
8815 main() {
8816 pthread_attr_t attr;
8817 pthread_t id;
8818 if (pthread_attr_init(&attr)) exit(-1);
8819 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8820 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8821 exit(0);
8822 }
8823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008824if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008825 ac_cv_pthread_system_supported=yes
8826else
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833
Guido van Rossum627b2d71993-12-24 10:39:16 +00008834fi
8835
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8837$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008838 if test "$ac_cv_pthread_system_supported" = "yes"; then
8839
Matthias Kloseb9621712010-04-24 17:59:49 +00008840$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008841
8842 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 for ac_func in pthread_sigmask
8844do :
8845 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02008846if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008847 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008848#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008849_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008850 case $ac_sys_system in
8851 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008852
Matthias Kloseb9621712010-04-24 17:59:49 +00008853$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008854
8855 ;;
8856 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008857fi
8858done
8859
8860fi
8861
8862
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008863# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008864
Matthias Kloseb9621712010-04-24 17:59:49 +00008865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8866$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008868if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008869 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008870 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008873 ipv6=no
8874 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8876$as_echo "yes" >&6; }
8877 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008878
8879 ipv6=yes
8880 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008882else
Martin v. Löwis11437992002-04-12 09:54:03 +00008883
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8887$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008888 ipv6=no
8889
8890else
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008892/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008893 /* AF_INET6 available check */
8894#include <sys/types.h>
8895#include <sys/socket.h>
8896main()
8897{
8898 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8899 exit(1);
8900 else
8901 exit(0);
8902}
8903
Martin v. Löwis11437992002-04-12 09:54:03 +00008904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008905if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008906
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8908$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008909 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008911else
Matthias Kloseb159a552010-04-25 21:00:44 +00008912
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8914$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920fi
8921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008923if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8925$as_echo_n "checking if RFC2553 API is available... " >&6; }
8926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008927/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008928
8929 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008930#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
8933{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008934struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008935 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008936 ;
8937 return 0;
8938}
Matthias Kloseb159a552010-04-25 21:00:44 +00008939
Martin v. Löwis11437992002-04-12 09:54:03 +00008940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008941if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008942
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008944$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008945 ipv6=yes
8946
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008947else
Matthias Kloseb159a552010-04-25 21:00:44 +00008948
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008950$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008951 ipv6=no
8952
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008955fi
8956
8957if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008959
8960fi
8961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008962fi
8963
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964
8965ipv6type=unknown
8966ipv6lib=none
8967ipv6trylibc=no
8968
8969if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8971$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008972 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8973 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008974 case $i in
8975 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979#include <netinet/in.h>
8980#ifdef IPV6_INRIA_VERSION
8981yes
8982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008983_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008986 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008988rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989
8990 ;;
8991 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008993/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995#include <netinet/in.h>
8996#ifdef __KAME__
8997yes
8998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008999_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002 ipv6type=$i;
9003 ipv6lib=inet6
9004 ipv6libdir=/usr/local/v6/lib
9005 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009006fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009007rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008
9009 ;;
9010 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014#include <features.h>
9015#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9016yes
9017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021 ipv6type=$i;
9022 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009024rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025
9026 ;;
9027 linux-inet6)
9028 if test -d /usr/inet6; then
9029 ipv6type=$i
9030 ipv6lib=inet6
9031 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009032 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033 fi
9034 ;;
9035 solaris)
9036 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009037 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038 ipv6type=$i
9039 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040 fi
9041 fi
9042 ;;
9043 toshiba)
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 <sys/param.h>
9048#ifdef _TOSHIBA_INET6
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öwisa2ac6022001-08-09 11:40:14 +00009054 ipv6type=$i;
9055 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009056 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009058rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059
9060 ;;
9061 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009063/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009064
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065#include </usr/local/v6/include/sys/v6config.h>
9066#ifdef __V6D__
9067yes
9068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009069_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072 ipv6type=$i;
9073 ipv6lib=v6;
9074 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009075 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009077rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078
9079 ;;
9080 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009082/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009083
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084#include <sys/param.h>
9085#ifdef _ZETA_MINAMI_INET6
9086yes
9087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009088_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091 ipv6type=$i;
9092 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009093 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009094fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009095rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096
9097 ;;
9098 esac
9099 if test "$ipv6type" != "unknown"; then
9100 break
9101 fi
9102 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9104$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009105fi
9106
9107if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9108 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9109 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9110 echo "using lib$ipv6lib"
9111 else
9112 if test $ipv6trylibc = "yes"; then
9113 echo "using libc"
9114 else
9115 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9116 echo "You need to fetch lib$ipv6lib.a from appropriate"
9117 echo 'ipv6 kit and compile beforehand.'
9118 exit 1
9119 fi
9120 fi
9121fi
9122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9124$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009126/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009127
9128 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009129int
9130main ()
9131{
9132FSIORefNum fRef = 0
9133 ;
9134 return 0;
9135}
Matthias Kloseb159a552010-04-25 21:00:44 +00009136
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009138if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009139
Matthias Kloseb159a552010-04-25 21:00:44 +00009140
Matthias Kloseb9621712010-04-24 17:59:49 +00009141$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009142
Matthias Kloseb9621712010-04-24 17:59:49 +00009143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9144$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009145
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009146else
Matthias Kloseb159a552010-04-25 21:00:44 +00009147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009150
9151fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9153
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009154# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9156$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009157
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009158# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160 withval=$with_doc_strings;
9161fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009162
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009163
9164if test -z "$with_doc_strings"
9165then with_doc_strings="yes"
9166fi
9167if test "$with_doc_strings" != "no"
9168then
9169
Matthias Kloseb9621712010-04-24 17:59:49 +00009170$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009171
9172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9174$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009175
Antoine Pitrou042b1282010-08-13 21:15:58 +00009176# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9178$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009181if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009182 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009183if test "$withval" != no
9184then
9185
Matthias Kloseb9621712010-04-24 17:59:49 +00009186$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9189$as_echo "yes" >&6; }
9190else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9191$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009192fi
9193else
Matthias Kloseb9621712010-04-24 17:59:49 +00009194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9195$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196fi
9197
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009198
9199# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9201$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009204if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205 withval=$with_pymalloc;
9206fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009207
Neil Schemenauera35c6882001-02-27 04:45:05 +00009208
Neil Schemenauer16c22972002-03-22 15:34:49 +00009209if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009210then
9211 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009212 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009213fi
9214if test "$with_pymalloc" != "no"
9215then
Martin v. Löwis11437992002-04-12 09:54:03 +00009216
Matthias Kloseb9621712010-04-24 17:59:49 +00009217$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009218
9219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9221$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009222
Benjamin Peterson05159c42009-12-03 03:01:27 +00009223# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9225$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009226
9227# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009228if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009229 withval=$with_valgrind;
9230else
9231 with_valgrind=no
9232fi
9233
Matthias Kloseb9621712010-04-24 17:59:49 +00009234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9235$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009236if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009237 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009238if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009239
Matthias Kloseb9621712010-04-24 17:59:49 +00009240$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009241
9242else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009243 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009244
9245fi
9246
9247
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009248 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009249fi
9250
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009251# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009252
Guido van Rossum98935bf2001-09-05 19:13:16 +00009253DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009254
Guido van Rossume97ee181999-12-20 21:27:22 +00009255# the dlopen() function means we might want to use dynload_shlib.o. some
9256# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009257for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009258do :
9259 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009260if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009261 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009262#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009263_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009264
Guido van Rossume97ee181999-12-20 21:27:22 +00009265fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009266done
Guido van Rossume97ee181999-12-20 21:27:22 +00009267
Michael W. Hudson54241132001-12-07 15:38:26 +00009268
Guido van Rossume97ee181999-12-20 21:27:22 +00009269# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9270# loading of modules.
9271
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9273$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009274if test -z "$DYNLOADFILE"
9275then
9276 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009277 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9278 if test "$ac_cv_func_dlopen" = yes
9279 then DYNLOADFILE="dynload_shlib.o"
9280 else DYNLOADFILE="dynload_aix.o"
9281 fi
9282 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009283 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009284 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9285 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009286 *)
9287 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9288 # out any dynamic loading
9289 if test "$ac_cv_func_dlopen" = yes
9290 then DYNLOADFILE="dynload_shlib.o"
9291 else DYNLOADFILE="dynload_stub.o"
9292 fi
9293 ;;
9294 esac
9295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9297$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009298if test "$DYNLOADFILE" != "dynload_stub.o"
9299then
Martin v. Löwis11437992002-04-12 09:54:03 +00009300
Matthias Kloseb9621712010-04-24 17:59:49 +00009301$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009302
9303fi
9304
Neil Schemenauer4e425612001-06-19 15:44:15 +00009305# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9306
Michael W. Hudson54241132001-12-07 15:38:26 +00009307
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9309$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009310if test -z "$MACHDEP_OBJS"
9311then
Jack Jansene578a632001-08-15 01:27:14 +00009312 MACHDEP_OBJS=$extra_machdep_objs
9313else
9314 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9317$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009318
Guido van Rossum627b2d71993-12-24 10:39:16 +00009319# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009320for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009321 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009322 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009323 futimens futimes gai_strerror \
9324 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009325 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009326 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009327 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009328 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009329 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009330 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009331 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009332 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009333 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009334 sigaction sigaltstack siginterrupt sigpending sigrelse \
9335 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009336 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009337 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9338 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009339do :
9340 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9341ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009342if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009343 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009344#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009345_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009346
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009347fi
9348done
9349
Michael W. Hudson54241132001-12-07 15:38:26 +00009350
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009351# For some functions, having a definition is not sufficient, since
9352# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9354$as_echo_n "checking for chroot... " >&6; }
9355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009356/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009357#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009358int
9359main ()
9360{
9361void *x=chroot
9362 ;
9363 return 0;
9364}
9365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009367
Matthias Kloseb9621712010-04-24 17:59:49 +00009368$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009369
Matthias Kloseb159a552010-04-25 21:00:44 +00009370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009371$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009372else
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9374$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009375
9376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9379$as_echo_n "checking for link... " >&6; }
9380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009381/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009382#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009383int
9384main ()
9385{
9386void *x=link
9387 ;
9388 return 0;
9389}
9390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009392
Matthias Kloseb9621712010-04-24 17:59:49 +00009393$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009394
Matthias Kloseb159a552010-04-25 21:00:44 +00009395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009396$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009397else
Matthias Kloseb9621712010-04-24 17:59:49 +00009398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9399$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009400
9401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9404$as_echo_n "checking for symlink... " >&6; }
9405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009406/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009407#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009408int
9409main ()
9410{
9411void *x=symlink
9412 ;
9413 return 0;
9414}
9415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009416if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009417
Matthias Kloseb9621712010-04-24 17:59:49 +00009418$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009419
Matthias Kloseb159a552010-04-25 21:00:44 +00009420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009421$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009422else
Matthias Kloseb9621712010-04-24 17:59:49 +00009423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9424$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009425
9426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9429$as_echo_n "checking for fchdir... " >&6; }
9430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009431/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009432#include <unistd.h>
9433int
9434main ()
9435{
9436void *x=fchdir
9437 ;
9438 return 0;
9439}
9440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009441if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009442
Matthias Kloseb9621712010-04-24 17:59:49 +00009443$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009444
Matthias Kloseb159a552010-04-25 21:00:44 +00009445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009446$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009447else
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9449$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009450
9451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9454$as_echo_n "checking for fsync... " >&6; }
9455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009456/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009457#include <unistd.h>
9458int
9459main ()
9460{
9461void *x=fsync
9462 ;
9463 return 0;
9464}
9465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009466if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009467
Matthias Kloseb9621712010-04-24 17:59:49 +00009468$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009469
Matthias Kloseb159a552010-04-25 21:00:44 +00009470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009471$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009472else
Matthias Kloseb9621712010-04-24 17:59:49 +00009473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009475
9476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9479$as_echo_n "checking for fdatasync... " >&6; }
9480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009481/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009482#include <unistd.h>
9483int
9484main ()
9485{
9486void *x=fdatasync
9487 ;
9488 return 0;
9489}
9490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009492
Matthias Kloseb9621712010-04-24 17:59:49 +00009493$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009494
Matthias Kloseb159a552010-04-25 21:00:44 +00009495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009496$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009497else
Matthias Kloseb9621712010-04-24 17:59:49 +00009498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9499$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009500
9501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9504$as_echo_n "checking for epoll... " >&6; }
9505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009506/* end confdefs.h. */
9507#include <sys/epoll.h>
9508int
9509main ()
9510{
9511void *x=epoll_create
9512 ;
9513 return 0;
9514}
9515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009517
Matthias Kloseb9621712010-04-24 17:59:49 +00009518$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009519
Matthias Kloseb159a552010-04-25 21:00:44 +00009520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009521$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009522else
Matthias Kloseb9621712010-04-24 17:59:49 +00009523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9524$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009525
9526fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9529$as_echo_n "checking for kqueue... " >&6; }
9530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009531/* end confdefs.h. */
9532
9533#include <sys/types.h>
9534#include <sys/event.h>
9535
9536int
9537main ()
9538{
9539int x=kqueue()
9540 ;
9541 return 0;
9542}
9543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009544if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009545
Matthias Kloseb9621712010-04-24 17:59:49 +00009546$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009547
Matthias Kloseb159a552010-04-25 21:00:44 +00009548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009549$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009550else
Matthias Kloseb9621712010-04-24 17:59:49 +00009551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009553
9554fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009556# On some systems (eg. FreeBSD 5), we would find a definition of the
9557# functions ctermid_r, setgroups in the library, but no prototype
9558# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9559# address to avoid compiler warnings and potential miscompilations
9560# because of the missing prototypes.
9561
Matthias Kloseb9621712010-04-24 17:59:49 +00009562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9563$as_echo_n "checking for ctermid_r... " >&6; }
9564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009565/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009566
Martin v. Löwisd5843682002-11-21 20:41:28 +00009567#include <stdio.h>
9568
Martin v. Löwisd5843682002-11-21 20:41:28 +00009569int
9570main ()
9571{
9572void* p = ctermid_r
9573 ;
9574 return 0;
9575}
9576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009578
Matthias Kloseb9621712010-04-24 17:59:49 +00009579$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009580
Matthias Kloseb159a552010-04-25 21:00:44 +00009581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009582$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009583else
Matthias Kloseb9621712010-04-24 17:59:49 +00009584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9585$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009586
9587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9589
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9591$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009592if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009593 $as_echo_n "(cached) " >&6
9594else
9595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009596/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009597#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009598int
9599main ()
9600{
9601void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009602
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009603 ;
9604 return 0;
9605}
9606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009607if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009608 ac_cv_flock_decl=yes
9609else
9610 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009611
9612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009614
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009615fi
9616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9617$as_echo "$ac_cv_flock_decl" >&6; }
9618if test "x${ac_cv_flock_decl}" = xyes; then
9619 for ac_func in flock
9620do :
9621 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009622if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009623 cat >>confdefs.h <<_ACEOF
9624#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009625_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009626
Antoine Pitroua3000072010-09-07 14:52:42 +00009627else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009629$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009630if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009631 $as_echo_n "(cached) " >&6
9632else
9633 ac_check_lib_save_LIBS=$LIBS
9634LIBS="-lbsd $LIBS"
9635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9636/* end confdefs.h. */
9637
9638/* Override any GCC internal prototype to avoid an error.
9639 Use char because int might match the return type of a GCC
9640 builtin and then its argument prototype would still apply. */
9641#ifdef __cplusplus
9642extern "C"
9643#endif
9644char flock ();
9645int
9646main ()
9647{
9648return flock ();
9649 ;
9650 return 0;
9651}
9652_ACEOF
9653if ac_fn_c_try_link "$LINENO"; then :
9654 ac_cv_lib_bsd_flock=yes
9655else
9656 ac_cv_lib_bsd_flock=no
9657fi
9658rm -f core conftest.err conftest.$ac_objext \
9659 conftest$ac_exeext conftest.$ac_ext
9660LIBS=$ac_check_lib_save_LIBS
9661fi
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9663$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009664if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009665 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009666
9667
9668$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9669
9670
9671fi
9672
9673
9674fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009675done
9676
Antoine Pitroua3000072010-09-07 14:52:42 +00009677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678
Matthias Kloseb9621712010-04-24 17:59:49 +00009679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9680$as_echo_n "checking for getpagesize... " >&6; }
9681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009682/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009683
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009684#include <unistd.h>
9685
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009686int
9687main ()
9688{
9689void* p = getpagesize
9690 ;
9691 return 0;
9692}
9693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009694if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009695
Matthias Kloseb9621712010-04-24 17:59:49 +00009696$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009697
Matthias Kloseb159a552010-04-25 21:00:44 +00009698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009699$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009700else
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9702$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009703
9704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009706
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9708$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9710/* end confdefs.h. */
9711
9712#include <malloc.h>
9713
9714int
9715main ()
9716{
9717mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9718 ;
9719 return 0;
9720}
9721_ACEOF
9722if ac_fn_c_try_compile "$LINENO"; then :
9723
9724$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9725
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9727$as_echo "yes" >&6; }
9728else
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9730$as_echo "no" >&6; }
9731
9732fi
9733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9734
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009735for ac_prog in true
9736do
9737 # Extract the first word of "$ac_prog", so it can be a program name with args.
9738set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9740$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009741if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009743else
9744 if test -n "$TRUE"; then
9745 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9746else
9747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9748for as_dir in $PATH
9749do
9750 IFS=$as_save_IFS
9751 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753 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 +00009754 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 $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 +00009756 break 2
9757 fi
9758done
Matthias Kloseb9621712010-04-24 17:59:49 +00009759 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009761
9762fi
9763fi
9764TRUE=$ac_cv_prog_TRUE
9765if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9767$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009768else
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9770$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009771fi
9772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009774 test -n "$TRUE" && break
9775done
9776test -n "$TRUE" || TRUE="/bin/true"
9777
9778
Matthias Kloseb9621712010-04-24 17:59:49 +00009779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9780$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009781if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009782 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009783else
9784 ac_check_lib_save_LIBS=$LIBS
9785LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009787/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789/* Override any GCC internal prototype to avoid an error.
9790 Use char because int might match the return type of a GCC
9791 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009792#ifdef __cplusplus
9793extern "C"
9794#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009795char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009796int
9797main ()
9798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800 ;
9801 return 0;
9802}
9803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009804if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009805 ac_cv_lib_c_inet_aton=yes
9806else
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009809rm -f core conftest.err conftest.$ac_objext \
9810 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009811LIBS=$ac_check_lib_save_LIBS
9812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9814$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009815if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009816 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009817else
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9819$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009820if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009822else
9823 ac_check_lib_save_LIBS=$LIBS
9824LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009826/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828/* Override any GCC internal prototype to avoid an error.
9829 Use char because int might match the return type of a GCC
9830 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009831#ifdef __cplusplus
9832extern "C"
9833#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009834char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009835int
9836main ()
9837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009839 ;
9840 return 0;
9841}
9842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009843if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009844 ac_cv_lib_resolv_inet_aton=yes
9845else
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848rm -f core conftest.err conftest.$ac_objext \
9849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009850LIBS=$ac_check_lib_save_LIBS
9851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9853$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009854if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009855 cat >>confdefs.h <<_ACEOF
9856#define HAVE_LIBRESOLV 1
9857_ACEOF
9858
9859 LIBS="-lresolv $LIBS"
9860
9861fi
9862
9863
9864fi
9865
9866
Christian Heimesd0764e22007-12-04 15:00:33 +00009867# On Tru64, chflags seems to be present, but calling it will
9868# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9870$as_echo_n "checking for chflags... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009871if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009873else
Matthias Kloseb9621712010-04-24 17:59:49 +00009874 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009875 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009876else
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009878/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009879
Christian Heimesd0764e22007-12-04 15:00:33 +00009880#include <sys/stat.h>
9881#include <unistd.h>
9882int main(int argc, char*argv[])
9883{
9884 if(chflags(argv[0], 0) != 0)
9885 return 1;
9886 return 0;
9887}
Ned Deily3eb67d52011-06-28 00:00:28 -07009888
Christian Heimesd0764e22007-12-04 15:00:33 +00009889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009890if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009891 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009892else
Matthias Kloseb9621712010-04-24 17:59:49 +00009893 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009897fi
9898
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009899
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9902$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009903if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009905if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009906 ac_cv_have_chflags="yes"
9907else
9908 ac_cv_have_chflags="no"
9909fi
9910
9911fi
9912if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009913
Matthias Kloseb9621712010-04-24 17:59:49 +00009914$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009915
9916fi
9917
Matthias Kloseb9621712010-04-24 17:59:49 +00009918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9919$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009920if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009922else
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009924 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009925else
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009927/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009928
Christian Heimesd0764e22007-12-04 15:00:33 +00009929#include <sys/stat.h>
9930#include <unistd.h>
9931int main(int argc, char*argv[])
9932{
9933 if(lchflags(argv[0], 0) != 0)
9934 return 1;
9935 return 0;
9936}
Ned Deily3eb67d52011-06-28 00:00:28 -07009937
Christian Heimesd0764e22007-12-04 15:00:33 +00009938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009939if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009940 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009941else
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9945 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009946fi
9947
9948
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9951$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009952if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009953 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009954if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009955 ac_cv_have_lchflags="yes"
9956else
9957 ac_cv_have_lchflags="no"
9958fi
9959
9960fi
9961if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009962
Matthias Kloseb9621712010-04-24 17:59:49 +00009963$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009964
9965fi
9966
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009967case $ac_sys_system/$ac_sys_release in
9968Darwin/*)
9969 _CUR_CFLAGS="${CFLAGS}"
9970 _CUR_LDFLAGS="${LDFLAGS}"
9971 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9972 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9973 ;;
9974esac
9975
Matthias Kloseb9621712010-04-24 17:59:49 +00009976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9977$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +02009978if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009980else
9981 ac_check_lib_save_LIBS=$LIBS
9982LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009984/* end confdefs.h. */
9985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986/* Override any GCC internal prototype to avoid an error.
9987 Use char because int might match the return type of a GCC
9988 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009989#ifdef __cplusplus
9990extern "C"
9991#endif
9992char inflateCopy ();
9993int
9994main ()
9995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009997 ;
9998 return 0;
9999}
10000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010001if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010002 ac_cv_lib_z_inflateCopy=yes
10003else
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010006rm -f core conftest.err conftest.$ac_objext \
10007 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010008LIBS=$ac_check_lib_save_LIBS
10009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10011$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010012if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010015
10016fi
10017
10018
10019case $ac_sys_system/$ac_sys_release in
10020Darwin/*)
10021 CFLAGS="${_CUR_CFLAGS}"
10022 LDFLAGS="${_CUR_LDFLAGS}"
10023 ;;
10024esac
10025
Matthias Kloseb9621712010-04-24 17:59:49 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10027$as_echo_n "checking for hstrerror... " >&6; }
10028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010029/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010030
Martin v. Löwise9416172003-05-03 10:12:45 +000010031#include <netdb.h>
10032
Martin v. Löwise9416172003-05-03 10:12:45 +000010033int
10034main ()
10035{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010036void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010037 ;
10038 return 0;
10039}
10040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010041if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010042
Matthias Kloseb9621712010-04-24 17:59:49 +000010043$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010044
Matthias Kloseb159a552010-04-25 21:00:44 +000010045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010046$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010047else
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10049$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010050
10051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010052rm -f core conftest.err conftest.$ac_objext \
10053 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10056$as_echo_n "checking for inet_aton... " >&6; }
10057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010058/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010059
Martin v. Löwis86d66262006-02-17 08:40:11 +000010060#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010061#include <sys/socket.h>
10062#include <netinet/in.h>
10063#include <arpa/inet.h>
10064
Martin v. Löwise9416172003-05-03 10:12:45 +000010065int
10066main ()
10067{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010068void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010069 ;
10070 return 0;
10071}
10072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010073if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010074
Matthias Kloseb9621712010-04-24 17:59:49 +000010075$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010076
Matthias Kloseb159a552010-04-25 21:00:44 +000010077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010078$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010079else
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010082
10083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010084rm -f core conftest.err conftest.$ac_objext \
10085 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10088$as_echo_n "checking for inet_pton... " >&6; }
10089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010090/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010091
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010092#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010093#include <sys/socket.h>
10094#include <netinet/in.h>
10095#include <arpa/inet.h>
10096
Martin v. Löwise9416172003-05-03 10:12:45 +000010097int
10098main ()
10099{
10100void* p = inet_pton
10101 ;
10102 return 0;
10103}
10104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010105if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010106
Matthias Kloseb9621712010-04-24 17:59:49 +000010107$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010108
Matthias Kloseb159a552010-04-25 21:00:44 +000010109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010110$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010111else
Matthias Kloseb9621712010-04-24 17:59:49 +000010112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10113$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010114
10115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010117
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010118# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10120$as_echo_n "checking for setgroups... " >&6; }
10121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010122/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010123
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010124#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010125#ifdef HAVE_GRP_H
10126#include <grp.h>
10127#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010128
Martin v. Löwisd5843682002-11-21 20:41:28 +000010129int
10130main ()
10131{
10132void* p = setgroups
10133 ;
10134 return 0;
10135}
10136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010138
Matthias Kloseb9621712010-04-24 17:59:49 +000010139$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010140
Matthias Kloseb159a552010-04-25 21:00:44 +000010141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010142$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010143else
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10145$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010146
10147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010149
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010150# check for openpty and forkpty
10151
10152for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010153do :
10154 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010155if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010157#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010158_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010159
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010160else
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10162$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010163if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010165else
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010167LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171/* Override any GCC internal prototype to avoid an error.
10172 Use char because int might match the return type of a GCC
10173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010174#ifdef __cplusplus
10175extern "C"
10176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010177char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010178int
10179main ()
10180{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ;
10183 return 0;
10184}
10185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010186if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010188else
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010191rm -f core conftest.err conftest.$ac_objext \
10192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010193LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10196$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010197if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010199 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010200else
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10202$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010203if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010205else
10206 ac_check_lib_save_LIBS=$LIBS
10207LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010209/* end confdefs.h. */
10210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010211/* Override any GCC internal prototype to avoid an error.
10212 Use char because int might match the return type of a GCC
10213 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010214#ifdef __cplusplus
10215extern "C"
10216#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010217char openpty ();
10218int
10219main ()
10220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010222 ;
10223 return 0;
10224}
10225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010226if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010227 ac_cv_lib_bsd_openpty=yes
10228else
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231rm -f core conftest.err conftest.$ac_objext \
10232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010233LIBS=$ac_check_lib_save_LIBS
10234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10236$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010237if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010239 LIBS="$LIBS -lbsd"
10240fi
10241
10242
10243fi
10244
Fred Drake8cef4cf2000-06-28 16:40:38 +000010245
10246fi
10247done
10248
10249for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010250do :
10251 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010252if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010254#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010255_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010256
Fred Drake8cef4cf2000-06-28 16:40:38 +000010257else
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10259$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010260if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010262else
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010264LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268/* Override any GCC internal prototype to avoid an error.
10269 Use char because int might match the return type of a GCC
10270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010271#ifdef __cplusplus
10272extern "C"
10273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010274char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010275int
10276main ()
10277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ;
10280 return 0;
10281}
10282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010284 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010285else
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010288rm -f core conftest.err conftest.$ac_objext \
10289 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010290LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10293$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010294if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010296 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010297else
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10299$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010300if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010302else
10303 ac_check_lib_save_LIBS=$LIBS
10304LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010306/* end confdefs.h. */
10307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010308/* Override any GCC internal prototype to avoid an error.
10309 Use char because int might match the return type of a GCC
10310 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010311#ifdef __cplusplus
10312extern "C"
10313#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010314char forkpty ();
10315int
10316main ()
10317{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010319 ;
10320 return 0;
10321}
10322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010324 ac_cv_lib_bsd_forkpty=yes
10325else
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010328rm -f core conftest.err conftest.$ac_objext \
10329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010330LIBS=$ac_check_lib_save_LIBS
10331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10333$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010334if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010336 LIBS="$LIBS -lbsd"
10337fi
10338
10339
10340fi
10341
Fred Drake8cef4cf2000-06-28 16:40:38 +000010342
10343fi
10344done
10345
Jack Jansendd19cf82001-12-06 22:36:17 +000010346
Christian Heimesb186d002008-03-18 15:15:01 +000010347# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010348for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010349do :
10350 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010351if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010352 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010354_ACEOF
10355
10356fi
10357done
10358
10359
Michael W. Hudson54241132001-12-07 15:38:26 +000010360# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010361for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010362do :
10363 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10364ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010365if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010367#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010368_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010369
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010370fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010371done
10372
Michael W. Hudson54241132001-12-07 15:38:26 +000010373
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010374ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010375if test "x$ac_cv_func_dup2" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010376 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010377
Martin v. Löwis1142de32002-03-29 16:28:31 +000010378else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010380 *" dup2.$ac_objext "* ) ;;
10381 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010383esac
10384
Martin v. Löwis1142de32002-03-29 16:28:31 +000010385fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010386
10387ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010388if test "x$ac_cv_func_getcwd" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010389 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10390
10391else
10392 case " $LIBOBJS " in
10393 *" getcwd.$ac_objext "* ) ;;
10394 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10395 ;;
10396esac
10397
10398fi
10399
10400ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010401if test "x$ac_cv_func_strdup" = x""yes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010402 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10403
10404else
10405 case " $LIBOBJS " in
10406 *" strdup.$ac_objext "* ) ;;
10407 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10408 ;;
10409esac
10410
10411fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010412
10413
10414for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010415do :
10416 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010417if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010422/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010423#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010424int
10425main ()
10426{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010427getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 ;
10429 return 0;
10430}
10431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010433
Matthias Kloseb9621712010-04-24 17:59:49 +000010434$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010435
Guido van Rossum627b2d71993-12-24 10:39:16 +000010436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010438
Guido van Rossum627b2d71993-12-24 10:39:16 +000010439fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010440done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010441
Jack Jansen150753c2003-03-29 22:07:47 +000010442for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010443do :
10444 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010445if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010446 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010447#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010451#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010452int
10453main ()
10454{
10455setpgrp(0,0);
10456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010463
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010466
10467fi
10468done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010469
Thomas Wouters3a584202000-08-05 23:28:51 +000010470for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010471do :
10472 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010473if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010474 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010475#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010478/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010479#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010480int
10481main ()
10482{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010483gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010484 ;
10485 return 0;
10486}
10487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010488if ac_fn_c_try_compile "$LINENO"; then :
10489
Guido van Rossum627b2d71993-12-24 10:39:16 +000010490else
Skip Montanaro6dead952003-09-25 14:50:04 +000010491
Matthias Kloseb9621712010-04-24 17:59:49 +000010492$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010493
Martin v. Löwis11437992002-04-12 09:54:03 +000010494
Guido van Rossum627b2d71993-12-24 10:39:16 +000010495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010497
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010498fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010499done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010500
Michael W. Hudson54241132001-12-07 15:38:26 +000010501
Matthias Kloseb9621712010-04-24 17:59:49 +000010502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10503$as_echo_n "checking for major... " >&6; }
10504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010506
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010507#if defined(MAJOR_IN_MKDEV)
10508#include <sys/mkdev.h>
10509#elif defined(MAJOR_IN_SYSMACROS)
10510#include <sys/sysmacros.h>
10511#else
10512#include <sys/types.h>
10513#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010514
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010515int
10516main ()
10517{
10518
10519 makedev(major(0),minor(0));
10520
10521 ;
10522 return 0;
10523}
10524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010526
10527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010529
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10531$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010532
10533else
Skip Montanaro6dead952003-09-25 14:50:04 +000010534
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10536$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010537
10538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010539rm -f core conftest.err conftest.$ac_objext \
10540 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010541
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010542# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010543# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10545$as_echo_n "checking for getaddrinfo... " >&6; }
10546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010547/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010548
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010549#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010550#include <sys/socket.h>
10551#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010552#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010553
Martin v. Löwis11437992002-04-12 09:54:03 +000010554int
10555main ()
10556{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010557getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 ;
10559 return 0;
10560}
10561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010562if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010563 have_getaddrinfo=yes
10564else
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010567rm -f core conftest.err conftest.$ac_objext \
10568 conftest$ac_exeext conftest.$ac_ext
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10570$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010571if test $have_getaddrinfo = yes
10572then
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10574$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010575 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010577else
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010579 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010580else
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010582/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010583
10584#include <sys/types.h>
10585#include <netdb.h>
10586#include <string.h>
10587#include <sys/socket.h>
10588#include <netinet/in.h>
10589
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010590int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010591{
10592 int passive, gaierr, inet4 = 0, inet6 = 0;
10593 struct addrinfo hints, *ai, *aitop;
10594 char straddr[INET6_ADDRSTRLEN], strport[16];
10595
10596 for (passive = 0; passive <= 1; passive++) {
10597 memset(&hints, 0, sizeof(hints));
10598 hints.ai_family = AF_UNSPEC;
10599 hints.ai_flags = passive ? AI_PASSIVE : 0;
10600 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010601 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010602 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10603 (void)gai_strerror(gaierr);
10604 goto bad;
10605 }
10606 for (ai = aitop; ai; ai = ai->ai_next) {
10607 if (ai->ai_addr == NULL ||
10608 ai->ai_addrlen == 0 ||
10609 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10610 straddr, sizeof(straddr), strport, sizeof(strport),
10611 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10612 goto bad;
10613 }
10614 switch (ai->ai_family) {
10615 case AF_INET:
10616 if (strcmp(strport, "54321") != 0) {
10617 goto bad;
10618 }
10619 if (passive) {
10620 if (strcmp(straddr, "0.0.0.0") != 0) {
10621 goto bad;
10622 }
10623 } else {
10624 if (strcmp(straddr, "127.0.0.1") != 0) {
10625 goto bad;
10626 }
10627 }
10628 inet4++;
10629 break;
10630 case AF_INET6:
10631 if (strcmp(strport, "54321") != 0) {
10632 goto bad;
10633 }
10634 if (passive) {
10635 if (strcmp(straddr, "::") != 0) {
10636 goto bad;
10637 }
10638 } else {
10639 if (strcmp(straddr, "::1") != 0) {
10640 goto bad;
10641 }
10642 }
10643 inet6++;
10644 break;
10645 case AF_UNSPEC:
10646 goto bad;
10647 break;
10648 default:
10649 /* another family support? */
10650 break;
10651 }
10652 }
10653 }
10654
10655 if (!(inet4 == 0 || inet4 == 2))
10656 goto bad;
10657 if (!(inet6 == 0 || inet6 == 2))
10658 goto bad;
10659
10660 if (aitop)
10661 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010662 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010663
10664 bad:
10665 if (aitop)
10666 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010667 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010668}
10669
Martin v. Löwis11437992002-04-12 09:54:03 +000010670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010671if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010672 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010673else
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10677 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010680fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010681
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10685$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10686
Mark Dickinson2df5d282009-12-31 21:22:50 +000010687if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010688then
10689 if test $ipv6 = yes
10690 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010691 echo 'Fatal: You must get working getaddrinfo() function.'
10692 echo ' or you can specify "--disable-ipv6"'.
10693 exit 1
10694 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010695else
Martin v. Löwis11437992002-04-12 09:54:03 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010698
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010699fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010700
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010701for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010702do :
10703 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010704if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010706#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010707_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010708
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010709fi
10710done
10711
Michael W. Hudson54241132001-12-07 15:38:26 +000010712
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010713# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10715$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010716if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010718else
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010720/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010721#include <sys/types.h>
10722#include <sys/time.h>
10723#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010724
Martin v. Löwis11437992002-04-12 09:54:03 +000010725int
10726main ()
10727{
10728if ((struct tm *) 0)
10729return 0;
10730 ;
10731 return 0;
10732}
10733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010734if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736else
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10742$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010743if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010746
10747fi
10748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10750$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010751if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010753else
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010755/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010756#include <sys/types.h>
10757#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010758
Martin v. Löwis11437992002-04-12 09:54:03 +000010759int
10760main ()
10761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762struct tm tm;
10763 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010765 ;
10766 return 0;
10767}
10768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010769if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010770 ac_cv_struct_tm=time.h
10771else
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10777$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010778if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010779
Matthias Kloseb9621712010-04-24 17:59:49 +000010780$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010781
10782fi
10783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784ac_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 +000010785#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010786
Matthias Kloseb9621712010-04-24 17:59:49 +000010787"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010788if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010789
10790cat >>confdefs.h <<_ACEOF
10791#define HAVE_STRUCT_TM_TM_ZONE 1
10792_ACEOF
10793
10794
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010795fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010796
Martin v. Löwis11437992002-04-12 09:54:03 +000010797if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010800
10801else
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10803"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010804if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010806else
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010808fi
10809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010810cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010811#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812_ACEOF
10813
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10815$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010816if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818else
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010821#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010822#if !HAVE_DECL_TZNAME
10823extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010825
Martin v. Löwis11437992002-04-12 09:54:03 +000010826int
10827main ()
10828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010829return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010830 ;
10831 return 0;
10832}
10833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010834if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010835 ac_cv_var_tzname=yes
10836else
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010839rm -f core conftest.err conftest.$ac_objext \
10840 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10843$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010844 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010847
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010848 fi
10849fi
10850
Matthias Kloseb9621712010-04-24 17:59:49 +000010851ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010852if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010853
10854cat >>confdefs.h <<_ACEOF
10855#define HAVE_STRUCT_STAT_ST_RDEV 1
10856_ACEOF
10857
10858
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010859fi
10860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010862if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010863
Martin v. Löwis11437992002-04-12 09:54:03 +000010864cat >>confdefs.h <<_ACEOF
10865#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10866_ACEOF
10867
10868
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010869fi
10870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010872if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010873
10874cat >>confdefs.h <<_ACEOF
10875#define HAVE_STRUCT_STAT_ST_FLAGS 1
10876_ACEOF
10877
10878
10879fi
10880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010882if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010883
10884cat >>confdefs.h <<_ACEOF
10885#define HAVE_STRUCT_STAT_ST_GEN 1
10886_ACEOF
10887
10888
10889fi
10890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010892if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010893
10894cat >>confdefs.h <<_ACEOF
10895#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10896_ACEOF
10897
10898
10899fi
10900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010902if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010903
Martin v. Löwis11437992002-04-12 09:54:03 +000010904cat >>confdefs.h <<_ACEOF
10905#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10906_ACEOF
10907
10908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010910
10911else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010912 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010913 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10915 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010916esac
10917
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010918fi
10919
Michael W. Hudson54241132001-12-07 15:38:26 +000010920
Martin v. Löwis11437992002-04-12 09:54:03 +000010921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10923$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010924if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010926else
Matthias Kloseb159a552010-04-25 21:00:44 +000010927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010929/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010930#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010931int
10932main ()
10933{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010934return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010935 ;
10936 return 0;
10937}
10938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010939if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010940 ac_cv_header_time_altzone=yes
10941else
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010946fi
10947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10949$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010950if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010953
10954fi
10955
Guido van Rossumda88dad1995-01-26 00:46:29 +000010956was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10958$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010960/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010961
10962#include <sys/types.h>
10963#include <sys/select.h>
10964#include <sys/time.h>
10965
Martin v. Löwis11437992002-04-12 09:54:03 +000010966int
10967main ()
10968{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010969;
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 ;
10971 return 0;
10972}
10973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010974if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
10976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010978
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010979 was_it_defined=yes
10980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10984$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10987$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020010988if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010990else
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010992/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010993#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010994int
10995main ()
10996{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010997struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ;
10999 return 0;
11000}
11001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011003 ac_cv_struct_addrinfo=yes
11004else
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11008fi
11009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11011$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011012if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011015
11016fi
11017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11019$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011020if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011022else
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011024/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011025
11026# include <sys/types.h>
11027# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011028int
11029main ()
11030{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011031struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 ;
11033 return 0;
11034}
11035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011036if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011037 ac_cv_struct_sockaddr_storage=yes
11038else
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11042fi
11043
Matthias Kloseb9621712010-04-24 17:59:49 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11045$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011046if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011049
11050fi
11051
Guido van Rossum627b2d71993-12-24 10:39:16 +000011052# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11055$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011056if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011058else
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011061$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011062int
11063main ()
11064{
11065static int test_array [1 - 2 * !(((char) -1) < 0)];
11066test_array [0] = 0
11067
11068 ;
11069 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011070}
Martin v. Löwis11437992002-04-12 09:54:03 +000011071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011072if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011073 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011074else
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11080$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011081if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083
11084fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11087$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011088if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011092/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011093
Martin v. Löwis11437992002-04-12 09:54:03 +000011094int
11095main ()
11096{
11097/* FIXME: Include the comments suggested by Paul. */
11098#ifndef __cplusplus
11099 /* Ultrix mips cc rejects this. */
11100 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103 char const *const *pcpcc;
11104 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011105 /* NEC SVR4.0.2 mips cc rejects this. */
11106 struct point {int x, y;};
11107 static struct point const zero = {0,0};
11108 /* AIX XL C 1.02.0.0 rejects this.
11109 It does not let you subtract one const X* pointer from another in
11110 an arm of an if-expression whose if-part is not a constant
11111 expression */
11112 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011114 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011115 ++pcpcc;
11116 ppc = (char**) pcpcc;
11117 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 { /* SCO 3.2v4 cc rejects this. */
11119 char *t;
11120 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 }
11125 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11126 int x[] = {25, 17};
11127 const int *foo = &x[0];
11128 ++foo;
11129 }
11130 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11131 typedef const int *iptr;
11132 iptr p = 0;
11133 ++p;
11134 }
11135 { /* AIX XL C 1.02.0.0 rejects this saying
11136 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11137 struct s { int j; const int *ap[3]; };
11138 struct s *b; b->j = 5;
11139 }
11140 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11141 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011142 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011144 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011145#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011146
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 ;
11148 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011149}
Martin v. Löwis11437992002-04-12 09:54:03 +000011150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011151if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011152 ac_cv_c_const=yes
11153else
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11159$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011160if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011161
Matthias Kloseb9621712010-04-24 17:59:49 +000011162$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163
11164fi
11165
Michael W. Hudson54241132001-12-07 15:38:26 +000011166
Guido van Rossumda88dad1995-01-26 00:46:29 +000011167works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11169$as_echo_n "checking for working volatile... " >&6; }
11170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011171/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011172
Martin v. Löwis11437992002-04-12 09:54:03 +000011173int
11174main ()
11175{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011176volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 ;
11178 return 0;
11179}
11180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011181if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011182 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011183else
Skip Montanaro6dead952003-09-25 14:50:04 +000011184
Matthias Kloseb9621712010-04-24 17:59:49 +000011185$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011186
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011187
Guido van Rossum627b2d71993-12-24 10:39:16 +000011188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11191$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011192
Guido van Rossumda88dad1995-01-26 00:46:29 +000011193works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11195$as_echo_n "checking for working signed char... " >&6; }
11196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011197/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011198
Martin v. Löwis11437992002-04-12 09:54:03 +000011199int
11200main ()
11201{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011202signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 ;
11204 return 0;
11205}
11206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011207if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011208 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011209else
Skip Montanaro6dead952003-09-25 14:50:04 +000011210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011212
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011213
Guido van Rossum7f43da71994-08-01 12:15:30 +000011214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11217$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011218
Guido van Rossumda88dad1995-01-26 00:46:29 +000011219have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11221$as_echo_n "checking for prototypes... " >&6; }
11222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011223/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011224int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011225int
11226main ()
11227{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011228return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011229 ;
11230 return 0;
11231}
11232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011236
Matthias Kloseb159a552010-04-25 21:00:44 +000011237 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11241$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011242
Guido van Rossumda88dad1995-01-26 00:46:29 +000011243works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11245$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011247/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011248
11249#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011250int foo(int x, ...) {
11251 va_list va;
11252 va_start(va, x);
11253 va_arg(va, int);
11254 va_arg(va, char *);
11255 va_arg(va, double);
11256 return 0;
11257}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011258
Martin v. Löwis11437992002-04-12 09:54:03 +000011259int
11260main ()
11261{
Guido van Rossum90eea071996-08-30 20:58:57 +000011262return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011263 ;
11264 return 0;
11265}
11266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011268
11269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011271
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011272 works=yes
11273
Guido van Rossum627b2d71993-12-24 10:39:16 +000011274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11277$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011278
Martin v. Löwisd6320502004-08-12 13:45:08 +000011279# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11281$as_echo_n "checking for socketpair... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011283/* end confdefs.h. */
11284
11285#include <sys/types.h>
11286#include <sys/socket.h>
11287
11288int
11289main ()
11290{
11291void *x=socketpair
11292 ;
11293 return 0;
11294}
11295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011299
Matthias Kloseb159a552010-04-25 21:00:44 +000011300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011302else
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11304$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011305
11306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011308
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011309# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11311$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011314#include <sys/types.h>
11315#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011316int
11317main ()
11318{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011319struct sockaddr x;
11320x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 ;
11322 return 0;
11323}
11324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011325if ac_fn_c_try_compile "$LINENO"; then :
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11327$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011330
11331else
Matthias Kloseb9621712010-04-24 17:59:49 +000011332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011334
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011337
Guido van Rossumda88dad1995-01-26 00:46:29 +000011338va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11340$as_echo_n "checking whether va_list is an array... " >&6; }
11341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011342/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011343
11344#ifdef HAVE_STDARG_PROTOTYPES
11345#include <stdarg.h>
11346#else
11347#include <varargs.h>
11348#endif
11349
Martin v. Löwis11437992002-04-12 09:54:03 +000011350int
11351main ()
11352{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011353va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 ;
11355 return 0;
11356}
11357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011358if ac_fn_c_try_compile "$LINENO"; then :
11359
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360else
Skip Montanaro6dead952003-09-25 14:50:04 +000011361
Martin v. Löwis11437992002-04-12 09:54:03 +000011362
Matthias Kloseb9621712010-04-24 17:59:49 +000011363$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011364
Guido van Rossumda88dad1995-01-26 00:46:29 +000011365 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011366
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11370$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011372# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011373
11374
Matthias Kloseb9621712010-04-24 17:59:49 +000011375ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011376if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011377
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11381$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011382 OLD_CFLAGS=$CFLAGS
11383 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011385/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011386
11387# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011388
Martin v. Löwis11437992002-04-12 09:54:03 +000011389int
11390main ()
11391{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392
11393 char *name;
11394 struct hostent *he, *res;
11395 char buffer[2048];
11396 int buflen = 2048;
11397 int h_errnop;
11398
11399 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011400
11401 ;
11402 return 0;
11403}
11404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011408
Martin v. Löwis11437992002-04-12 09:54:03 +000011409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011411
Matthias Kloseb9621712010-04-24 17:59:49 +000011412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11413$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011414
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011415else
Skip Montanaro6dead952003-09-25 14:50:04 +000011416
Matthias Kloseb9621712010-04-24 17:59:49 +000011417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11418$as_echo "no" >&6; }
11419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11420$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011422/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011423
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011424# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
Martin v. Löwis11437992002-04-12 09:54:03 +000011426int
11427main ()
11428{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011429
11430 char *name;
11431 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011432 char buffer[2048];
11433 int buflen = 2048;
11434 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011435
Matthias Kloseb159a552010-04-25 21:00:44 +000011436 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011437
11438 ;
11439 return 0;
11440}
11441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011443
Matthias Kloseb9621712010-04-24 17:59:49 +000011444 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011445
Martin v. Löwis11437992002-04-12 09:54:03 +000011446
Matthias Kloseb159a552010-04-25 21:00:44 +000011447$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11450$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011452else
Skip Montanaro6dead952003-09-25 14:50:04 +000011453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11457$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11459/* end confdefs.h. */
11460
11461# include <netdb.h>
11462
11463int
11464main ()
11465{
11466
11467 char *name;
11468 struct hostent *he;
11469 struct hostent_data data;
11470
11471 (void) gethostbyname_r(name, he, &data);
11472
11473 ;
11474 return 0;
11475}
11476_ACEOF
11477if ac_fn_c_try_compile "$LINENO"; then :
11478
11479 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11480
11481
11482$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11483
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11485$as_echo "yes" >&6; }
11486
11487else
11488
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11490$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011491
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011494
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011500 CFLAGS=$OLD_CFLAGS
11501
11502else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 for ac_func in gethostbyname
11505do :
11506 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011507if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011508 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011509#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011510_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011511
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011512fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011513done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011514
Michael W. Hudson54241132001-12-07 15:38:26 +000011515
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011516fi
11517
Michael W. Hudson54241132001-12-07 15:38:26 +000011518
11519
11520
11521
11522
11523
Guido van Rossum627b2d71993-12-24 10:39:16 +000011524# checks for system services
11525# (none yet)
11526
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011527# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011528ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011529if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011530
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011531else
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11533$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011534if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011536else
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011538LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542/* Override any GCC internal prototype to avoid an error.
11543 Use char because int might match the return type of a GCC
11544 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011545#ifdef __cplusplus
11546extern "C"
11547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011548char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011549int
11550main ()
11551{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011553 ;
11554 return 0;
11555}
11556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011557if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011559else
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011562rm -f core conftest.err conftest.$ac_objext \
11563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011564LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11567$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011568if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 cat >>confdefs.h <<_ACEOF
11570#define HAVE_LIBIEEE 1
11571_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011572
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011573 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011574
Guido van Rossum627b2d71993-12-24 10:39:16 +000011575fi
11576
Michael W. Hudson54241132001-12-07 15:38:26 +000011577
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011578fi
11579
Michael W. Hudson54241132001-12-07 15:38:26 +000011580
Guido van Rossum7f253911997-05-09 02:42:48 +000011581# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11583$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011586if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011587 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011588if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011589then
11590
Matthias Kloseb9621712010-04-24 17:59:49 +000011591$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11594$as_echo "yes" >&6; }
11595else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11596$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011597fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601fi
11602
Guido van Rossum7f253911997-05-09 02:42:48 +000011603
Guido van Rossum7f43da71994-08-01 12:15:30 +000011604# check for --with-libm=...
11605
Guido van Rossum563e7081996-09-10 18:20:48 +000011606case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011607Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011608*) LIBM=-lm
11609esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11611$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011613# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011614if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011616if test "$withval" = no
11617then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11619$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011620elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011621then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11623$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011624else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011625fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011626else
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11628$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629fi
11630
Guido van Rossum7f43da71994-08-01 12:15:30 +000011631
11632# check for --with-libc=...
11633
Matthias Kloseb9621712010-04-24 17:59:49 +000011634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11635$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011637# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011638if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011640if test "$withval" = no
11641then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11643$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011644elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011645then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11647$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011648else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011649fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011650else
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11652$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653fi
11654
Guido van Rossum7f43da71994-08-01 12:15:30 +000011655
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656# **************************************************
11657# * Check for various properties of floating point *
11658# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011659
Matthias Kloseb9621712010-04-24 17:59:49 +000011660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11661$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011662if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011664else
11665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011667 ac_cv_little_endian_double=no
11668else
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011670/* end confdefs.h. */
11671
11672#include <string.h>
11673int main() {
11674 double x = 9006104071832581.0;
11675 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11676 return 0;
11677 else
11678 return 1;
11679}
11680
11681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011682if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011683 ac_cv_little_endian_double=yes
11684else
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011689fi
11690
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011691fi
11692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11694$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695if test "$ac_cv_little_endian_double" = yes
11696then
11697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699
11700fi
11701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11703$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011704if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011706else
11707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011709 ac_cv_big_endian_double=no
11710else
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011712/* end confdefs.h. */
11713
11714#include <string.h>
11715int main() {
11716 double x = 9006104071832581.0;
11717 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11718 return 0;
11719 else
11720 return 1;
11721}
11722
11723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011724if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725 ac_cv_big_endian_double=yes
11726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11730 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731fi
11732
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011733fi
11734
Matthias Kloseb9621712010-04-24 17:59:49 +000011735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11736$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737if test "$ac_cv_big_endian_double" = yes
11738then
11739
Matthias Kloseb9621712010-04-24 17:59:49 +000011740$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741
11742fi
11743
11744# Some ARM platforms use a mixed-endian representation for doubles.
11745# While Python doesn't currently have full support for these platforms
11746# (see e.g., issue 1762561), we can at least make sure that float <-> string
11747# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11749$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011750if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011751 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011752else
11753
Matthias Kloseb9621712010-04-24 17:59:49 +000011754if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011755 ac_cv_mixed_endian_double=no
11756else
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758/* end confdefs.h. */
11759
11760#include <string.h>
11761int main() {
11762 double x = 9006104071832581.0;
11763 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11764 return 0;
11765 else
11766 return 1;
11767}
11768
11769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011770if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011771 ac_cv_mixed_endian_double=yes
11772else
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011777fi
11778
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011779fi
11780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11782$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783if test "$ac_cv_mixed_endian_double" = yes
11784then
11785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787
11788fi
11789
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011790# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011791# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011792# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011793# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011794# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011795# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011796
11797# This inline assembler syntax may also work for suncc and icc,
11798# so we try it on all platforms.
11799
Matthias Kloseb9621712010-04-24 17:59:49 +000011800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11801$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011803/* end confdefs.h. */
11804
11805int
11806main ()
11807{
11808
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011809 unsigned short cw;
11810 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11811 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011812
11813 ;
11814 return 0;
11815}
11816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011817if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011818 have_gcc_asm_for_x87=yes
11819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011821fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11824$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011825if test "$have_gcc_asm_for_x87" = yes
11826then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011829
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011831
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011832# Detect whether system arithmetic is subject to x87-style double
11833# rounding issues. The result of this test has little meaning on non
11834# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11835# mode is round-to-nearest and double rounding issues are present, and
11836# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11838$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011839# $BASECFLAGS may affect the result
11840ac_save_cc="$CC"
11841CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011842if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011843 ac_cv_x87_double_rounding=no
11844else
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011846/* end confdefs.h. */
11847
11848#include <stdlib.h>
11849#include <math.h>
11850int main() {
11851 volatile double x, y, z;
11852 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11853 x = 0.99999999999999989; /* 1-2**-53 */
11854 y = 1./x;
11855 if (y != 1.)
11856 exit(0);
11857 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11858 x = 1e16;
11859 y = 2.99999;
11860 z = x + y;
11861 if (z != 1e16+4.)
11862 exit(0);
11863 /* both tests show evidence of double rounding */
11864 exit(1);
11865}
11866
11867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011868if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011869 ac_cv_x87_double_rounding=no
11870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011875fi
11876
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011877CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11879$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011880if test "$ac_cv_x87_double_rounding" = yes
11881then
11882
Matthias Kloseb9621712010-04-24 17:59:49 +000011883$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011884
11885fi
11886
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011887# ************************************
11888# * Check for mathematical functions *
11889# ************************************
11890
11891LIBS_SAVE=$LIBS
11892LIBS="$LIBS $LIBM"
11893
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011894for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11895do :
11896 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11897ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011898if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011899 cat >>confdefs.h <<_ACEOF
11900#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11901_ACEOF
11902
11903fi
11904done
11905
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011906for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011907do :
11908 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11909ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011910if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011911 cat >>confdefs.h <<_ACEOF
11912#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11913_ACEOF
11914
11915fi
11916done
11917
11918ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11919"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011920if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011921 ac_have_decl=1
11922else
11923 ac_have_decl=0
11924fi
11925
11926cat >>confdefs.h <<_ACEOF
11927#define HAVE_DECL_ISINF $ac_have_decl
11928_ACEOF
11929ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11930"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011931if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011932 ac_have_decl=1
11933else
11934 ac_have_decl=0
11935fi
11936
11937cat >>confdefs.h <<_ACEOF
11938#define HAVE_DECL_ISNAN $ac_have_decl
11939_ACEOF
11940ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11941"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011942if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011943 ac_have_decl=1
11944else
11945 ac_have_decl=0
11946fi
11947
11948cat >>confdefs.h <<_ACEOF
11949#define HAVE_DECL_ISFINITE $ac_have_decl
11950_ACEOF
11951
11952
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011953# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11954# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11956$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020011957if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011959else
11960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011962 ac_cv_tanh_preserves_zero_sign=no
11963else
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011965/* end confdefs.h. */
11966
11967#include <math.h>
11968#include <stdlib.h>
11969int main() {
11970 /* return 0 if either negative zeros don't exist
11971 on this platform or if negative zeros exist
11972 and tanh(-0.) == -0. */
11973 if (atan2(0., -1.) == atan2(-0., -1.) ||
11974 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11975 else exit(1);
11976}
11977
11978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011979if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011980 ac_cv_tanh_preserves_zero_sign=yes
11981else
Matthias Kloseb9621712010-04-24 17:59:49 +000011982 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011983fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11985 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011986fi
11987
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011988fi
11989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11991$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011992if test "$ac_cv_tanh_preserves_zero_sign" = yes
11993then
11994
Matthias Kloseb9621712010-04-24 17:59:49 +000011995$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011996
11997fi
11998
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011999if test "$ac_cv_func_log1p" = yes
12000then
12001 # On some versions of AIX, log1p(-0.) returns 0. instead of
12002 # -0. See issue #9920.
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12004$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012005 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012006 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012007else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012008
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012009 if test "$cross_compiling" = yes; then :
12010 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012011else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12013/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012014
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012015 #include <math.h>
12016 #include <stdlib.h>
12017 int main() {
12018 /* Fail if the signs of log1p(-0.) and -0. can be
12019 distinguished. */
12020 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12021 return 0;
12022 else
12023 return 1;
12024 }
12025
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012026_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012027if ac_fn_c_try_run "$LINENO"; then :
12028 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012029else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012030 ac_cv_log1p_drops_zero_sign=yes
12031fi
12032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12033 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012034fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012035
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012036fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012037
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12039$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12040fi
12041if test "$ac_cv_log1p_drops_zero_sign" = yes
12042then
12043
12044$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12045
12046fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012047
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012048LIBS=$LIBS_SAVE
12049
Mark Dickinsona614f042009-11-28 12:48:43 +000012050# For multiprocessing module, check that sem_open
12051# actually works. For FreeBSD versions <= 7.2,
12052# the kernel module that provides POSIX semaphores
12053# isn't loaded by default, so an attempt to call
12054# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12056$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012057if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012059else
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012061 ac_cv_posix_semaphores_enabled=yes
12062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012064/* end confdefs.h. */
12065
12066#include <unistd.h>
12067#include <fcntl.h>
12068#include <stdio.h>
12069#include <semaphore.h>
12070#include <sys/stat.h>
12071
12072int main(void) {
12073 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12074 if (a == SEM_FAILED) {
12075 perror("sem_open");
12076 return 1;
12077 }
12078 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012079 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012080 return 0;
12081}
12082
12083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012084if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012085 ac_cv_posix_semaphores_enabled=yes
12086else
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12090 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012091fi
12092
12093
Mark Dickinsona614f042009-11-28 12:48:43 +000012094fi
12095
Matthias Kloseb9621712010-04-24 17:59:49 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12097$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012098if test $ac_cv_posix_semaphores_enabled = no
12099then
12100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012102
12103fi
12104
Mark Dickinson10683072009-04-18 21:18:19 +000012105# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12107$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012108if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012110else
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012112 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012113else
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012115/* end confdefs.h. */
12116
12117#include <unistd.h>
12118#include <fcntl.h>
12119#include <stdio.h>
12120#include <semaphore.h>
12121#include <sys/stat.h>
12122
12123int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012124 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012125 int count;
12126 int res;
12127 if(a==SEM_FAILED){
12128 perror("sem_open");
12129 return 1;
12130
12131 }
12132 res = sem_getvalue(a, &count);
12133 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012134 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012135 return res==-1 ? 1 : 0;
12136}
12137
Mark Dickinson10683072009-04-18 21:18:19 +000012138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012139if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012140 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012141else
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012146fi
12147
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012148
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012149fi
12150
Matthias Kloseb9621712010-04-24 17:59:49 +000012151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12152$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012153if test $ac_cv_broken_sem_getvalue = yes
12154then
12155
Matthias Kloseb9621712010-04-24 17:59:49 +000012156$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012157
12158fi
12159
Mark Dickinsonbd792642009-03-18 20:06:12 +000012160# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12162$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012163# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012164if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012165 enableval=$enable_big_digits; case $enable_big_digits in
12166yes)
12167 enable_big_digits=30 ;;
12168no)
12169 enable_big_digits=15 ;;
1217015|30)
12171 ;;
12172*)
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012173 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 +000012174esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12176$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012177
12178cat >>confdefs.h <<_ACEOF
12179#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12180_ACEOF
12181
12182
12183else
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12185$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012186fi
12187
12188
Guido van Rossumef2255b2000-03-10 22:30:29 +000012189# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012190ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012191if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012192
12193
Matthias Kloseb9621712010-04-24 17:59:49 +000012194$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012195
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012196 wchar_h="yes"
12197
Guido van Rossumef2255b2000-03-10 22:30:29 +000012198else
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012200
12201fi
12202
Michael W. Hudson54241132001-12-07 15:38:26 +000012203
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012205# determine wchar_t size
12206if test "$wchar_h" = yes
12207then
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12210# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12211# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12213$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012214if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012216else
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12218"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012219
Martin v. Löwis11437992002-04-12 09:54:03 +000012220else
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 if test "$ac_cv_type_wchar_t" = yes; then
12222 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12223$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012224as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012225See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226 else
12227 ac_cv_sizeof_wchar_t=0
12228 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12233$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012234
12235
12236
Martin v. Löwis11437992002-04-12 09:54:03 +000012237cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012238#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012239_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012240
Michael W. Hudson54241132001-12-07 15:38:26 +000012241
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012242fi
12243
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12245$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012246have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012248/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012249
12250#include <tcl.h>
12251#if TCL_UTF_MAX != 6
12252# error "NOT UCS4_TCL"
12253#endif
12254int
12255main ()
12256{
12257
12258 ;
12259 return 0;
12260}
12261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012263
12264
Matthias Kloseb9621712010-04-24 17:59:49 +000012265$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012266
12267 have_ucs4_tcl=yes
12268
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12272$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012273
Skip Montanaro6dead952003-09-25 14:50:04 +000012274# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012275if test "$wchar_h" = yes
12276then
12277 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12279$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012280 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012282else
12283
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012285 ac_cv_wchar_t_signed=yes
12286else
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012288/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012289
12290 #include <wchar.h>
12291 int main()
12292 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012293 /* Success: exit code 0 */
12294 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012295 }
12296
12297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012298if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012299 ac_cv_wchar_t_signed=yes
12300else
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12304 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012305fi
12306
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012307fi
12308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12310$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311fi
12312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12314$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012315
12316# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012317if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012318 withval=$with_wide_unicode;
12319if test "$withval" != no
12320then unicode_size="4"
12321else unicode_size="2"
12322fi
12323
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012324else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325
Georg Brandl52d168a2008-01-07 18:10:24 +000012326case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012327 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012328 *) unicode_size="2" ;;
12329esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012330
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012331fi
12332
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012333
12334
Georg Brandl52d168a2008-01-07 18:10:24 +000012335case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012336 4)
12337 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12338
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012339 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012340 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012342 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012343esac
12344
Michael W. Hudson54241132001-12-07 15:38:26 +000012345
Martin v. Löwis11437992002-04-12 09:54:03 +000012346
Georg Brandl52d168a2008-01-07 18:10:24 +000012347# wchar_t is only usable if it maps to an unsigned type
12348if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012349 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012350then
12351 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012356
Georg Brandl52d168a2008-01-07 18:10:24 +000012357elif test "$ac_cv_sizeof_short" = "$unicode_size"
12358then
12359 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012361
Georg Brandl52d168a2008-01-07 18:10:24 +000012362elif test "$ac_cv_sizeof_long" = "$unicode_size"
12363then
12364 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012366
Georg Brandl52d168a2008-01-07 18:10:24 +000012367else
12368 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12371$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012372
12373# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12375$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012376if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 ac_cv_c_bigendian=unknown
12380 # See if we're dealing with a universal compiler.
12381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12382/* end confdefs.h. */
12383#ifndef __APPLE_CC__
12384 not a universal capable compiler
12385 #endif
12386 typedef int dummy;
12387
Skip Montanaro6dead952003-09-25 14:50:04 +000012388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012389if ac_fn_c_try_compile "$LINENO"; then :
12390
12391 # Check for potential -arch flags. It is not universal unless
12392 # there are at least two -arch flags with different values.
12393 ac_arch=
12394 ac_prev=
12395 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12396 if test -n "$ac_prev"; then
12397 case $ac_word in
12398 i?86 | x86_64 | ppc | ppc64)
12399 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12400 ac_arch=$ac_word
12401 else
12402 ac_cv_c_bigendian=universal
12403 break
12404 fi
12405 ;;
12406 esac
12407 ac_prev=
12408 elif test "x$ac_word" = "x-arch"; then
12409 ac_prev=arch
12410 fi
12411 done
12412fi
12413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12414 if test $ac_cv_c_bigendian = unknown; then
12415 # See if sys/param.h defines the BYTE_ORDER macro.
12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012417/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012418#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012419 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012420
Martin v. Löwis11437992002-04-12 09:54:03 +000012421int
12422main ()
12423{
Matthias Kloseb9621712010-04-24 17:59:49 +000012424#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12425 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12426 && LITTLE_ENDIAN)
12427 bogus endian macros
12428 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
12430 ;
12431 return 0;
12432}
12433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012434if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012435 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012437/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012438#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012440
Martin v. Löwis11437992002-04-12 09:54:03 +000012441int
12442main ()
12443{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012444#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 not big endian
12446 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
12448 ;
12449 return 0;
12450}
12451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012453 ac_cv_c_bigendian=yes
12454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012458fi
12459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12460 fi
12461 if test $ac_cv_c_bigendian = unknown; then
12462 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012464/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012465#include <limits.h>
12466
Martin v. Löwis11437992002-04-12 09:54:03 +000012467int
12468main ()
12469{
Matthias Kloseb9621712010-04-24 17:59:49 +000012470#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12471 bogus endian macros
12472 #endif
12473
Martin v. Löwis11437992002-04-12 09:54:03 +000012474 ;
12475 return 0;
12476}
12477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012478if ac_fn_c_try_compile "$LINENO"; then :
12479 # It does; now see whether it defined to _BIG_ENDIAN or not.
12480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12481/* end confdefs.h. */
12482#include <limits.h>
12483
12484int
12485main ()
12486{
12487#ifndef _BIG_ENDIAN
12488 not big endian
12489 #endif
12490
12491 ;
12492 return 0;
12493}
12494_ACEOF
12495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012496 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012497else
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12501fi
12502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12503 fi
12504 if test $ac_cv_c_bigendian = unknown; then
12505 # Compile a test program.
12506 if test "$cross_compiling" = yes; then :
12507 # Try to guess by grepping values from an object file.
12508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12509/* end confdefs.h. */
12510short int ascii_mm[] =
12511 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12512 short int ascii_ii[] =
12513 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12514 int use_ascii (int i) {
12515 return ascii_mm[i] + ascii_ii[i];
12516 }
12517 short int ebcdic_ii[] =
12518 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12519 short int ebcdic_mm[] =
12520 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12521 int use_ebcdic (int i) {
12522 return ebcdic_mm[i] + ebcdic_ii[i];
12523 }
12524 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526int
12527main ()
12528{
12529return use_ascii (foo) == use_ebcdic (foo);
12530 ;
12531 return 0;
12532}
12533_ACEOF
12534if ac_fn_c_try_compile "$LINENO"; then :
12535 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12536 ac_cv_c_bigendian=yes
12537 fi
12538 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12539 if test "$ac_cv_c_bigendian" = unknown; then
12540 ac_cv_c_bigendian=no
12541 else
12542 # finding both strings is unlikely to happen, but who knows?
12543 ac_cv_c_bigendian=unknown
12544 fi
12545 fi
12546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012548else
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012550/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012552int
12553main ()
12554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 /* Are we little or big endian? From Harbison&Steele. */
12557 union
12558 {
12559 long int l;
12560 char c[sizeof (long int)];
12561 } u;
12562 u.l = 1;
12563 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564
12565 ;
12566 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012567}
Martin v. Löwis11437992002-04-12 09:54:03 +000012568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012569if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012570 ac_cv_c_bigendian=no
12571else
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12575 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12581$as_echo "$ac_cv_c_bigendian" >&6; }
12582 case $ac_cv_c_bigendian in #(
12583 yes)
12584 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12585;; #(
12586 no)
12587 ;; #(
12588 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012589
Matthias Kloseb9621712010-04-24 17:59:49 +000012590$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012591
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 ;; #(
12593 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012594 as_fn_error $? "unknown endianness
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012595 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012597
Michael W. Hudson54241132001-12-07 15:38:26 +000012598
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012599# ABI version string for Python extension modules. This appears between the
12600# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12601# from the following attributes which affect the ABI of this Python build (in
12602# this order):
12603#
12604# * The Python implementation (always 'cpython-' for us)
12605# * The major and minor version numbers
12606# * --with-pydebug (adds a 'd')
12607# * --with-pymalloc (adds a 'm')
12608# * --with-wide-unicode (adds a 'u')
12609#
12610# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012611# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12612# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012613
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12615$as_echo_n "checking ABIFLAGS... " >&6; }
12616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12617$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12619$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012620SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12622$as_echo "$SOABI" >&6; }
12623
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12625$as_echo_n "checking LDVERSION... " >&6; }
12626LDVERSION='$(VERSION)$(ABIFLAGS)'
12627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12628$as_echo "$LDVERSION" >&6; }
12629
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012630# SO is the extension of shared libraries `(including the dot!)
12631# -- usually .so, .sl on HP-UX, .dll on Cygwin
12632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12633$as_echo_n "checking SO... " >&6; }
12634if test -z "$SO"
12635then
12636 case $ac_sys_system in
12637 hp*|HP*)
12638 case `uname -m` in
12639 ia64) SO=.so;;
12640 *) SO=.sl;;
12641 esac
12642 ;;
12643 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012644 Linux*|GNU*)
12645 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012646 *) SO=.so;;
12647 esac
12648else
12649 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012650 echo
12651 echo '====================================================================='
12652 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012653 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012654 echo '+ Do you really mean to change the extension for shared libraries? +'
12655 echo '+ Continuing in 10 seconds to let you to ponder. +'
12656 echo '+ +'
12657 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012658 sleep 10
12659fi
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12661$as_echo "$SO" >&6; }
12662
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012663# Check whether right shifting a negative integer extends the sign bit
12664# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12666$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012667if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012669else
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012672 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012673else
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012675/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012676
12677int main()
12678{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012679 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012680}
12681
Martin v. Löwis11437992002-04-12 09:54:03 +000012682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012683if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012684 ac_cv_rshift_extends_sign=yes
12685else
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012690fi
12691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692fi
12693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12695$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012696if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012697then
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012700
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012701fi
12702
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012703# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12705$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012706if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012708else
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
Matthias Kloseb9621712010-04-24 17:59:49 +000012710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012711/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012712#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012713int
12714main ()
12715{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012716
12717 FILE *f = fopen("/dev/null", "r");
12718 flockfile(f);
12719 getc_unlocked(f);
12720 funlockfile(f);
12721
Martin v. Löwis11437992002-04-12 09:54:03 +000012722 ;
12723 return 0;
12724}
12725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012727 ac_cv_have_getc_unlocked=yes
12728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 ac_cv_have_getc_unlocked=no
12730fi
12731rm -f core conftest.err conftest.$ac_objext \
12732 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12736$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012737if test "$ac_cv_have_getc_unlocked" = yes
12738then
Martin v. Löwis11437992002-04-12 09:54:03 +000012739
Matthias Kloseb9621712010-04-24 17:59:49 +000012740$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012741
12742fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012743
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012744# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012745# save the value of LIBS so we don't actually link Python with readline
12746LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012747
Gregory P. Smith18820942008-09-07 06:24:49 +000012748# On some systems we need to link readline to a termcap compatible
12749# library. NOTE: Keep the precedence of listed libraries synchronised
12750# with setup.py.
12751py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12753$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012754for py_libtermcap in "" ncursesw ncurses curses termcap; do
12755 if test -z "$py_libtermcap"; then
12756 READLINE_LIBS="-lreadline"
12757 else
12758 READLINE_LIBS="-lreadline -l$py_libtermcap"
12759 fi
12760 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012762/* end confdefs.h. */
12763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012764/* Override any GCC internal prototype to avoid an error.
12765 Use char because int might match the return type of a GCC
12766 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012767#ifdef __cplusplus
12768extern "C"
12769#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012770char readline ();
12771int
12772main ()
12773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012775 ;
12776 return 0;
12777}
12778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012779if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012780 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012782rm -f core conftest.err conftest.$ac_objext \
12783 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012784 if test $py_cv_lib_readline = yes; then
12785 break
12786 fi
12787done
12788# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12789#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012790if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12792$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012793else
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12795$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012798
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012799fi
12800
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012801# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12803$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012804if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012806else
12807 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012808LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012810/* end confdefs.h. */
12811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812/* Override any GCC internal prototype to avoid an error.
12813 Use char because int might match the return type of a GCC
12814 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012815#ifdef __cplusplus
12816extern "C"
12817#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012818char rl_callback_handler_install ();
12819int
12820main ()
12821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012823 ;
12824 return 0;
12825}
12826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012827if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012828 ac_cv_lib_readline_rl_callback_handler_install=yes
12829else
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012832rm -f core conftest.err conftest.$ac_objext \
12833 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012834LIBS=$ac_check_lib_save_LIBS
12835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12837$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012838if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012839
Matthias Kloseb9621712010-04-24 17:59:49 +000012840$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012841
12842fi
12843
12844
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012845# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012847/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012848#include <readline/readline.h>
12849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012850if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012851 have_readline=yes
12852else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012853 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012854
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012855fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012856rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012857if test $have_readline = yes
12858then
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012860/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012861#include <readline/readline.h>
12862
12863_ACEOF
12864if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012866
Matthias Kloseb9621712010-04-24 17:59:49 +000012867$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012868
12869fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012870rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012871
Matthias Kloseb9621712010-04-24 17:59:49 +000012872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012873/* end confdefs.h. */
12874#include <readline/readline.h>
12875
12876_ACEOF
12877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012879
Matthias Kloseb9621712010-04-24 17:59:49 +000012880$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012881
12882fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012883rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012884
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012885fi
12886
Martin v. Löwis0daad592001-09-30 21:09:59 +000012887# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12889$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012890if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012892else
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012894LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898/* Override any GCC internal prototype to avoid an error.
12899 Use char because int might match the return type of a GCC
12900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012901#ifdef __cplusplus
12902extern "C"
12903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012904char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012905int
12906main ()
12907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 ;
12910 return 0;
12911}
12912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012915else
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012918rm -f core conftest.err conftest.$ac_objext \
12919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012920LIBS=$ac_check_lib_save_LIBS
12921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12923$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012924if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012925
Matthias Kloseb9621712010-04-24 17:59:49 +000012926$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012927
Martin v. Löwis0daad592001-09-30 21:09:59 +000012928fi
12929
Michael W. Hudson54241132001-12-07 15:38:26 +000012930
Thomas Wouters89d996e2007-09-08 17:39:28 +000012931# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12933$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012934if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012935 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012936else
12937 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012938LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012940/* end confdefs.h. */
12941
12942/* Override any GCC internal prototype to avoid an error.
12943 Use char because int might match the return type of a GCC
12944 builtin and then its argument prototype would still apply. */
12945#ifdef __cplusplus
12946extern "C"
12947#endif
12948char rl_completion_display_matches_hook ();
12949int
12950main ()
12951{
12952return rl_completion_display_matches_hook ();
12953 ;
12954 return 0;
12955}
12956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012958 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012962rm -f core conftest.err conftest.$ac_objext \
12963 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012964LIBS=$ac_check_lib_save_LIBS
12965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12967$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012968if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012969
Matthias Kloseb9621712010-04-24 17:59:49 +000012970$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012971
12972fi
12973
12974
Martin v. Löwis0daad592001-09-30 21:09:59 +000012975# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12977$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020012978if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012980else
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012982LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986/* Override any GCC internal prototype to avoid an error.
12987 Use char because int might match the return type of a GCC
12988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012989#ifdef __cplusplus
12990extern "C"
12991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012992char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012993int
12994main ()
12995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013006rm -f core conftest.err conftest.$ac_objext \
13007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013008LIBS=$ac_check_lib_save_LIBS
13009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13011$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013012if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013013
Matthias Kloseb9621712010-04-24 17:59:49 +000013014$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013015
Guido van Rossum353ae582001-07-10 16:45:32 +000013016fi
13017
Jack Jansendd19cf82001-12-06 22:36:17 +000013018
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013019# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013021/* end confdefs.h. */
13022#include <readline/readline.h>
13023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013024if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013025 have_readline=yes
13026else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013027 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013028
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013029fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013030rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013031if test $have_readline = yes
13032then
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013034/* end confdefs.h. */
13035#include <readline/readline.h>
13036
13037_ACEOF
13038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013042
13043fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013044rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013045
13046fi
13047
Martin v. Löwis82bca632006-02-10 20:49:30 +000013048# End of readline checks: restore LIBS
13049LIBS=$LIBS_no_readline
13050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13052$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013053if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013055else
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013058 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013061/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013062
13063int main()
13064{
13065 int val1 = nice(1);
13066 if (val1 != -1 && val1 == nice(2))
13067 exit(0);
13068 exit(1);
13069}
13070
Martin v. Löwis11437992002-04-12 09:54:03 +000013071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013073 ac_cv_broken_nice=yes
13074else
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13078 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013079fi
13080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081fi
13082
Matthias Kloseb9621712010-04-24 17:59:49 +000013083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13084$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013085if test "$ac_cv_broken_nice" = yes
13086then
Martin v. Löwis11437992002-04-12 09:54:03 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013089
13090fi
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13093$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013094if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013096else
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013098 ac_cv_broken_poll=no
13099else
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013101/* end confdefs.h. */
13102
13103#include <poll.h>
13104
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013105int main()
13106{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013107 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013108 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013109
13110 close (42);
13111
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013112 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013113 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013114 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013115 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013116 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013117 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013118 return 1;
13119}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013120
13121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013122if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013123 ac_cv_broken_poll=yes
13124else
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013131fi
13132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13134$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013135if test "$ac_cv_broken_poll" = yes
13136then
13137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013139
13140fi
13141
Brett Cannon43802422005-02-10 20:48:03 +000013142# 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 +000013143# (which is not required by ISO C or UNIX spec) and/or if we support
13144# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013145ac_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 +000013146#include <$ac_cv_struct_tm>
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013149if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013150
13151cat >>confdefs.h <<_ACEOF
13152#define HAVE_STRUCT_TM_TM_ZONE 1
13153_ACEOF
13154
13155
13156fi
13157
13158if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13159
Matthias Kloseb9621712010-04-24 17:59:49 +000013160$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013161
13162else
Matthias Kloseb9621712010-04-24 17:59:49 +000013163 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13164"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013165if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013169fi
13170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013172#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173_ACEOF
13174
Matthias Kloseb9621712010-04-24 17:59:49 +000013175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13176$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013177if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013181/* end confdefs.h. */
13182#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183#if !HAVE_DECL_TZNAME
13184extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013185#endif
13186
13187int
13188main ()
13189{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013190return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013191 ;
13192 return 0;
13193}
13194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013195if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013196 ac_cv_var_tzname=yes
13197else
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013200rm -f core conftest.err conftest.$ac_objext \
13201 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13204$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013205 if test $ac_cv_var_tzname = yes; then
13206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013208
13209 fi
13210fi
13211
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013212
Martin v. Löwis1d459062005-03-14 21:23:33 +000013213# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13215$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013216if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013218else
13219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013221 ac_cv_working_tzset=no
13222else
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013224/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013225
13226#include <stdlib.h>
13227#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013228#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013229
13230#if HAVE_TZNAME
13231extern char *tzname[];
13232#endif
13233
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013234int main()
13235{
Brett Cannon18367812003-09-19 00:59:16 +000013236 /* Note that we need to ensure that not only does tzset(3)
13237 do 'something' with localtime, but it works as documented
13238 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013239 This includes making sure that tzname is set properly if
13240 tm->tm_zone does not exist since it is the alternative way
13241 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013242
13243 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013244 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013245 */
13246
Martin v. Löwis1d459062005-03-14 21:23:33 +000013247 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013248 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13249
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013250 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013251 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013252 if (localtime(&groundhogday)->tm_hour != 0)
13253 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013254#if HAVE_TZNAME
13255 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13256 if (strcmp(tzname[0], "UTC") ||
13257 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13258 exit(1);
13259#endif
Brett Cannon18367812003-09-19 00:59:16 +000013260
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013261 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013262 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013263 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013264 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013265#if HAVE_TZNAME
13266 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13267 exit(1);
13268#endif
Brett Cannon18367812003-09-19 00:59:16 +000013269
13270 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13271 tzset();
13272 if (localtime(&groundhogday)->tm_hour != 11)
13273 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013274#if HAVE_TZNAME
13275 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13276 exit(1);
13277#endif
13278
13279#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013280 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13281 exit(1);
13282 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13283 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013284#endif
Brett Cannon18367812003-09-19 00:59:16 +000013285
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013286 exit(0);
13287}
13288
13289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013290if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013291 ac_cv_working_tzset=yes
13292else
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013297fi
13298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013299fi
13300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13302$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013303if test "$ac_cv_working_tzset" = yes
13304then
13305
Matthias Kloseb9621712010-04-24 17:59:49 +000013306$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013307
13308fi
13309
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013310# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13312$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013313if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013317/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013318#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013319int
13320main ()
13321{
13322
13323struct stat st;
13324st.st_mtim.tv_nsec = 1;
13325
13326 ;
13327 return 0;
13328}
13329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013331 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13336fi
13337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13339$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013340if test "$ac_cv_stat_tv_nsec" = yes
13341then
13342
Matthias Kloseb9621712010-04-24 17:59:49 +000013343$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013344
13345fi
13346
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013347# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13349$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013350if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013354/* end confdefs.h. */
13355#include <sys/stat.h>
13356int
13357main ()
13358{
13359
13360struct stat st;
13361st.st_mtimespec.tv_nsec = 1;
13362
13363 ;
13364 return 0;
13365}
13366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013368 ac_cv_stat_tv_nsec2=yes
13369else
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13373fi
13374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13376$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013377if test "$ac_cv_stat_tv_nsec2" = yes
13378then
13379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013381
13382fi
13383
Jack Jansen666b1e72001-10-31 12:11:48 +000013384# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13386$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013387if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013389else
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013391/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013392#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013393int
13394main ()
13395{
Jack Jansen666b1e72001-10-31 12:11:48 +000013396
13397 int rtn;
13398 rtn = mvwdelch(0,0,0);
13399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 ;
13401 return 0;
13402}
13403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013404if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013405 ac_cv_mvwdelch_is_expression=yes
13406else
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13410fi
13411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13413$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013414
13415if test "$ac_cv_mvwdelch_is_expression" = yes
13416then
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013419
13420fi
13421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13423$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013424if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013425 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013426else
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013428/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013429#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013430int
13431main ()
13432{
Jack Jansen666b1e72001-10-31 12:11:48 +000013433
13434 WINDOW *w;
13435 w->_flags = 0;
13436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 ;
13438 return 0;
13439}
13440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013441if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013442 ac_cv_window_has_flags=yes
13443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13447fi
13448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13450$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013451
Jack Jansen666b1e72001-10-31 12:11:48 +000013452
13453if test "$ac_cv_window_has_flags" = yes
13454then
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013457
13458fi
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13461$as_echo_n "checking for is_term_resized... " >&6; }
13462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013463/* end confdefs.h. */
13464#include <curses.h>
13465int
13466main ()
13467{
13468void *x=is_term_resized
13469 ;
13470 return 0;
13471}
13472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013476
Matthias Kloseb159a552010-04-25 21:00:44 +000013477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013478$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13481$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013482
13483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13487$as_echo_n "checking for resize_term... " >&6; }
13488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013489/* end confdefs.h. */
13490#include <curses.h>
13491int
13492main ()
13493{
13494void *x=resize_term
13495 ;
13496 return 0;
13497}
13498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013499if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013502
Matthias Kloseb159a552010-04-25 21:00:44 +000013503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013504$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013505else
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13507$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013508
13509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13513$as_echo_n "checking for resizeterm... " >&6; }
13514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013515/* end confdefs.h. */
13516#include <curses.h>
13517int
13518main ()
13519{
13520void *x=resizeterm
13521 ;
13522 return 0;
13523}
13524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013525if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013528
Matthias Kloseb159a552010-04-25 21:00:44 +000013529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013530$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013531else
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13533$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013534
13535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13539$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013540
13541if test -r /dev/ptmx
13542then
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13544$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013547
Thomas Wouters89f507f2006-12-13 04:49:30 +000013548else
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13550$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013551fi
13552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13554$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013555
13556if test -r /dev/ptc
13557then
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13559$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013562
Thomas Wouters89f507f2006-12-13 04:49:30 +000013563else
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13565$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013566fi
13567
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013568if test "$have_long_long" = yes
13569then
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13571$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013572 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013574else
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013576 ac_cv_have_long_long_format=no
13577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013579/* end confdefs.h. */
13580
13581 #include <stdio.h>
13582 #include <stddef.h>
13583 #include <string.h>
13584
13585 #ifdef HAVE_SYS_TYPES_H
13586 #include <sys/types.h>
13587 #endif
13588
13589 int main()
13590 {
13591 char buffer[256];
13592
13593 if (sprintf(buffer, "%lld", (long long)123) < 0)
13594 return 1;
13595 if (strcmp(buffer, "123"))
13596 return 1;
13597
13598 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13599 return 1;
13600 if (strcmp(buffer, "-123"))
13601 return 1;
13602
13603 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13604 return 1;
13605 if (strcmp(buffer, "123"))
13606 return 1;
13607
13608 return 0;
13609 }
13610
13611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013612if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013613 ac_cv_have_long_long_format=yes
13614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13618 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013619fi
13620
13621
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013622fi
13623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13625$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013626fi
13627
Mark Dickinson89d7d412009-12-31 20:50:59 +000013628if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013629then
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013632
13633fi
13634
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013635if test $ac_sys_system = Darwin
13636then
13637 LIBS="$LIBS -framework CoreFoundation"
13638fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13641$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013642if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013646 ac_cv_have_size_t_format="cross -- assuming yes"
13647
Thomas Wouters477c8d52006-05-27 19:21:47 +000013648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013650/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651
Thomas Wouters477c8d52006-05-27 19:21:47 +000013652#include <stdio.h>
13653#include <stddef.h>
13654#include <string.h>
13655
Christian Heimes2c181612007-12-17 20:04:13 +000013656#ifdef HAVE_SYS_TYPES_H
13657#include <sys/types.h>
13658#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013659
13660#ifdef HAVE_SSIZE_T
13661typedef ssize_t Py_ssize_t;
13662#elif SIZEOF_VOID_P == SIZEOF_LONG
13663typedef long Py_ssize_t;
13664#else
13665typedef int Py_ssize_t;
13666#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013667
Christian Heimes2c181612007-12-17 20:04:13 +000013668int main()
13669{
13670 char buffer[256];
13671
Thomas Wouters477c8d52006-05-27 19:21:47 +000013672 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13673 return 1;
13674
Thomas Wouters89f507f2006-12-13 04:49:30 +000013675 if (strcmp(buffer, "123"))
13676 return 1;
13677
13678 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13679 return 1;
13680
13681 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013682 return 1;
13683
13684 return 0;
13685}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013686
Thomas Wouters477c8d52006-05-27 19:21:47 +000013687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013688if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013689 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013690else
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13694 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013695fi
13696
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13699$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013700if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013703
13704fi
13705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013707#ifdef HAVE_SYS_TYPES_H
13708#include <sys/types.h>
13709#endif
13710#ifdef HAVE_SYS_SOCKET_H
13711#include <sys/socket.h>
13712#endif
13713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013715if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013716
Martin v. Löwis11437992002-04-12 09:54:03 +000013717else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013720
13721fi
13722
Michael W. Hudson54241132001-12-07 15:38:26 +000013723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13725$as_echo_n "checking for broken mbstowcs... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013726if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013728else
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013730 ac_cv_broken_mbstowcs=no
13731else
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013733/* end confdefs.h. */
13734
13735#include<stdlib.h>
13736int main() {
13737 size_t len = -1;
13738 const char *str = "text";
13739 len = mbstowcs(NULL, str, 0);
13740 return (len != 4);
13741}
13742
13743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013744if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013745 ac_cv_broken_mbstowcs=no
13746else
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013749rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13750 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013751fi
13752
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013753fi
13754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13756$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013757if test "$ac_cv_broken_mbstowcs" = yes
13758then
13759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013761
13762fi
13763
Antoine Pitrou042b1282010-08-13 21:15:58 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13765$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013766if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013767 $as_echo_n "(cached) " >&6
13768else
13769 if test "$cross_compiling" = yes; then :
13770 ac_cv_computed_gotos=no
13771else
13772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13773/* end confdefs.h. */
13774
13775int main(int argc, char **argv)
13776{
13777 static void *targets[1] = { &&LABEL1 };
13778 goto LABEL2;
13779LABEL1:
13780 return 0;
13781LABEL2:
13782 goto *targets[0];
13783 return 1;
13784}
13785
13786_ACEOF
13787if ac_fn_c_try_run "$LINENO"; then :
13788 ac_cv_computed_gotos=yes
13789else
13790 ac_cv_computed_gotos=no
13791fi
13792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13793 conftest.$ac_objext conftest.beam conftest.$ac_ext
13794fi
13795
13796fi
13797
13798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13799$as_echo "$ac_cv_computed_gotos" >&6; }
13800if test "$ac_cv_computed_gotos" = yes
13801then
13802
13803$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13804
13805fi
13806
Antoine Pitroub52ec782009-01-25 16:34:23 +000013807# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13809$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013810
13811# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013812if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013813 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013814if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013815then
13816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13820$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013821fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013822if test "$withval" = no
13823then
13824
13825$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13828$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013829fi
13830
Antoine Pitrou042b1282010-08-13 21:15:58 +000013831else
13832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13833$as_echo "no value specified" >&6; }
13834fi
13835
Antoine Pitroub52ec782009-01-25 16:34:23 +000013836
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013837case $ac_sys_system in
13838AIX*)
13839
13840$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13841 ;;
13842esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013843
Michael W. Hudson54241132001-12-07 15:38:26 +000013844
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013845
13846
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013847for h in `(cd $srcdir;echo Python/thread_*.h)`
13848do
13849 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13850done
13851
Michael W. Hudson54241132001-12-07 15:38:26 +000013852
Neal Norwitzd24499d2005-12-18 21:36:39 +000013853SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13855$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013856for dir in $SRCDIRS; do
13857 if test ! -d $dir; then
13858 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013859 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013860done
Matthias Kloseb9621712010-04-24 17:59:49 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13862$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013863
Guido van Rossum627b2d71993-12-24 10:39:16 +000013864# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013865ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013866
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013867ac_config_files="$ac_config_files Modules/ld_so_aix"
13868
Martin v. Löwis11437992002-04-12 09:54:03 +000013869cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013870# This file is a shell script that caches the results of configure
13871# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013872# scripts and configure runs, see configure's option --config-cache.
13873# It is not useful on other systems. If it contains results you don't
13874# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013875#
Martin v. Löwis11437992002-04-12 09:54:03 +000013876# config.status only pays attention to the cache file if you give it
13877# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013878#
Skip Montanaro6dead952003-09-25 14:50:04 +000013879# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013880# loading this file, other *unset* `ac_cv_foo' will be assigned the
13881# following values.
13882
13883_ACEOF
13884
Guido van Rossumf78abae1997-01-21 22:02:36 +000013885# The following way of writing the cache mishandles newlines in values,
13886# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013888# Ultrix sh set writes to stderr and can't be redirected directly,
13889# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890(
13891 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13892 eval ac_val=\$$ac_var
13893 case $ac_val in #(
13894 *${as_nl}*)
13895 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13897$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898 esac
13899 case $ac_var in #(
13900 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13902 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903 esac ;;
13904 esac
13905 done
13906
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13909 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 # `set' does not quote correctly, so add quotes: double-quote
13911 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013913 "s/'/'\\\\''/g;
13914 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 *)
13917 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920 esac |
13921 sort
13922) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13928 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13930 :end' >>confcache
13931if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13932 if test -w "$cache_file"; then
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013933 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13935$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013936 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013937 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13939$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013940 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013941fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013942rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013943
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013944test "x$prefix" = xNONE && prefix=$ac_default_prefix
13945# Let make expand exec_prefix.
13946test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013947
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013948DEFS=-DHAVE_CONFIG_H
13949
Skip Montanaro6dead952003-09-25 14:50:04 +000013950ac_libobjs=
13951ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013952U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013953for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13954 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013955 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13958 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13960 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013961done
13962LIBOBJS=$ac_libobjs
13963
13964LTLIBOBJS=$ac_ltlibobjs
13965
13966
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968
Charles-François Natali54ef40b2011-07-22 23:52:02 +020013969: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013970ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013971ac_clean_files_save=$ac_clean_files
13972ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013973{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13974$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13975as_write_fail=0
13976cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013977#! $SHELL
13978# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013979# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013980# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013981# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013982
Martin v. Löwis11437992002-04-12 09:54:03 +000013983debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013984ac_cs_recheck=false
13985ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987SHELL=\${CONFIG_SHELL-$SHELL}
13988export SHELL
13989_ASEOF
13990cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13991## -------------------- ##
13992## M4sh Initialization. ##
13993## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995# Be more Bourne compatible
13996DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013997if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 emulate sh
13999 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014001 # is contrary to our usage. Disable this feature.
14002 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014003 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014004else
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 case `(set -o) 2>/dev/null` in #(
14006 *posix*) :
14007 set -o posix ;; #(
14008 *) :
14009 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014011fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014012
14013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014as_nl='
14015'
14016export as_nl
14017# Printing a long string crashes Solaris 7 /usr/bin/printf.
14018as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14019as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14020as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14021# Prefer a ksh shell builtin over an external printf program on Solaris,
14022# but without wasting forks for bash or zsh.
14023if test -z "$BASH_VERSION$ZSH_VERSION" \
14024 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14025 as_echo='print -r --'
14026 as_echo_n='print -rn --'
14027elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14028 as_echo='printf %s\n'
14029 as_echo_n='printf %s'
14030else
14031 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14032 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14033 as_echo_n='/usr/ucb/echo -n'
14034 else
14035 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14036 as_echo_n_body='eval
14037 arg=$1;
14038 case $arg in #(
14039 *"$as_nl"*)
14040 expr "X$arg" : "X\\(.*\\)$as_nl";
14041 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14042 esac;
14043 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14044 '
14045 export as_echo_n_body
14046 as_echo_n='sh -c $as_echo_n_body as_echo'
14047 fi
14048 export as_echo_body
14049 as_echo='sh -c $as_echo_body as_echo'
14050fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014051
14052# The user is always right.
14053if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014054 PATH_SEPARATOR=:
14055 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14056 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14057 PATH_SEPARATOR=';'
14058 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014061
14062# IFS
14063# We need space, tab and new line, in precisely that order. Quoting is
14064# there to prevent editors from complaining about space-tab.
14065# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14066# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014067IFS=" "" $as_nl"
14068
14069# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014070case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014071 *[\\/]* ) as_myself=$0 ;;
14072 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014073for as_dir in $PATH
14074do
14075 IFS=$as_save_IFS
14076 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14078 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014079IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081 ;;
14082esac
14083# We did not find ourselves, most probably we were run as `sh COMMAND'
14084# in which case we are not to be found in the path.
14085if test "x$as_myself" = x; then
14086 as_myself=$0
14087fi
14088if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14090 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091fi
14092
Matthias Kloseb9621712010-04-24 17:59:49 +000014093# Unset variables that we do not need and which cause bugs (e.g. in
14094# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14095# suppresses any "Segmentation fault" message there. '((' could
14096# trigger a bug in pdksh 5.2.14.
14097for as_var in BASH_ENV ENV MAIL MAILPATH
14098do eval test x\${$as_var+set} = xset \
14099 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100done
14101PS1='$ '
14102PS2='> '
14103PS4='+ '
14104
14105# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014106LC_ALL=C
14107export LC_ALL
14108LANGUAGE=C
14109export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111# CDPATH.
14112(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14113
14114
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014115# as_fn_error STATUS ERROR [LINENO LOG_FD]
14116# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014117# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14118# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014119# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014120as_fn_error ()
14121{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014122 as_status=$1; test $as_status -eq 0 && as_status=1
14123 if test "$4"; then
14124 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14125 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014127 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 as_fn_exit $as_status
14129} # as_fn_error
14130
14131
14132# as_fn_set_status STATUS
14133# -----------------------
14134# Set $? to STATUS, without forking.
14135as_fn_set_status ()
14136{
14137 return $1
14138} # as_fn_set_status
14139
14140# as_fn_exit STATUS
14141# -----------------
14142# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14143as_fn_exit ()
14144{
14145 set +e
14146 as_fn_set_status $1
14147 exit $1
14148} # as_fn_exit
14149
14150# as_fn_unset VAR
14151# ---------------
14152# Portably unset VAR.
14153as_fn_unset ()
14154{
14155 { eval $1=; unset $1;}
14156}
14157as_unset=as_fn_unset
14158# as_fn_append VAR VALUE
14159# ----------------------
14160# Append the text in VALUE to the end of the definition contained in VAR. Take
14161# advantage of any shell optimizations that allow amortized linear growth over
14162# repeated appends, instead of the typical quadratic growth present in naive
14163# implementations.
14164if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14165 eval 'as_fn_append ()
14166 {
14167 eval $1+=\$2
14168 }'
14169else
14170 as_fn_append ()
14171 {
14172 eval $1=\$$1\$2
14173 }
14174fi # as_fn_append
14175
14176# as_fn_arith ARG...
14177# ------------------
14178# Perform arithmetic evaluation on the ARGs, and store the result in the
14179# global $as_val. Take advantage of shells that can avoid forks. The arguments
14180# must be portable across $(()) and expr.
14181if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14182 eval 'as_fn_arith ()
14183 {
14184 as_val=$(( $* ))
14185 }'
14186else
14187 as_fn_arith ()
14188 {
14189 as_val=`expr "$@" || test $? -eq 1`
14190 }
14191fi # as_fn_arith
14192
14193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194if expr a : '\(a\)' >/dev/null 2>&1 &&
14195 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14196 as_expr=expr
14197else
14198 as_expr=false
14199fi
14200
14201if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14202 as_basename=basename
14203else
14204 as_basename=false
14205fi
14206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14208 as_dirname=dirname
14209else
14210 as_dirname=false
14211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014213as_me=`$as_basename -- "$0" ||
14214$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14215 X"$0" : 'X\(//\)$' \| \
14216 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014217$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218 sed '/^.*\/\([^/][^/]*\)\/*$/{
14219 s//\1/
14220 q
14221 }
14222 /^X\/\(\/\/\)$/{
14223 s//\1/
14224 q
14225 }
14226 /^X\/\(\/\).*/{
14227 s//\1/
14228 q
14229 }
14230 s/.*/./; q'`
14231
Matthias Kloseb9621712010-04-24 17:59:49 +000014232# Avoid depending upon Character Ranges.
14233as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14234as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14235as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14236as_cr_digits='0123456789'
14237as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238
14239ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014240case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 xy) ECHO_C='\c';;
14245 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14246 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247 esac;;
14248*)
14249 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014251
Martin v. Löwis11437992002-04-12 09:54:03 +000014252rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253if test -d conf$$.dir; then
14254 rm -f conf$$.dir/conf$$.file
14255else
14256 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014259if (echo >conf$$.file) 2>/dev/null; then
14260 if ln -s conf$$.file conf$$ 2>/dev/null; then
14261 as_ln_s='ln -s'
14262 # ... but there are two gotchas:
14263 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14264 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14265 # In both cases, we have to default to `cp -p'.
14266 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14267 as_ln_s='cp -p'
14268 elif ln conf$$.file conf$$ 2>/dev/null; then
14269 as_ln_s=ln
14270 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014273else
14274 as_ln_s='cp -p'
14275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014276rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14277rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279
14280# as_fn_mkdir_p
14281# -------------
14282# Create "$as_dir" as a directory, including parents if necessary.
14283as_fn_mkdir_p ()
14284{
14285
14286 case $as_dir in #(
14287 -*) as_dir=./$as_dir;;
14288 esac
14289 test -d "$as_dir" || eval $as_mkdir_p || {
14290 as_dirs=
14291 while :; do
14292 case $as_dir in #(
14293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14294 *) as_qdir=$as_dir;;
14295 esac
14296 as_dirs="'$as_qdir' $as_dirs"
14297 as_dir=`$as_dirname -- "$as_dir" ||
14298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14299 X"$as_dir" : 'X\(//\)[^/]' \| \
14300 X"$as_dir" : 'X\(//\)$' \| \
14301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14302$as_echo X"$as_dir" |
14303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14304 s//\1/
14305 q
14306 }
14307 /^X\(\/\/\)[^/].*/{
14308 s//\1/
14309 q
14310 }
14311 /^X\(\/\/\)$/{
14312 s//\1/
14313 q
14314 }
14315 /^X\(\/\).*/{
14316 s//\1/
14317 q
14318 }
14319 s/.*/./; q'`
14320 test -d "$as_dir" && break
14321 done
14322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014323 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014324
14325
14326} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014327if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014329else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014330 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014331 as_mkdir_p=false
14332fi
14333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334if test -x / >/dev/null 2>&1; then
14335 as_test_x='test -x'
14336else
14337 if ls -dL / >/dev/null 2>&1; then
14338 as_ls_L_option=L
14339 else
14340 as_ls_L_option=
14341 fi
14342 as_test_x='
14343 eval sh -c '\''
14344 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 case $1 in #(
14348 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351 ???[sx]*):;;*)false;;esac;fi
14352 '\'' sh
14353 '
14354fi
14355as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
14357# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014358as_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 +000014359
14360# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014361as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
14363
Martin v. Löwis11437992002-04-12 09:54:03 +000014364exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014365## ----------------------------------- ##
14366## Main body of $CONFIG_STATUS script. ##
14367## ----------------------------------- ##
14368_ASEOF
14369test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14372# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014373# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374# values after options handling.
14375ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014376This file was extended by python $as_me 3.3, which was
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014377generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
14379 CONFIG_FILES = $CONFIG_FILES
14380 CONFIG_HEADERS = $CONFIG_HEADERS
14381 CONFIG_LINKS = $CONFIG_LINKS
14382 CONFIG_COMMANDS = $CONFIG_COMMANDS
14383 $ $0 $@
14384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014385on `(hostname || uname -n) 2>/dev/null | sed 1q`
14386"
14387
Martin v. Löwis11437992002-04-12 09:54:03 +000014388_ACEOF
14389
Matthias Kloseb9621712010-04-24 17:59:49 +000014390case $ac_config_files in *"
14391"*) set x $ac_config_files; shift; ac_config_files=$*;;
14392esac
14393
14394case $ac_config_headers in *"
14395"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14396esac
14397
14398
14399cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014400# Files that config.status was made for.
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014401config_files="$ac_config_files"
14402config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014407ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014408\`$as_me' instantiates files and other configuration actions
14409from templates according to the current configuration. Unless the files
14410and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
Matthias Kloseb9621712010-04-24 17:59:49 +000014412Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
14414 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014416 --config print configuration, then exit
14417 -q, --quiet, --silent
14418 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 -d, --debug don't remove temporary files
14420 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 --file=FILE[:TEMPLATE]
14422 instantiate the configuration file FILE
14423 --header=FILE[:TEMPLATE]
14424 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
14426Configuration files:
14427$config_files
14428
14429Configuration headers:
14430$config_headers
14431
Matthias Kloseb9621712010-04-24 17:59:49 +000014432Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14436ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014437ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014438python config.status 3.3
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014439configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014441
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014442Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014443This config.status script is free software; the Free Software Foundation
14444gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445
14446ac_pwd='$ac_pwd'
14447srcdir='$srcdir'
14448INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014449test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014450_ACEOF
14451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14453# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014454ac_need_defaults=:
14455while test $# != 0
14456do
14457 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014458 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14460 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014461 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014462 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014463 --*=)
14464 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14465 ac_optarg=
14466 ac_shift=:
14467 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014469 ac_option=$1
14470 ac_optarg=$2
14471 ac_shift=shift
14472 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 esac
14474
Skip Montanaro6dead952003-09-25 14:50:04 +000014475 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014477 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14478 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 $as_echo "$ac_cs_version"; exit ;;
14481 --config | --confi | --conf | --con | --co | --c )
14482 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 debug=: ;;
14485 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014486 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 case $ac_optarg in
14488 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014489 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 esac
14491 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ac_need_defaults=false;;
14493 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014494 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 case $ac_optarg in
14496 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14497 esac
14498 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500 --he | --h)
14501 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014502 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014503Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014506 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14507 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14508 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
14510 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014511 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014512Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
14517 esac
14518 shift
14519done
14520
Skip Montanaro6dead952003-09-25 14:50:04 +000014521ac_configure_extra_args=
14522
14523if $ac_cs_silent; then
14524 exec 6>/dev/null
14525 ac_configure_extra_args="$ac_configure_extra_args --silent"
14526fi
14527
14528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014529cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014530if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14532 shift
14533 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14534 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014537fi
14538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541exec 5>>config.log
14542{
14543 echo
14544 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14545## Running $as_me. ##
14546_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555
14556# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014557for ac_config_target in $ac_config_targets
14558do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 case $ac_config_target in
14560 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14561 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14562 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014563 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14564 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14566 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014567 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014568 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014570 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 esac
14572done
14573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574
Martin v. Löwis11437992002-04-12 09:54:03 +000014575# If the user did not use the arguments to specify the items to instantiate,
14576# then the envvar interface is used. Set only those that are not.
14577# We use the long form for the default assignment because of an extremely
14578# bizarre bug on SunOS 4.1.3.
14579if $ac_need_defaults; then
14580 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14581 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14582fi
14583
Skip Montanaro6dead952003-09-25 14:50:04 +000014584# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014586# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587# Hook for its removal unless debugging.
14588# Note that there is a small window in which the directory will not be cleaned:
14589# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014590$debug ||
14591{
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014592 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593 trap 'exit_status=$?
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014594 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014597}
Martin v. Löwis11437992002-04-12 09:54:03 +000014598# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014601 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014602 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014603} ||
14604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605 tmp=./conf$$-$RANDOM
14606 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014607} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
Matthias Kloseb9621712010-04-24 17:59:49 +000014609# Set up the scripts for CONFIG_FILES section.
14610# No need to generate them if there are no CONFIG_FILES.
14611# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014613
Matthias Kloseb9621712010-04-24 17:59:49 +000014614
14615ac_cr=`echo X | tr X '\015'`
14616# On cygwin, bash can eat \r inside `` if the user requested igncr.
14617# But we know of no other shell where ac_cr would be empty at this
14618# point, so we can use a bashism as a fallback.
14619if test "x$ac_cr" = x; then
14620 eval ac_cr=\$\'\\r\'
14621fi
14622ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14623if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014624 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014625else
14626 ac_cs_awk_cr=$ac_cr
14627fi
14628
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014629echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014630_ACEOF
14631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633{
14634 echo "cat >conf$$subs.awk <<_ACEOF" &&
14635 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14636 echo "_ACEOF"
14637} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014638 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14639ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640ac_delim='%!_!# '
14641for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014643 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14646 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647 break
14648 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014649 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650 else
14651 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653done
Matthias Kloseb9621712010-04-24 17:59:49 +000014654rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014657cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014659sed -n '
14660h
14661s/^/S["/; s/!.*/"]=/
14662p
14663g
14664s/^[^!]*!//
14665:repl
14666t repl
14667s/'"$ac_delim"'$//
14668t delim
14669:nl
14670h
14671s/\(.\{148\}\)..*/\1/
14672t more1
14673s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14674p
14675n
14676b repl
14677:more1
14678s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14679p
14680g
14681s/.\{148\}//
14682t nl
14683:delim
14684h
14685s/\(.\{148\}\)..*/\1/
14686t more2
14687s/["\\]/\\&/g; s/^/"/; s/$/"/
14688p
14689b
14690:more2
14691s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14692p
14693g
14694s/.\{148\}//
14695t delim
14696' <conf$$subs.awk | sed '
14697/^[^""]/{
14698 N
14699 s/\n//
14700}
14701' >>$CONFIG_STATUS || ac_write_fail=1
14702rm -f conf$$subs.awk
14703cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14704_ACAWK
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014705cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 for (key in S) S_is_set[key] = 1
14707 FS = ""
14708
14709}
14710{
14711 line = $ 0
14712 nfields = split(line, field, "@")
14713 substed = 0
14714 len = length(field[1])
14715 for (i = 2; i < nfields; i++) {
14716 key = field[i]
14717 keylen = length(key)
14718 if (S_is_set[key]) {
14719 value = S[key]
14720 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14721 len += length(value) + length(field[++i])
14722 substed = 1
14723 } else
14724 len += 1 + keylen
14725 }
14726
14727 print line
14728}
14729
14730_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014732cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14733if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14734 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14735else
14736 cat
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014737fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014738 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014739_ACEOF
14740
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014741# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14742# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743# trailing colons and then remove the whole line if VPATH becomes empty
14744# (actually we leave an empty line to preserve line numbers).
14745if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014746 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14747h
14748s///
14749s/^/:/
14750s/[ ]*$/:/
14751s/:\$(srcdir):/:/g
14752s/:\${srcdir}:/:/g
14753s/:@srcdir@:/:/g
14754s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014756x
14757s/\(=[ ]*\).*/\1/
14758G
14759s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760s/^[^=]*=[ ]*$//
14761}'
14762fi
14763
Matthias Kloseb9621712010-04-24 17:59:49 +000014764cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014765fi # test -n "$CONFIG_FILES"
14766
Matthias Kloseb9621712010-04-24 17:59:49 +000014767# Set up the scripts for CONFIG_HEADERS section.
14768# No need to generate them if there are no CONFIG_HEADERS.
14769# This happens for instance with `./config.status Makefile'.
14770if test -n "$CONFIG_HEADERS"; then
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014771cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014772BEGIN {
14773_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775# Transform confdefs.h into an awk script `defines.awk', embedded as
14776# here-document in config.status, that substitutes the proper values into
14777# config.h.in to produce config.h.
14778
14779# Create a delimiter string that does not exist in confdefs.h, to ease
14780# handling of long lines.
14781ac_delim='%!_!# '
14782for ac_last_try in false false :; do
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014783 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14784 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 break
14786 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014787 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 else
14789 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14790 fi
14791done
14792
14793# For the awk script, D is an array of macro values keyed by name,
14794# likewise P contains macro parameters if any. Preserve backslash
14795# newline sequences.
14796
14797ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14798sed -n '
14799s/.\{148\}/&'"$ac_delim"'/g
14800t rset
14801:rset
14802s/^[ ]*#[ ]*define[ ][ ]*/ /
14803t def
14804d
14805:def
14806s/\\$//
14807t bsnl
14808s/["\\]/\\&/g
14809s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14810D["\1"]=" \3"/p
14811s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14812d
14813:bsnl
14814s/["\\]/\\&/g
14815s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14816D["\1"]=" \3\\\\\\n"\\/p
14817t cont
14818s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14819t cont
14820d
14821:cont
14822n
14823s/.\{148\}/&'"$ac_delim"'/g
14824t clear
14825:clear
14826s/\\$//
14827t bsnlc
14828s/["\\]/\\&/g; s/^/"/; s/$/"/p
14829d
14830:bsnlc
14831s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14832b cont
14833' <confdefs.h | sed '
14834s/'"$ac_delim"'/"\\\
14835"/g' >>$CONFIG_STATUS || ac_write_fail=1
14836
14837cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14838 for (key in D) D_is_set[key] = 1
14839 FS = ""
14840}
14841/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14842 line = \$ 0
14843 split(line, arg, " ")
14844 if (arg[1] == "#") {
14845 defundef = arg[2]
14846 mac1 = arg[3]
14847 } else {
14848 defundef = substr(arg[1], 2)
14849 mac1 = arg[2]
14850 }
14851 split(mac1, mac2, "(") #)
14852 macro = mac2[1]
14853 prefix = substr(line, 1, index(line, defundef) - 1)
14854 if (D_is_set[macro]) {
14855 # Preserve the white space surrounding the "#".
14856 print prefix "define", macro P[macro] D[macro]
14857 next
14858 } else {
14859 # Replace #undef with comments. This is necessary, for example,
14860 # in the case of _POSIX_SOURCE, which is predefined and required
14861 # on some systems where configure will not decide to define it.
14862 if (defundef == "undef") {
14863 print "/*", prefix defundef, macro, "*/"
14864 next
14865 }
14866 }
14867}
14868{ print }
14869_ACAWK
14870_ACEOF
14871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014872 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014873fi # test -n "$CONFIG_HEADERS"
14874
14875
14876eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14877shift
14878for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879do
14880 case $ac_tag in
14881 :[FHLC]) ac_mode=$ac_tag; continue;;
14882 esac
14883 case $ac_mode$ac_tag in
14884 :[FHL]*:*);;
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014885 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886 :[FH]-) ac_tag=-:-;;
14887 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14888 esac
14889 ac_save_IFS=$IFS
14890 IFS=:
14891 set x $ac_tag
14892 IFS=$ac_save_IFS
14893 shift
14894 ac_file=$1
14895 shift
14896
14897 case $ac_mode in
14898 :L) ac_source=$1;;
14899 :[FH])
14900 ac_file_inputs=
14901 for ac_f
14902 do
14903 case $ac_f in
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014904 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905 *) # Look for the file first in the build tree, then in the source tree
14906 # (if the path is not absolute). The absolute path cannot be DOS-style,
14907 # because $ac_f cannot contain `:'.
14908 test -f "$ac_f" ||
14909 case $ac_f in
14910 [\\/$]*) false;;
14911 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14912 esac ||
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014913 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14916 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917 done
14918
14919 # Let's still pretend it is `configure' which instantiates (i.e., don't
14920 # use $as_me), people would be surprised to read:
14921 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 configure_input='Generated from '`
14923 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14924 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925 if test x"$ac_file" != x-; then
14926 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14928$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 # Neutralize special characters interpreted by sed in replacement strings.
14931 case $configure_input in #(
14932 *\&* | *\|* | *\\* )
14933 ac_sed_conf_input=`$as_echo "$configure_input" |
14934 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14935 *) ac_sed_conf_input=$configure_input;;
14936 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937
14938 case $ac_tag in
Charles-François Natali54ef40b2011-07-22 23:52:02 +020014939 *:-:* | *:-) cat >"$tmp/stdin" \
14940 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 esac
14942 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 esac
14944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014946$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014947 X"$ac_file" : 'X\(//\)[^/]' \| \
14948 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014950$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014951 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14952 s//\1/
14953 q
14954 }
14955 /^X\(\/\/\)[^/].*/{
14956 s//\1/
14957 q
14958 }
14959 /^X\(\/\/\)$/{
14960 s//\1/
14961 q
14962 }
14963 /^X\(\/\).*/{
14964 s//\1/
14965 q
14966 }
14967 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014968 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ac_builddir=.
14970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971case "$ac_dir" in
14972.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14973*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977 case $ac_top_builddir_sub in
14978 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14979 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14980 esac ;;
14981esac
14982ac_abs_top_builddir=$ac_pwd
14983ac_abs_builddir=$ac_pwd$ac_dir_suffix
14984# for backward compatibility:
14985ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014986
14987case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014988 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990 ac_top_srcdir=$ac_top_builddir_sub
14991 ac_abs_top_srcdir=$ac_pwd ;;
14992 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994 ac_top_srcdir=$srcdir
14995 ac_abs_top_srcdir=$srcdir ;;
14996 *) # Relative name.
14997 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14998 ac_top_srcdir=$ac_top_build_prefix$srcdir
14999 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015000esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015002
Martin v. Löwis11437992002-04-12 09:54:03 +000015003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 case $ac_mode in
15005 :F)
15006 #
15007 # CONFIG_FILE
15008 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015009
15010 case $INSTALL in
15011 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015014_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015
Matthias Kloseb9621712010-04-24 17:59:49 +000015016cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017# If the template does not know about datarootdir, expand it.
15018# FIXME: This hack should be removed a few years after 2.60.
15019ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015020ac_sed_dataroot='
15021/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022 p
15023 q
15024}
15025/@datadir@/p
15026/@docdir@/p
15027/@infodir@/p
15028/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015029/@mandir@/p'
15030case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031*datarootdir*) ac_datarootdir_seen=yes;;
15032*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15034$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015036cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037 ac_datarootdir_hack='
15038 s&@datadir@&$datadir&g
15039 s&@docdir@&$docdir&g
15040 s&@infodir@&$infodir&g
15041 s&@localedir@&$localedir&g
15042 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044esac
15045_ACEOF
15046
15047# Neutralize VPATH when `$srcdir' = `.'.
15048# Shell code in configure.ac might set extrasub.
15049# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015050cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15051ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015052$extrasub
15053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015054cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015055:t
15056/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015057s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015059s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060s&@srcdir@&$ac_srcdir&;t t
15061s&@abs_srcdir@&$ac_abs_srcdir&;t t
15062s&@top_srcdir@&$ac_top_srcdir&;t t
15063s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15064s&@builddir@&$ac_builddir&;t t
15065s&@abs_builddir@&$ac_abs_builddir&;t t
15066s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15067s&@INSTALL@&$ac_INSTALL&;t t
15068$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015069"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020015070eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15071 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natali54ef40b2011-07-22 23:52:02 +020015074 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15075 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015077which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015078$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015079which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015080
Charles-François Natali54ef40b2011-07-22 23:52:02 +020015081 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 case $ac_file in
Charles-François Natali54ef40b2011-07-22 23:52:02 +020015083 -) cat "$tmp/out" && rm -f "$tmp/out";;
15084 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015085 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015086 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087 ;;
15088 :H)
15089 #
15090 # CONFIG_HEADER
15091 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015093 {
15094 $as_echo "/* $configure_input */" \
Charles-François Natali54ef40b2011-07-22 23:52:02 +020015095 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15096 } >"$tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015097 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natali54ef40b2011-07-22 23:52:02 +020015098 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15100$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 rm -f "$ac_file"
Charles-François Natali54ef40b2011-07-22 23:52:02 +020015103 mv "$tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015104 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 fi
15106 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 $as_echo "/* $configure_input */" \
Charles-François Natali54ef40b2011-07-22 23:52:02 +020015108 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015109 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113
15114 esac
15115
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015116
15117 case $ac_file$ac_mode in
15118 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15119
15120 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121done # for ac_tag
15122
Guido van Rossum627b2d71993-12-24 10:39:16 +000015123
Matthias Kloseb9621712010-04-24 17:59:49 +000015124as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015125_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015126ac_clean_files=$ac_clean_files_save
15127
Matthias Kloseb9621712010-04-24 17:59:49 +000015128test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015129 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015130
Martin v. Löwis11437992002-04-12 09:54:03 +000015131
15132# configure is writing to config.log, and then calls config.status.
15133# config.status does its own redirection, appending to config.log.
15134# Unfortunately, on DOS this fails, as config.log is still kept open
15135# by configure, so config.status won't be able to write to it; its
15136# output is simply discarded. So we exec the FD to /dev/null,
15137# effectively closing config.log, so it can be properly (re)opened and
15138# appended to by config.status. When coming back to configure, we
15139# need to make the FD available again.
15140if test "$no_create" != yes; then
15141 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015142 ac_config_status_args=
15143 test "$silent" = yes &&
15144 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015146 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 exec 5>>config.log
15148 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15149 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015150 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015151fi
15152if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15154$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015155fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015156
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015157
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015158echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015159if test ! -f Modules/Setup
15160then
15161 cp $srcdir/Modules/Setup.dist Modules/Setup
15162fi
15163
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015164echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015165if test ! -f Modules/Setup.local
15166then
15167 echo "# Edit this file for local setup changes" >Modules/Setup.local
15168fi
15169
15170echo "creating Makefile"
15171$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15172 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015173 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015174mv config.c Modules