blob: 056f69ba29642a276788b300e87ae9d6a5243ce0 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $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 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_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 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000627SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000628THREADHEADERS
629UNICODE_OBJS
630LIBC
631LIBM
632HAVE_GETHOSTBYNAME
633HAVE_GETHOSTBYNAME_R
634HAVE_GETHOSTBYNAME_R_3_ARG
635HAVE_GETHOSTBYNAME_R_5_ARG
636HAVE_GETHOSTBYNAME_R_6_ARG
637LIBOBJS
638TRUE
639MACHDEP_OBJS
640DYNLOADFILE
641DLINCLDIR
642THREADOBJ
643LDLAST
644USE_THREAD_MODULE
645SIGNAL_OBJS
646USE_SIGNAL_MODULE
647LIBFFI_INCLUDEDIR
648PKG_CONFIG
649SHLIBS
650CFLAGSFORSHARED
651LINKFORSHARED
652CCSHARED
653BLDSHARED
654LDCXXSHARED
655LDSHARED
656SO
657LIBTOOL_CRUFT
658OTHER_LIBTOOL_OPT
659UNIVERSAL_ARCH_FLAGS
660BASECFLAGS
661OPT
662LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000663MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100667HAS_HG
668HGBRANCH
669HGTAG
670HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400671BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000672SVNVERSION
673ARFLAGS
674AR
675RANLIB
676GNULD
677LINKCC
678RUNSHARED
679INSTSONAME
680LDLIBRARYDIR
681BLDLIBRARY
682DLLLIBRARY
683LDLIBRARY
684LIBRARY
685BUILDEXEEXT
686EGREP
687GREP
688CPP
689MAINCC
690CXX
691OBJEXT
692EXEEXT
693ac_ct_CC
694CPPFLAGS
695LDFLAGS
696CFLAGS
697CC
698EXPORT_MACOSX_DEPLOYMENT_TARGET
699CONFIGURE_MACOSX_DEPLOYMENT_TARGET
700EXTRAMACHDEPPATH
701EXTRAPLATDIR
702SGI_ABI
703MACHDEP
704FRAMEWORKINSTALLAPPSPREFIX
705FRAMEWORKUNIXTOOLSPREFIX
706FRAMEWORKALTINSTALLLAST
707FRAMEWORKALTINSTALLFIRST
708FRAMEWORKINSTALLLAST
709FRAMEWORKINSTALLFIRST
710PYTHONFRAMEWORKINSTALLDIR
711PYTHONFRAMEWORKPREFIX
712PYTHONFRAMEWORKDIR
713PYTHONFRAMEWORKIDENTIFIER
714PYTHONFRAMEWORK
715LIPO_32BIT_FLAGS
716ARCH_RUN_32BIT
717UNIVERSALSDK
718CONFIG_ARGS
719SOVERSION
720VERSION
721target_alias
722host_alias
723build_alias
724LIBS
725ECHO_T
726ECHO_N
727ECHO_C
728DEFS
729mandir
730localedir
731libdir
732psdir
733pdfdir
734dvidir
735htmldir
736infodir
737docdir
738oldincludedir
739includedir
740localstatedir
741sharedstatedir
742sysconfdir
743datadir
744datarootdir
745libexecdir
746sbindir
747bindir
748program_transform_name
749prefix
750exec_prefix
751PACKAGE_URL
752PACKAGE_BUGREPORT
753PACKAGE_STRING
754PACKAGE_VERSION
755PACKAGE_TARNAME
756PACKAGE_NAME
757PATH_SEPARATOR
758SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000759ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000760ac_user_opts='
761enable_option_checking
762enable_universalsdk
763with_universal_archs
764with_framework_name
765enable_framework
766with_gcc
767with_cxx_main
768with_suffix
769enable_shared
770enable_profiling
771with_pydebug
772enable_toolbox_glue
773with_libs
774with_system_expat
775with_system_ffi
776with_dbmliborder
777with_signal_module
778with_dec_threads
779with_threads
780with_thread
781with_pth
782enable_ipv6
783with_doc_strings
784with_tsc
785with_pymalloc
786with_valgrind
787with_wctype_functions
788with_fpectl
789with_libm
790with_libc
791enable_big_digits
792enable_unicode
793'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000794 ac_precious_vars='build_alias
795host_alias
796target_alias
797CC
798CFLAGS
799LDFLAGS
800LIBS
801CPPFLAGS
802CPP'
803
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000806ac_init_help=
807ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000808ac_unrecognized_opts=
809ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810# The variables have the same names as the options, with
811# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000812cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815no_recursion=
816prefix=NONE
817program_prefix=NONE
818program_suffix=NONE
819program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000821site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000824x_includes=NONE
825x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000826
827# Installation directory options.
828# These are left unexpanded so users can "make install exec_prefix=/foo"
829# and all the variables that are supposed to be based on exec_prefix
830# by default will actually change.
831# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000832# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000833bindir='${exec_prefix}/bin'
834sbindir='${exec_prefix}/sbin'
835libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000836datarootdir='${prefix}/share'
837datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838sysconfdir='${prefix}/etc'
839sharedstatedir='${prefix}/com'
840localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841includedir='${prefix}/include'
842oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
844infodir='${datarootdir}/info'
845htmldir='${docdir}'
846dvidir='${docdir}'
847pdfdir='${docdir}'
848psdir='${docdir}'
849libdir='${exec_prefix}/lib'
850localedir='${datarootdir}/locale'
851mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000854ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857 # If the previous option needs an argument, assign it.
858 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000859 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860 ac_prev=
861 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Martin v. Löwiseba40652007-08-30 20:10:57 +0000864 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000865 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
866 *=) ac_optarg= ;;
867 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000868 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Accept the important Cygnus configure options, so we can diagnose typos.
871
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 case $ac_dashdash$ac_option in
873 --)
874 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 -bindir | --bindir | --bindi | --bind | --bin | --bi)
877 ac_prev=bindir ;;
878 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880
881 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886 -cache-file | --cache-file | --cache-fil | --cache-fi \
887 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
888 ac_prev=cache_file ;;
889 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
890 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 cache_file=$ac_optarg ;;
892
893 --config-cache | -C)
894 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895
Martin v. Löwiseba40652007-08-30 20:10:57 +0000896 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000898 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
902 | --dataroo | --dataro | --datar)
903 ac_prev=datarootdir ;;
904 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
905 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
906 datarootdir=$ac_optarg ;;
907
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000909 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000911 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000912 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000913 ac_useropt_orig=$ac_useropt
914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
915 case $ac_user_opts in
916 *"
917"enable_$ac_useropt"
918"*) ;;
919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
920 ac_unrecognized_sep=', ';;
921 esac
922 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000923
924 -docdir | --docdir | --docdi | --doc | --do)
925 ac_prev=docdir ;;
926 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
927 docdir=$ac_optarg ;;
928
929 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
930 ac_prev=dvidir ;;
931 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
932 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
934 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000935 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000937 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000938 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000939 ac_useropt_orig=$ac_useropt
940 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
941 case $ac_user_opts in
942 *"
943"enable_$ac_useropt"
944"*) ;;
945 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
946 ac_unrecognized_sep=', ';;
947 esac
948 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
951 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
952 | --exec | --exe | --ex)
953 ac_prev=exec_prefix ;;
954 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
955 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
956 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
959 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Obsolete; use --with-gas.
961 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 -help | --help | --hel | --he | -h)
964 ac_init_help=long ;;
965 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
966 ac_init_help=recursive ;;
967 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
968 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
970 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
Martin v. Löwiseba40652007-08-30 20:10:57 +0000975 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
976 ac_prev=htmldir ;;
977 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
978 | --ht=*)
979 htmldir=$ac_optarg ;;
980
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981 -includedir | --includedir | --includedi | --included | --include \
982 | --includ | --inclu | --incl | --inc)
983 ac_prev=includedir ;;
984 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
985 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -infodir | --infodir | --infodi | --infod | --info | --inf)
989 ac_prev=infodir ;;
990 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
993 -libdir | --libdir | --libdi | --libd)
994 ac_prev=libdir ;;
995 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997
998 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
999 | --libexe | --libex | --libe)
1000 ac_prev=libexecdir ;;
1001 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1002 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
Martin v. Löwiseba40652007-08-30 20:10:57 +00001005 -localedir | --localedir | --localedi | --localed | --locale)
1006 ac_prev=localedir ;;
1007 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1008 localedir=$ac_optarg ;;
1009
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001011 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 ac_prev=localstatedir ;;
1013 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001014 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1018 ac_prev=mandir ;;
1019 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001023 # Obsolete; use --without-fp.
1024 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 no_create=yes ;;
1029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001030 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1031 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1032 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1035 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1036 | --oldin | --oldi | --old | --ol | --o)
1037 ac_prev=oldincludedir ;;
1038 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1039 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1040 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1044 ac_prev=prefix ;;
1045 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
1048 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1049 | --program-pre | --program-pr | --program-p)
1050 ac_prev=program_prefix ;;
1051 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1052 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054
1055 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1056 | --program-suf | --program-su | --program-s)
1057 ac_prev=program_suffix ;;
1058 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1059 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -program-transform-name | --program-transform-name \
1063 | --program-transform-nam | --program-transform-na \
1064 | --program-transform-n | --program-transform- \
1065 | --program-transform | --program-transfor \
1066 | --program-transfo | --program-transf \
1067 | --program-trans | --program-tran \
1068 | --progr-tra | --program-tr | --program-t)
1069 ac_prev=program_transform_name ;;
1070 -program-transform-name=* | --program-transform-name=* \
1071 | --program-transform-nam=* | --program-transform-na=* \
1072 | --program-transform-n=* | --program-transform-=* \
1073 | --program-transform=* | --program-transfor=* \
1074 | --program-transfo=* | --program-transf=* \
1075 | --program-trans=* | --program-tran=* \
1076 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
Martin v. Löwiseba40652007-08-30 20:10:57 +00001079 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1080 ac_prev=pdfdir ;;
1081 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1082 pdfdir=$ac_optarg ;;
1083
1084 -psdir | --psdir | --psdi | --psd | --ps)
1085 ac_prev=psdir ;;
1086 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1087 psdir=$ac_optarg ;;
1088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1090 | -silent | --silent | --silen | --sile | --sil)
1091 silent=yes ;;
1092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1094 ac_prev=sbindir ;;
1095 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1096 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
1099 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1100 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1101 | --sharedst | --shareds | --shared | --share | --shar \
1102 | --sha | --sh)
1103 ac_prev=sharedstatedir ;;
1104 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1105 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1106 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1107 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110 -site | --site | --sit)
1111 ac_prev=site ;;
1112 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1116 ac_prev=srcdir ;;
1117 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001120 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1121 | --syscon | --sysco | --sysc | --sys | --sy)
1122 ac_prev=sysconfdir ;;
1123 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1124 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1133 verbose=yes ;;
1134
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 -version | --version | --versio | --versi | --vers | -V)
1136 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
1138 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001139 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001141 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001142 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001143 ac_useropt_orig=$ac_useropt
1144 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145 case $ac_user_opts in
1146 *"
1147"with_$ac_useropt"
1148"*) ;;
1149 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1150 ac_unrecognized_sep=', ';;
1151 esac
1152 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
1154 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001155 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001158 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001159 ac_useropt_orig=$ac_useropt
1160 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1161 case $ac_user_opts in
1162 *"
1163"with_$ac_useropt"
1164"*) ;;
1165 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1166 ac_unrecognized_sep=', ';;
1167 esac
1168 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 --x)
1171 # Obsolete; use --with-x.
1172 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
1174 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1175 | --x-incl | --x-inc | --x-in | --x-i)
1176 ac_prev=x_includes ;;
1177 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1178 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
1181 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1182 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1183 ac_prev=x_libraries ;;
1184 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1185 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001188 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1189Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 ;;
1191
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 *=*)
1193 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1194 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001195 case $ac_envvar in #(
1196 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001197 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001198 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001199 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 export $ac_envvar ;;
1201
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001202 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001204 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001206 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001207 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 ;;
1209
1210 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211done
1212
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001215 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216fi
1217
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001218if test -n "$ac_unrecognized_opts"; then
1219 case $enable_option_checking in
1220 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001221 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001222 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1223 esac
1224fi
1225
1226# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1228 datadir sysconfdir sharedstatedir localstatedir includedir \
1229 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1230 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001232 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001233 # Remove trailing slashes.
1234 case $ac_val in
1235 */ )
1236 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1237 eval $ac_var=\$ac_val;;
1238 esac
1239 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001241 [\\/$]* | ?:[\\/]* ) continue;;
1242 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001244 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001245done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001246
Martin v. Löwis11437992002-04-12 09:54:03 +00001247# There might be people who depend on the old broken behavior: `$host'
1248# used to hold the argument of --host etc.
1249# FIXME: To remove some day.
1250build=$build_alias
1251host=$host_alias
1252target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253
Martin v. Löwis11437992002-04-12 09:54:03 +00001254# FIXME: To remove some day.
1255if test "x$host_alias" != x; then
1256 if test "x$build_alias" = x; then
1257 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 elif test "x$build_alias" != "x$host_alias"; then
1259 cross_compiling=yes
1260 fi
1261fi
1262
1263ac_tool_prefix=
1264test -n "$host_alias" && ac_tool_prefix=$host_alias-
1265
1266test "$silent" = yes && exec 6>/dev/null
1267
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268
Martin v. Löwiseba40652007-08-30 20:10:57 +00001269ac_pwd=`pwd` && test -n "$ac_pwd" &&
1270ac_ls_di=`ls -di .` &&
1271ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001272 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001273test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001274 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001275
1276
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277# Find the source files, if location was not specified.
1278if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001280 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001281 ac_confdir=`$as_dirname -- "$as_myself" ||
1282$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1283 X"$as_myself" : 'X\(//\)[^/]' \| \
1284 X"$as_myself" : 'X\(//\)$' \| \
1285 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1286$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1288 s//\1/
1289 q
1290 }
1291 /^X\(\/\/\)[^/].*/{
1292 s//\1/
1293 q
1294 }
1295 /^X\(\/\/\)$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\).*/{
1300 s//\1/
1301 q
1302 }
1303 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001305 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306 srcdir=..
1307 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308else
1309 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001311if test ! -r "$srcdir/$ac_unique_file"; then
1312 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001313 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001315ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1316ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001317 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001318 pwd)`
1319# When building in place, set srcdir=.
1320if test "$ac_abs_confdir" = "$ac_pwd"; then
1321 srcdir=.
1322fi
1323# Remove unnecessary trailing slashes from srcdir.
1324# Double slashes in file names in object file debugging info
1325# mess up M-x gdb in Emacs.
1326case $srcdir in
1327*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1328esac
1329for ac_var in $ac_precious_vars; do
1330 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1331 eval ac_env_${ac_var}_value=\$${ac_var}
1332 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1333 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1334done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001335
Martin v. Löwis11437992002-04-12 09:54:03 +00001336#
1337# Report the --help message.
1338#
1339if test "$ac_init_help" = "long"; then
1340 # Omit some internal or obsolete options to make the list less imposing.
1341 # This message is too long to be a string in the A/UX 3.1 sh.
1342 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001343\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001344
1345Usage: $0 [OPTION]... [VAR=VALUE]...
1346
1347To assign environment variables (e.g., CC, CFLAGS...), specify them as
1348VAR=VALUE. See below for descriptions of some of the useful variables.
1349
1350Defaults for the options are specified in brackets.
1351
1352Configuration:
1353 -h, --help display this help and exit
1354 --help=short display options specific to this package
1355 --help=recursive display the short help of all the included packages
1356 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001357 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001358 --cache-file=FILE cache test results in FILE [disabled]
1359 -C, --config-cache alias for \`--cache-file=config.cache'
1360 -n, --no-create do not create output files
1361 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1362
Martin v. Löwis11437992002-04-12 09:54:03 +00001363Installation directories:
1364 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001365 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001366 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001367 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369By default, \`make install' will install all the files in
1370\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1371an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1372for instance \`--prefix=\$HOME'.
1373
1374For better control, use the options below.
1375
1376Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001377 --bindir=DIR user executables [EPREFIX/bin]
1378 --sbindir=DIR system admin executables [EPREFIX/sbin]
1379 --libexecdir=DIR program executables [EPREFIX/libexec]
1380 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1381 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1382 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1383 --libdir=DIR object code libraries [EPREFIX/lib]
1384 --includedir=DIR C header files [PREFIX/include]
1385 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1386 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1387 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1388 --infodir=DIR info documentation [DATAROOTDIR/info]
1389 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1390 --mandir=DIR man documentation [DATAROOTDIR/man]
1391 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1392 --htmldir=DIR html documentation [DOCDIR]
1393 --dvidir=DIR dvi documentation [DOCDIR]
1394 --pdfdir=DIR pdf documentation [DOCDIR]
1395 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396_ACEOF
1397
1398 cat <<\_ACEOF
1399_ACEOF
1400fi
1401
1402if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001403 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001404 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001405 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 cat <<\_ACEOF
1407
1408Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001409 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1411 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001412 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001413 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --enable-framework[=INSTALLDIR]
1415 Build (MacOSX|Darwin) framework
1416 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001417 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1419 --enable-ipv6 Enable ipv6 (with ipv4) support
1420 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001421 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001422 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001424 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426Optional Packages:
1427 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1428 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001429 --with-universal-archs=ARCH
1430 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001431 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001432 --with-framework-name=FRAMEWORK
1433 specify an alternate name of the framework built
1434 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001436 --with-cxx-main=<compiler>
1437 compile main() and link python executable with C++
1438 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --with-suffix=.exe set executable suffix
1440 --with-pydebug build with Py_DEBUG defined
1441 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001442 --with-system-expat build pyexpat module using an installed expat
1443 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001444 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001445 --with-dbmliborder=db1:db2:...
1446 order to check db backends for dbm. Valid value is a
1447 colon separated string with the backend names
1448 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001449 --with-signal-module disable/enable signal module
1450 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1451 --with(out)-threads[=DIRECTORY]
1452 disable/enable thread support
1453 --with(out)-thread[=DIRECTORY]
1454 deprecated; use --with(out)-threads
1455 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001457 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001459 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --with-fpectl enable SIGFPE catching
1462 --with-libm=STRING math library
1463 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
1465Some influential environment variables:
1466 CC C compiler command
1467 CFLAGS C compiler flags
1468 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1469 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001470 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001471 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001472 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 CPP C preprocessor
1474
1475Use these variables to override the choices made by `configure' or to help
1476it to find libraries and programs with nonstandard names/locations.
1477
Georg Brandl464432d2009-05-20 18:24:08 +00001478Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001479_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001481fi
1482
1483if test "$ac_init_help" = "recursive"; then
1484 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001486 test -d "$ac_dir" ||
1487 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1488 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 ac_builddir=.
1490
Martin v. Löwiseba40652007-08-30 20:10:57 +00001491case "$ac_dir" in
1492.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1493*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001494 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001495 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001496 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497 case $ac_top_builddir_sub in
1498 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1499 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1500 esac ;;
1501esac
1502ac_abs_top_builddir=$ac_pwd
1503ac_abs_builddir=$ac_pwd$ac_dir_suffix
1504# for backward compatibility:
1505ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
1507case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001508 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001510 ac_top_srcdir=$ac_top_builddir_sub
1511 ac_abs_top_srcdir=$ac_pwd ;;
1512 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001514 ac_top_srcdir=$srcdir
1515 ac_abs_top_srcdir=$srcdir ;;
1516 *) # Relative name.
1517 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1518 ac_top_srcdir=$ac_top_build_prefix$srcdir
1519 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001520esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001522
Martin v. Löwiseba40652007-08-30 20:10:57 +00001523 cd "$ac_dir" || { ac_status=$?; continue; }
1524 # Check for guested configure.
1525 if test -f "$ac_srcdir/configure.gnu"; then
1526 echo &&
1527 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1528 elif test -f "$ac_srcdir/configure"; then
1529 echo &&
1530 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001531 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001532 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001533 fi || ac_status=$?
1534 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 done
1536fi
1537
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001539if $ac_init_version; then
1540 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001541python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001542generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001543
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001544Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001545This configure script is free software; the Free Software Foundation
1546gives unlimited permission to copy, distribute and modify it.
1547_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001549fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001550
1551## ------------------------ ##
1552## Autoconf initialization. ##
1553## ------------------------ ##
1554
1555# ac_fn_c_try_compile LINENO
1556# --------------------------
1557# Try to compile conftest.$ac_ext, and return whether this succeeded.
1558ac_fn_c_try_compile ()
1559{
1560 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1561 rm -f conftest.$ac_objext
1562 if { { ac_try="$ac_compile"
1563case "(($ac_try" in
1564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1565 *) ac_try_echo=$ac_try;;
1566esac
1567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1568$as_echo "$ac_try_echo"; } >&5
1569 (eval "$ac_compile") 2>conftest.err
1570 ac_status=$?
1571 if test -s conftest.err; then
1572 grep -v '^ *+' conftest.err >conftest.er1
1573 cat conftest.er1 >&5
1574 mv -f conftest.er1 conftest.err
1575 fi
1576 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1577 test $ac_status = 0; } && {
1578 test -z "$ac_c_werror_flag" ||
1579 test ! -s conftest.err
1580 } && test -s conftest.$ac_objext; then :
1581 ac_retval=0
1582else
1583 $as_echo "$as_me: failed program was:" >&5
1584sed 's/^/| /' conftest.$ac_ext >&5
1585
1586 ac_retval=1
1587fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001588 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001589 as_fn_set_status $ac_retval
1590
1591} # ac_fn_c_try_compile
1592
1593# ac_fn_c_try_cpp LINENO
1594# ----------------------
1595# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1596ac_fn_c_try_cpp ()
1597{
1598 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1599 if { { ac_try="$ac_cpp conftest.$ac_ext"
1600case "(($ac_try" in
1601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1602 *) ac_try_echo=$ac_try;;
1603esac
1604eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1605$as_echo "$ac_try_echo"; } >&5
1606 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1607 ac_status=$?
1608 if test -s conftest.err; then
1609 grep -v '^ *+' conftest.err >conftest.er1
1610 cat conftest.er1 >&5
1611 mv -f conftest.er1 conftest.err
1612 fi
1613 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001614 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001615 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1616 test ! -s conftest.err
1617 }; then :
1618 ac_retval=0
1619else
1620 $as_echo "$as_me: failed program was:" >&5
1621sed 's/^/| /' conftest.$ac_ext >&5
1622
1623 ac_retval=1
1624fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001625 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001626 as_fn_set_status $ac_retval
1627
1628} # ac_fn_c_try_cpp
1629
1630# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1631# -------------------------------------------------------
1632# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1633# the include files in INCLUDES and setting the cache variable VAR
1634# accordingly.
1635ac_fn_c_check_header_mongrel ()
1636{
1637 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001638 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1640$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001641if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001642 $as_echo_n "(cached) " >&6
1643fi
1644eval ac_res=\$$3
1645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1646$as_echo "$ac_res" >&6; }
1647else
1648 # Is the header compilable?
1649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1650$as_echo_n "checking $2 usability... " >&6; }
1651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1652/* end confdefs.h. */
1653$4
1654#include <$2>
1655_ACEOF
1656if ac_fn_c_try_compile "$LINENO"; then :
1657 ac_header_compiler=yes
1658else
1659 ac_header_compiler=no
1660fi
1661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1663$as_echo "$ac_header_compiler" >&6; }
1664
1665# Is the header present?
1666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1667$as_echo_n "checking $2 presence... " >&6; }
1668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1669/* end confdefs.h. */
1670#include <$2>
1671_ACEOF
1672if ac_fn_c_try_cpp "$LINENO"; then :
1673 ac_header_preproc=yes
1674else
1675 ac_header_preproc=no
1676fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001677rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1679$as_echo "$ac_header_preproc" >&6; }
1680
1681# So? What about this header?
1682case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1683 yes:no: )
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1685$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1687$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1688 ;;
1689 no:yes:* )
1690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1691$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1693$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1694 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1695$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1697$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1699$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001700( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001701## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001702## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001703 ) | sed "s/^/$as_me: WARNING: /" >&2
1704 ;;
1705esac
1706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1707$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001708if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001709 $as_echo_n "(cached) " >&6
1710else
1711 eval "$3=\$ac_header_compiler"
1712fi
1713eval ac_res=\$$3
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1715$as_echo "$ac_res" >&6; }
1716fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001718
1719} # ac_fn_c_check_header_mongrel
1720
1721# ac_fn_c_try_run LINENO
1722# ----------------------
1723# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1724# that executables *can* be run.
1725ac_fn_c_try_run ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 if { { ac_try="$ac_link"
1729case "(($ac_try" in
1730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1731 *) ac_try_echo=$ac_try;;
1732esac
1733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1734$as_echo "$ac_try_echo"; } >&5
1735 (eval "$ac_link") 2>&5
1736 ac_status=$?
1737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1738 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1739 { { case "(($ac_try" in
1740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1741 *) ac_try_echo=$ac_try;;
1742esac
1743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1744$as_echo "$ac_try_echo"; } >&5
1745 (eval "$ac_try") 2>&5
1746 ac_status=$?
1747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1748 test $ac_status = 0; }; }; then :
1749 ac_retval=0
1750else
1751 $as_echo "$as_me: program exited with status $ac_status" >&5
1752 $as_echo "$as_me: failed program was:" >&5
1753sed 's/^/| /' conftest.$ac_ext >&5
1754
1755 ac_retval=$ac_status
1756fi
1757 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001758 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001759 as_fn_set_status $ac_retval
1760
1761} # ac_fn_c_try_run
1762
1763# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1764# -------------------------------------------------------
1765# Tests whether HEADER exists and can be compiled using the include files in
1766# INCLUDES, setting the cache variable VAR accordingly.
1767ac_fn_c_check_header_compile ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1771$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001772if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001773 $as_echo_n "(cached) " >&6
1774else
1775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1776/* end confdefs.h. */
1777$4
1778#include <$2>
1779_ACEOF
1780if ac_fn_c_try_compile "$LINENO"; then :
1781 eval "$3=yes"
1782else
1783 eval "$3=no"
1784fi
1785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1786fi
1787eval ac_res=\$$3
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1789$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001790 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001791
1792} # ac_fn_c_check_header_compile
1793
1794# ac_fn_c_try_link LINENO
1795# -----------------------
1796# Try to link conftest.$ac_ext, and return whether this succeeded.
1797ac_fn_c_try_link ()
1798{
1799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1800 rm -f conftest.$ac_objext conftest$ac_exeext
1801 if { { ac_try="$ac_link"
1802case "(($ac_try" in
1803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1804 *) ac_try_echo=$ac_try;;
1805esac
1806eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1807$as_echo "$ac_try_echo"; } >&5
1808 (eval "$ac_link") 2>conftest.err
1809 ac_status=$?
1810 if test -s conftest.err; then
1811 grep -v '^ *+' conftest.err >conftest.er1
1812 cat conftest.er1 >&5
1813 mv -f conftest.er1 conftest.err
1814 fi
1815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1816 test $ac_status = 0; } && {
1817 test -z "$ac_c_werror_flag" ||
1818 test ! -s conftest.err
1819 } && test -s conftest$ac_exeext && {
1820 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001821 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001822 }; then :
1823 ac_retval=0
1824else
1825 $as_echo "$as_me: failed program was:" >&5
1826sed 's/^/| /' conftest.$ac_ext >&5
1827
1828 ac_retval=1
1829fi
1830 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1831 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1832 # interfere with the next link command; also delete a directory that is
1833 # left behind by Apple's compiler. We do this before executing the actions.
1834 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001836 as_fn_set_status $ac_retval
1837
1838} # ac_fn_c_try_link
1839
1840# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1841# -------------------------------------------
1842# Tests whether TYPE exists after having included INCLUDES, setting cache
1843# variable VAR accordingly.
1844ac_fn_c_check_type ()
1845{
1846 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1848$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001849if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001850 $as_echo_n "(cached) " >&6
1851else
1852 eval "$3=no"
1853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1854/* end confdefs.h. */
1855$4
1856int
1857main ()
1858{
1859if (sizeof ($2))
1860 return 0;
1861 ;
1862 return 0;
1863}
1864_ACEOF
1865if ac_fn_c_try_compile "$LINENO"; then :
1866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1867/* end confdefs.h. */
1868$4
1869int
1870main ()
1871{
1872if (sizeof (($2)))
1873 return 0;
1874 ;
1875 return 0;
1876}
1877_ACEOF
1878if ac_fn_c_try_compile "$LINENO"; then :
1879
1880else
1881 eval "$3=yes"
1882fi
1883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1884fi
1885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1886fi
1887eval ac_res=\$$3
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1889$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001890 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001891
1892} # ac_fn_c_check_type
1893
1894# ac_fn_c_find_uintX_t LINENO BITS VAR
1895# ------------------------------------
1896# Finds an unsigned integer type with width BITS, setting cache variable VAR
1897# accordingly.
1898ac_fn_c_find_uintX_t ()
1899{
1900 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1902$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001903if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001904 $as_echo_n "(cached) " >&6
1905else
1906 eval "$3=no"
1907 # Order is important - never check a type that is potentially smaller
1908 # than half of the expected target width.
1909 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1910 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$ac_includes_default
1914int
1915main ()
1916{
1917static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001918test_array [0] = 0;
1919return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001920
1921 ;
1922 return 0;
1923}
1924_ACEOF
1925if ac_fn_c_try_compile "$LINENO"; then :
1926 case $ac_type in #(
1927 uint$2_t) :
1928 eval "$3=yes" ;; #(
1929 *) :
1930 eval "$3=\$ac_type" ;;
1931esac
1932fi
1933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001934 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001935
1936else
1937 break
1938fi
1939 done
1940fi
1941eval ac_res=\$$3
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1943$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001945
1946} # ac_fn_c_find_uintX_t
1947
1948# ac_fn_c_find_intX_t LINENO BITS VAR
1949# -----------------------------------
1950# Finds a signed integer type with width BITS, setting cache variable VAR
1951# accordingly.
1952ac_fn_c_find_intX_t ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1956$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001957if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001958 $as_echo_n "(cached) " >&6
1959else
1960 eval "$3=no"
1961 # Order is important - never check a type that is potentially smaller
1962 # than half of the expected target width.
1963 for ac_type in int$2_t 'int' 'long int' \
1964 'long long int' 'short int' 'signed char'; do
1965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1966/* end confdefs.h. */
1967$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001968 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001969int
1970main ()
1971{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001972static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001973test_array [0] = 0;
1974return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001975
1976 ;
1977 return 0;
1978}
1979_ACEOF
1980if ac_fn_c_try_compile "$LINENO"; then :
1981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982/* end confdefs.h. */
1983$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001984 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001985int
1986main ()
1987{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001988static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001989 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001990test_array [0] = 0;
1991return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001992
1993 ;
1994 return 0;
1995}
1996_ACEOF
1997if ac_fn_c_try_compile "$LINENO"; then :
1998
1999else
2000 case $ac_type in #(
2001 int$2_t) :
2002 eval "$3=yes" ;; #(
2003 *) :
2004 eval "$3=\$ac_type" ;;
2005esac
2006fi
2007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2008fi
2009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002010 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002011
2012else
2013 break
2014fi
2015 done
2016fi
2017eval ac_res=\$$3
2018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2019$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002020 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002021
2022} # ac_fn_c_find_intX_t
2023
2024# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2025# --------------------------------------------
2026# Tries to find the compile-time value of EXPR in a program that includes
2027# INCLUDES, setting VAR accordingly. Returns whether the value could be
2028# computed
2029ac_fn_c_compute_int ()
2030{
2031 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032 if test "$cross_compiling" = yes; then
2033 # Depending upon the size, compute the lo and hi bounds.
2034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$4
2037int
2038main ()
2039{
2040static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002041test_array [0] = 0;
2042return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002043
2044 ;
2045 return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"; then :
2049 ac_lo=0 ac_mid=0
2050 while :; do
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002058test_array [0] = 0;
2059return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_hi=$ac_mid; break
2067else
2068 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2069 if test $ac_lo -le $ac_mid; then
2070 ac_lo= ac_hi=
2071 break
2072 fi
2073 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2074fi
2075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076 done
2077else
2078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2079/* end confdefs.h. */
2080$4
2081int
2082main ()
2083{
2084static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002085test_array [0] = 0;
2086return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002087
2088 ;
2089 return 0;
2090}
2091_ACEOF
2092if ac_fn_c_try_compile "$LINENO"; then :
2093 ac_hi=-1 ac_mid=-1
2094 while :; do
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002102test_array [0] = 0;
2103return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_lo=$ac_mid; break
2111else
2112 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2113 if test $ac_mid -le $ac_hi; then
2114 ac_lo= ac_hi=
2115 break
2116 fi
2117 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2118fi
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 done
2121else
2122 ac_lo= ac_hi=
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127# Binary search between lo and hi bounds.
2128while test "x$ac_lo" != "x$ac_hi"; do
2129 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133int
2134main ()
2135{
2136static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002137test_array [0] = 0;
2138return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_compile "$LINENO"; then :
2145 ac_hi=$ac_mid
2146else
2147 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150done
2151case $ac_lo in #((
2152?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2153'') ac_retval=1 ;;
2154esac
2155 else
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h. */
2158$4
2159static long int longval () { return $2; }
2160static unsigned long int ulongval () { return $2; }
2161#include <stdio.h>
2162#include <stdlib.h>
2163int
2164main ()
2165{
2166
2167 FILE *f = fopen ("conftest.val", "w");
2168 if (! f)
2169 return 1;
2170 if (($2) < 0)
2171 {
2172 long int i = longval ();
2173 if (i != ($2))
2174 return 1;
2175 fprintf (f, "%ld", i);
2176 }
2177 else
2178 {
2179 unsigned long int i = ulongval ();
2180 if (i != ($2))
2181 return 1;
2182 fprintf (f, "%lu", i);
2183 }
2184 /* Do not output a trailing newline, as this causes \r\n confusion
2185 on some platforms. */
2186 return ferror (f) || fclose (f) != 0;
2187
2188 ;
2189 return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_run "$LINENO"; then :
2193 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2194else
2195 ac_retval=1
2196fi
2197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2198 conftest.$ac_objext conftest.beam conftest.$ac_ext
2199rm -f conftest.val
2200
2201 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002202 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002203 as_fn_set_status $ac_retval
2204
2205} # ac_fn_c_compute_int
2206
2207# ac_fn_c_check_func LINENO FUNC VAR
2208# ----------------------------------
2209# Tests whether FUNC exists, setting the cache variable VAR accordingly
2210ac_fn_c_check_func ()
2211{
2212 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2214$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002215if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002216 $as_echo_n "(cached) " >&6
2217else
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219/* end confdefs.h. */
2220/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2221 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2222#define $2 innocuous_$2
2223
2224/* System header to define __stub macros and hopefully few prototypes,
2225 which can conflict with char $2 (); below.
2226 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2227 <limits.h> exists even on freestanding compilers. */
2228
2229#ifdef __STDC__
2230# include <limits.h>
2231#else
2232# include <assert.h>
2233#endif
2234
2235#undef $2
2236
2237/* Override any GCC internal prototype to avoid an error.
2238 Use char because int might match the return type of a GCC
2239 builtin and then its argument prototype would still apply. */
2240#ifdef __cplusplus
2241extern "C"
2242#endif
2243char $2 ();
2244/* The GNU C library defines this for functions which it implements
2245 to always fail with ENOSYS. Some functions are actually named
2246 something starting with __ and the normal name is an alias. */
2247#if defined __stub_$2 || defined __stub___$2
2248choke me
2249#endif
2250
2251int
2252main ()
2253{
2254return $2 ();
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_link "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext \
2265 conftest$ac_exeext conftest.$ac_ext
2266fi
2267eval ac_res=\$$3
2268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2269$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002270 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002271
2272} # ac_fn_c_check_func
2273
2274# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2275# ----------------------------------------------------
2276# Tries to find if the field MEMBER exists in type AGGR, after including
2277# INCLUDES, setting cache variable VAR accordingly.
2278ac_fn_c_check_member ()
2279{
2280 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2282$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002283if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002284 $as_echo_n "(cached) " >&6
2285else
2286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2287/* end confdefs.h. */
2288$5
2289int
2290main ()
2291{
2292static $2 ac_aggr;
2293if (ac_aggr.$3)
2294return 0;
2295 ;
2296 return 0;
2297}
2298_ACEOF
2299if ac_fn_c_try_compile "$LINENO"; then :
2300 eval "$4=yes"
2301else
2302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h. */
2304$5
2305int
2306main ()
2307{
2308static $2 ac_aggr;
2309if (sizeof ac_aggr.$3)
2310return 0;
2311 ;
2312 return 0;
2313}
2314_ACEOF
2315if ac_fn_c_try_compile "$LINENO"; then :
2316 eval "$4=yes"
2317else
2318 eval "$4=no"
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324eval ac_res=\$$4
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2326$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002327 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002328
2329} # ac_fn_c_check_member
2330
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002331# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2332# ---------------------------------------------
2333# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2334# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002335ac_fn_c_check_decl ()
2336{
2337 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002338 as_decl_name=`echo $2|sed 's/ *(.*//'`
2339 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2341$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002342if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002343 $as_echo_n "(cached) " >&6
2344else
2345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h. */
2347$4
2348int
2349main ()
2350{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002351#ifndef $as_decl_name
2352#ifdef __cplusplus
2353 (void) $as_decl_use;
2354#else
2355 (void) $as_decl_name;
2356#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002357#endif
2358
2359 ;
2360 return 0;
2361}
2362_ACEOF
2363if ac_fn_c_try_compile "$LINENO"; then :
2364 eval "$3=yes"
2365else
2366 eval "$3=no"
2367fi
2368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369fi
2370eval ac_res=\$$3
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2372$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002373 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002374
2375} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002376cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002377This file contains any messages produced by compilers while
2378running configure, to aid debugging if configure makes a mistake.
2379
Martin v. Löwis174440b2008-10-03 08:59:41 +00002380It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002381generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383 $ $0 $@
2384
2385_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002386exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002387{
2388cat <<_ASUNAME
2389## --------- ##
2390## Platform. ##
2391## --------- ##
2392
2393hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2394uname -m = `(uname -m) 2>/dev/null || echo unknown`
2395uname -r = `(uname -r) 2>/dev/null || echo unknown`
2396uname -s = `(uname -s) 2>/dev/null || echo unknown`
2397uname -v = `(uname -v) 2>/dev/null || echo unknown`
2398
2399/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2400/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2401
2402/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2403/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2404/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002405/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002406/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2407/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2408/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2409
2410_ASUNAME
2411
2412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2413for as_dir in $PATH
2414do
2415 IFS=$as_save_IFS
2416 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002417 $as_echo "PATH: $as_dir"
2418 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002420
2421} >&5
2422
2423cat >&5 <<_ACEOF
2424
2425
2426## ----------- ##
2427## Core tests. ##
2428## ----------- ##
2429
2430_ACEOF
2431
2432
2433# Keep a trace of the command line.
2434# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002435# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002436# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002437# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002438ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002439ac_configure_args0=
2440ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002441ac_must_keep_next=false
2442for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002443do
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 for ac_arg
2445 do
2446 case $ac_arg in
2447 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2448 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2449 | -silent | --silent | --silen | --sile | --sil)
2450 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002451 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002452 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002453 esac
2454 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002455 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002457 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002459 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002461 case $ac_arg in
2462 *=* | --config-cache | -C | -disable-* | --disable-* \
2463 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2464 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2465 | -with-* | --with-* | -without-* | --without-* | --x)
2466 case "$ac_configure_args0 " in
2467 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2468 esac
2469 ;;
2470 -* ) ac_must_keep_next=true ;;
2471 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002472 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002473 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002474 ;;
2475 esac
2476 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002477done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002478{ ac_configure_args0=; unset ac_configure_args0;}
2479{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002480
2481# When interrupted or exit'd, cleanup temporary files, and complete
2482# config.log. We remove comments because anyway the quotes in there
2483# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002484# WARNING: Use '\'' to represent an apostrophe within the trap.
2485# 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 +00002486trap 'exit_status=$?
2487 # Save into config.log some information that might help in debugging.
2488 {
2489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002491 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002492## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002493## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 echo
2495 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002496(
2497 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2498 eval ac_val=\$$ac_var
2499 case $ac_val in #(
2500 *${as_nl}*)
2501 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002502 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2503$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504 esac
2505 case $ac_var in #(
2506 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002507 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2508 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002509 esac ;;
2510 esac
2511 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002513 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2514 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 "s/'\''/'\''\\\\'\'''\''/g;
2517 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2518 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002519 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002520 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002521 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002522 esac |
2523 sort
2524)
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002526
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002527 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002528## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002529## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 echo
2531 for ac_var in $ac_subst_vars
2532 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533 eval ac_val=\$$ac_var
2534 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002535 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002536 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002537 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 done | sort
2539 echo
2540
2541 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002542 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002544## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 echo
2546 for ac_var in $ac_subst_files
2547 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002548 eval ac_val=\$$ac_var
2549 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002550 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002552 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 done | sort
2554 echo
2555 fi
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002558 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002559## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002560## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 echo
2564 fi
2565 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002566 $as_echo "$as_me: caught signal $ac_signal"
2567 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002569 rm -f core *.core core.conftest.* &&
2570 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002573for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002574 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002575done
2576ac_signal=0
2577
2578# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002580
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002581$as_echo "/* confdefs.h */" > confdefs.h
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583# Predefined preprocessor variables.
2584
2585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_NAME "$PACKAGE_NAME"
2587_ACEOF
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_VERSION "$PACKAGE_VERSION"
2595_ACEOF
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_STRING "$PACKAGE_STRING"
2599_ACEOF
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2603_ACEOF
2604
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_URL "$PACKAGE_URL"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609
2610# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002611# Prefer an explicitly selected file to automatically selected ones.
2612ac_site_file1=NONE
2613ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002614if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002615 # We do not want a PATH search for config.site.
2616 case $CONFIG_SITE in #((
2617 -*) ac_site_file1=./$CONFIG_SITE;;
2618 */*) ac_site_file1=$CONFIG_SITE;;
2619 *) ac_site_file1=./$CONFIG_SITE;;
2620 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002621elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002622 ac_site_file1=$prefix/share/config.site
2623 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002624else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002625 ac_site_file1=$ac_default_prefix/share/config.site
2626 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002628for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002630 test "x$ac_site_file" = xNONE && continue
2631 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2633$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002635 . "$ac_site_file" \
2636 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2638as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002639See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002640 fi
2641done
2642
2643if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002644 # Some versions of bash will fail to source /dev/null (special files
2645 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2646 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2648$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2651 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 esac
2653 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002654else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002655 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2656$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 >$cache_file
2658fi
2659
2660# Check that the precious variables saved in the cache have kept the same
2661# value.
2662ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002663for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2665 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002666 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2667 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 case $ac_old_set,$ac_new_set in
2669 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2671$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 +00002672 ac_cache_corrupted=: ;;
2673 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2675$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 ac_cache_corrupted=: ;;
2677 ,);;
2678 *)
2679 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002680 # differences in whitespace do not lead to failure.
2681 ac_old_val_w=`echo x $ac_old_val`
2682 ac_new_val_w=`echo x $ac_new_val`
2683 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2685$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2686 ac_cache_corrupted=:
2687 else
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2689$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2690 eval $ac_var=\$ac_old_val
2691 fi
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2693$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2695$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 fi;;
2697 esac
2698 # Pass precious variables to config.status.
2699 if test "$ac_new_set" = set; then
2700 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002701 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 *) ac_arg=$ac_var=$ac_new_val ;;
2703 esac
2704 case " $ac_configure_args " in
2705 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002706 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 esac
2708 fi
2709done
2710if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2714$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002715 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002717## -------------------- ##
2718## Main body of script. ##
2719## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002720
Guido van Rossum7f43da71994-08-01 12:15:30 +00002721ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2725ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726
Guido van Rossum627b2d71993-12-24 10:39:16 +00002727
Michael W. Hudson54241132001-12-07 15:38:26 +00002728
Martin v. Löwiseba40652007-08-30 20:10:57 +00002729ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002730
2731
Martin v. Löwis11437992002-04-12 09:54:03 +00002732
Georg Brandlbcd64a32009-03-31 21:45:18 +00002733if test "$prefix" != "/"; then
2734 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2735fi
2736
2737
Martin v. Löwis11437992002-04-12 09:54:03 +00002738
2739
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002740# We don't use PACKAGE_ variables, and they cause conflicts
2741# with other autoconf-based packages that include Python.h
2742grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2743rm confdefs.h
2744mv confdefs.h.new confdefs.h
2745
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002746
Martin v. Löwis174440b2008-10-03 08:59:41 +00002747VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002748
Martin v. Löwis1142de32002-03-29 16:28:31 +00002749
2750SOVERSION=1.0
2751
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002752# The later defininition of _XOPEN_SOURCE disables certain features
2753# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2754
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002755$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002756
2757
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002758# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2759# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2760# them.
2761
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002762$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002763
2764
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002765# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2766# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2767# them.
2768
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002769$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002770
2771
Martin v. Löwisd6320502004-08-12 13:45:08 +00002772# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2773# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2774
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002775$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002776
2777
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002778# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2779# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2780# them.
2781
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002782$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002783
2784
2785
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002786define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002787
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002788# Arguments passed to configure.
2789
2790CONFIG_ARGS="$ac_configure_args"
2791
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2793$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002795if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002797 case $enableval in
2798 yes)
2799 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002800 if test ! -d "${enableval}"
2801 then
2802 enableval=/
2803 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002804 ;;
2805 esac
2806 case $enableval in
2807 no)
2808 UNIVERSALSDK=
2809 enable_universalsdk=
2810 ;;
2811 *)
2812 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002813 if test ! -d "${UNIVERSALSDK}"
2814 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002815 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002816 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002817 ;;
2818 esac
2819
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002820
Ronald Oussoren988117f2006-04-29 11:31:35 +00002821else
2822
2823 UNIVERSALSDK=
2824 enable_universalsdk=
2825
Martin v. Löwiseba40652007-08-30 20:10:57 +00002826fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002827
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002828if test -n "${UNIVERSALSDK}"
2829then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2831$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2834$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002835fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002836
Martin v. Löwiseba40652007-08-30 20:10:57 +00002837
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002838
2839
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002840UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2843$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002844
2845# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002846if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002847 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2849$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002850 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002851 if test "${enable_universalsdk}" ; then
2852 :
2853 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002854 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002855 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002856
2857else
2858
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2860$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002861
2862fi
2863
2864
2865
2866
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002867
2868# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002869if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002870 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002871 if test "${enable_framework}"; then
2872 :
2873 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002874 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002875 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002876 PYTHONFRAMEWORK=${withval}
2877 PYTHONFRAMEWORKDIR=${withval}.framework
2878 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2879
2880else
2881
2882 PYTHONFRAMEWORK=Python
2883 PYTHONFRAMEWORKDIR=Python.framework
2884 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2885
2886fi
2887
Martin v. Löwiseba40652007-08-30 20:10:57 +00002888# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002889if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002890 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002891 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002892 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002893 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002894 esac
2895 case $enableval in
2896 no)
2897 PYTHONFRAMEWORK=
2898 PYTHONFRAMEWORKDIR=no-framework
2899 PYTHONFRAMEWORKPREFIX=
2900 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002901 FRAMEWORKINSTALLFIRST=
2902 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002903 FRAMEWORKALTINSTALLFIRST=
2904 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002905 if test "x${prefix}" = "xNONE"; then
2906 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2907 else
2908 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2909 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002910 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002911 ;;
2912 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002913 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002914 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002915 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002916 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002917 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2918 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002919 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002920
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002921 if test "x${prefix}" = "xNONE" ; then
2922 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002923
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002924 else
2925 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2926 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002927
2928 case "${enableval}" in
2929 /System*)
2930 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2931 if test "${prefix}" = "NONE" ; then
2932 # See below
2933 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2934 fi
2935 ;;
2936
2937 /Library*)
2938 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2939 ;;
2940
2941 */Library/Frameworks)
2942 MDIR="`dirname "${enableval}"`"
2943 MDIR="`dirname "${MDIR}"`"
2944 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2945
2946 if test "${prefix}" = "NONE"; then
2947 # User hasn't specified the
2948 # --prefix option, but wants to install
2949 # the framework in a non-default location,
2950 # ensure that the compatibility links get
2951 # installed relative to that prefix as well
2952 # instead of in /usr/local.
2953 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2954 fi
2955 ;;
2956
2957 *)
2958 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2959 ;;
2960 esac
2961
Jack Jansen127e56e2001-09-11 14:41:54 +00002962 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002963
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002964 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002965 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002966 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002967
Martin v. Löwiseba40652007-08-30 20:10:57 +00002968 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002969
Martin v. Löwiseba40652007-08-30 20:10:57 +00002970 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002971
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002972 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2973
2974 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2975
Jack Jansene578a632001-08-15 01:27:14 +00002976 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002977
Guido van Rossum563e7081996-09-10 18:20:48 +00002978else
Martin v. Löwis11437992002-04-12 09:54:03 +00002979
Jack Jansene578a632001-08-15 01:27:14 +00002980 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002981 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002982 PYTHONFRAMEWORKPREFIX=
2983 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002984 FRAMEWORKINSTALLFIRST=
2985 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002986 FRAMEWORKALTINSTALLFIRST=
2987 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002988 if test "x${prefix}" = "xNONE" ; then
2989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2990 else
2991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2992 fi
Jack Jansene578a632001-08-15 01:27:14 +00002993 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002994
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002995
Martin v. Löwiseba40652007-08-30 20:10:57 +00002996fi
2997
Michael W. Hudson54241132001-12-07 15:38:26 +00002998
2999
3000
3001
Jack Jansene578a632001-08-15 01:27:14 +00003002
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003003
3004
Ronald Oussoren5b787322006-06-06 19:50:24 +00003005
3006
3007
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003008
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003009
Jack Jansene578a632001-08-15 01:27:14 +00003010##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003011## AS_HELP_STRING([--with-dyld],
3012## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003013##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003014# Set name for machine-dependent library files
3015
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3017$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003018if test -z "$MACHDEP"
3019then
Guido van Rossum563e7081996-09-10 18:20:48 +00003020 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003021 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003022 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003023 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003024 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003025 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003026 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003027 ac_md_system=`echo $ac_sys_system |
3028 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3029 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003030 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003031 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003032
Guido van Rossum07397971997-04-29 21:49:50 +00003033 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003034 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003035 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003036 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003037 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003038 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003039 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003040 esac
3041fi
Guido van Rossum91922671997-10-09 20:24:13 +00003042
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003043# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3044# disable features if it is defined, without any means to access these
3045# features as extensions. For these systems, we skip the definition of
3046# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3047# some feature, make sure there is no alternative way to access this
3048# feature. Also, when using wildcards, make sure you have verified the
3049# need for not defining _XOPEN_SOURCE on all systems matching the
3050# wildcard, and that the wildcard does not include future systems
3051# (which may remove their limitations).
3052case $ac_sys_system/$ac_sys_release in
3053 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3054 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003055 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003056 # In addition, Stefan Krah confirms that issue #1244610 exists through
3057 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003058 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003059 define_xopen_source=no
3060 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3061 # also defined. This can be overridden by defining _BSD_SOURCE
3062 # As this has a different meaning on Linux, only define it on OpenBSD
3063
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003064$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003065
3066 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003067 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003068 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3069 # also defined. This can be overridden by defining _BSD_SOURCE
3070 # As this has a different meaning on Linux, only define it on OpenBSD
3071
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003072$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003073
3074 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003075 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3076 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3077 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003078 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003079 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003080 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3081 # request to enable features supported by the standard as a request
3082 # to disable features not supported by the standard. The best way
3083 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3084 # entirely and define __EXTENSIONS__ instead.
3085 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003086 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003087 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3088 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003089 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003090 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003091 define_xopen_source=no;;
3092 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003093 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003094 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003095 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003096 # On FreeBSD 4, the math functions C89 does not cover are never defined
3097 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3098 FreeBSD/4.*)
3099 define_xopen_source=no;;
3100 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3101 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3102 # identifies itself as Darwin/7.*
3103 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3104 # disables platform specific features beyond repair.
3105 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3106 # has no effect, don't bother defining them
3107 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003108 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003109 Darwin/1[0-9].*)
3110 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003111 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3112 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3113 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003114 AIX/4)
3115 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003116 AIX/5)
3117 if test `uname -r` -eq 1; then
3118 define_xopen_source=no
3119 fi
3120 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003121 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3122 # defining NI_NUMERICHOST.
3123 QNX/6.3.2)
3124 define_xopen_source=no
3125 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003126
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003127esac
3128
3129if test $define_xopen_source = yes
3130then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003131
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003132$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003133
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003134
3135 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3136 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3137 # several APIs are not declared. Since this is also needed in some
3138 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003139
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003140$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003141
3142
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003143
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003144$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003145
3146
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003147fi
3148
Guido van Rossum91922671997-10-09 20:24:13 +00003149#
3150# SGI compilers allow the specification of the both the ABI and the
3151# ISA on the command line. Depending on the values of these switches,
3152# different and often incompatable code will be generated.
3153#
3154# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3155# thus supply support for various ABI/ISA combinations. The MACHDEP
3156# variable is also adjusted.
3157#
3158
3159if test ! -z "$SGI_ABI"
3160then
3161 CC="cc $SGI_ABI"
3162 LDFLAGS="$SGI_ABI $LDFLAGS"
3163 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3164fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3166$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003167
Jack Jansen83f898c2002-12-30 22:23:40 +00003168# And add extra plat-mac for darwin
3169
Jack Jansen7b59b422003-03-17 15:44:10 +00003170
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3172$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003173if test -z "$EXTRAPLATDIR"
3174then
3175 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003176 darwin)
3177 EXTRAPLATDIR="\$(PLATMACDIRS)"
3178 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3179 ;;
3180 *)
3181 EXTRAPLATDIR=""
3182 EXTRAMACHDEPPATH=""
3183 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003184 esac
3185fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3187$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003188
Jack Jansen6b08a402004-06-03 12:41:45 +00003189# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3190# it may influence the way we can build extensions, so distutils
3191# needs to check it
3192
Ronald Oussoren988117f2006-04-29 11:31:35 +00003193
Jack Jansen6b08a402004-06-03 12:41:45 +00003194CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003195EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3198$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003199ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3201$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003202
Guido van Rossum627b2d71993-12-24 10:39:16 +00003203# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003204
3205# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3206# for debug/optimization stuff. BASECFLAGS is for flags that are required
3207# just to get things to compile and link. Users are free to override OPT
3208# when running configure or make. The build should not break if they do.
3209# BASECFLAGS should generally not be messed with, however.
3210
3211# XXX shouldn't some/most/all of this code be merged with the stuff later
3212# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3214$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003215
Martin v. Löwiseba40652007-08-30 20:10:57 +00003216# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003217if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003219 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003220 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003221 without_gcc=yes;;
3222 yes) CC=gcc
3223 without_gcc=no;;
3224 *) CC=$withval
3225 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003226 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003227else
Martin v. Löwis11437992002-04-12 09:54:03 +00003228
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003230 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003231 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003232 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003233 case $BE_HOST_CPU in
3234 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003235 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003236 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003237 BASECFLAGS="$BASECFLAGS -export pragma"
3238 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003239 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003240 ;;
3241 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003242 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003243 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003244 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003245 ;;
3246 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003247 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003248 ;;
3249 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003250 AR="\$(srcdir)/Modules/ar_beos"
3251 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003252 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003253 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003254 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003255fi
3256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3258$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003259
Guido van Rossum8b131c51995-03-09 14:10:13 +00003260# If the user switches compilers, we can't believe the cache
3261if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3262then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003263 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003264(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003265fi
3266
Trent Nelson15daa352012-12-13 06:46:39 +00003267if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3268 # Normally, MIPSpro CC treats #error directives as warnings, which means
3269 # a successful exit code is returned (0). This is a problem because IRIX
3270 # has a bunch of system headers with this guard at the top:
3271 #
3272 # #ifndef __c99
3273 # #error This header file is to be used only for c99 mode compilations
3274 # #else
3275 #
3276 # When autoconf tests for such a header, like stdint.h, this happens:
3277 #
3278 # configure:4619: cc -c conftest.c >&5
3279 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3280 # #error directive: This header file is to be used only for c99 mode
3281 # compilations
3282 #
3283 # #error This header file is to be used only for c99 mode compilations
3284 # ^
3285 #
3286 # configure:4619: $? = 0
3287 # configure:4619: result: yes
3288 #
3289 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3290 # warning as an error, which causes cc to return a non-zero result,
3291 # which autoconf can interpret correctly.
3292 CFLAGS="$CFLAGS -diag_error 1035"
3293 # Whilst we're here, we might as well make sure CXX defaults to something
3294 # sensible if we're not using gcc.
3295 if test -z "$CXX"; then
3296 CXX="CC"
3297 fi
3298fi
3299
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003300# If the user set CFLAGS, use this instead of the automatically
3301# determined setting
3302preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003303ac_ext=c
3304ac_cpp='$CPP $CPPFLAGS'
3305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3307ac_compiler_gnu=$ac_cv_c_compiler_gnu
3308if test -n "$ac_tool_prefix"; then
3309 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3310set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3312$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003313if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003314 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003315else
3316 if test -n "$CC"; then
3317 ac_cv_prog_CC="$CC" # Let the user override the test.
3318else
Martin v. Löwis11437992002-04-12 09:54:03 +00003319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3320for as_dir in $PATH
3321do
3322 IFS=$as_save_IFS
3323 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003324 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003325 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003326 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003327 $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 +00003328 break 2
3329 fi
3330done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003331 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003332IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003333
Jack Jansendd19cf82001-12-06 22:36:17 +00003334fi
3335fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003336CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003337if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3339$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003340else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3342$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003343fi
3344
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345
Martin v. Löwis11437992002-04-12 09:54:03 +00003346fi
3347if test -z "$ac_cv_prog_CC"; then
3348 ac_ct_CC=$CC
3349 # Extract the first word of "gcc", so it can be a program name with args.
3350set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3352$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003353if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003354 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003355else
3356 if test -n "$ac_ct_CC"; then
3357 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3358else
3359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3360for as_dir in $PATH
3361do
3362 IFS=$as_save_IFS
3363 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003364 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003365 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003367 $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 +00003368 break 2
3369 fi
3370done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003371 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003373
3374fi
3375fi
3376ac_ct_CC=$ac_cv_prog_ac_ct_CC
3377if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3379$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003383fi
3384
Martin v. Löwiseba40652007-08-30 20:10:57 +00003385 if test "x$ac_ct_CC" = x; then
3386 CC=""
3387 else
3388 case $cross_compiling:$ac_tool_warned in
3389yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003390{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3391$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392ac_tool_warned=yes ;;
3393esac
3394 CC=$ac_ct_CC
3395 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003396else
3397 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003398fi
3399
Jack Jansendd19cf82001-12-06 22:36:17 +00003400if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003401 if test -n "$ac_tool_prefix"; then
3402 # 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 +00003403set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3405$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003406if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003407 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003408else
3409 if test -n "$CC"; then
3410 ac_cv_prog_CC="$CC" # Let the user override the test.
3411else
Martin v. Löwis11437992002-04-12 09:54:03 +00003412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3413for as_dir in $PATH
3414do
3415 IFS=$as_save_IFS
3416 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003417 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003418 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003419 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003420 $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 +00003421 break 2
3422 fi
3423done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003424 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003425IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003426
3427fi
3428fi
3429CC=$ac_cv_prog_CC
3430if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3432$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3435$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003436fi
3437
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003440fi
3441if test -z "$CC"; then
3442 # Extract the first word of "cc", so it can be a program name with args.
3443set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3445$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003446if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003447 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003448else
3449 if test -n "$CC"; then
3450 ac_cv_prog_CC="$CC" # Let the user override the test.
3451else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003452 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3454for as_dir in $PATH
3455do
3456 IFS=$as_save_IFS
3457 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003458 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3461 ac_prog_rejected=yes
3462 continue
3463 fi
3464 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003465 $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 +00003466 break 2
3467 fi
3468done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003469 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003470IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003472if test $ac_prog_rejected = yes; then
3473 # We found a bogon in the path, so make sure we never use it.
3474 set dummy $ac_cv_prog_CC
3475 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003477 # We chose a different compiler from the bogus one.
3478 # However, it has the same basename, so the bogon will be chosen
3479 # first if we set CC to just the basename; use the full file name.
3480 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003481 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003482 fi
3483fi
3484fi
3485fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003486CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003487if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3489$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3492$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003493fi
3494
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495
Martin v. Löwis11437992002-04-12 09:54:03 +00003496fi
3497if test -z "$CC"; then
3498 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003499 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 do
3501 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3502set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3504$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003505if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003506 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003507else
3508 if test -n "$CC"; then
3509 ac_cv_prog_CC="$CC" # Let the user override the test.
3510else
Martin v. Löwis11437992002-04-12 09:54:03 +00003511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3512for as_dir in $PATH
3513do
3514 IFS=$as_save_IFS
3515 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003516 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003517 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003518 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003519 $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 +00003520 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003521 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003522done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003523 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003524IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003525
3526fi
3527fi
3528CC=$ac_cv_prog_CC
3529if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3531$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3534$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003535fi
3536
Martin v. Löwiseba40652007-08-30 20:10:57 +00003537
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 test -n "$CC" && break
3539 done
3540fi
3541if test -z "$CC"; then
3542 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003543 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003544do
3545 # Extract the first word of "$ac_prog", so it can be a program name with args.
3546set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3548$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003549if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003550 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003551else
3552 if test -n "$ac_ct_CC"; then
3553 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3554else
3555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3556for as_dir in $PATH
3557do
3558 IFS=$as_save_IFS
3559 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003560 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003563 $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 +00003564 break 2
3565 fi
3566done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003567 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003568IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003569
Martin v. Löwis11437992002-04-12 09:54:03 +00003570fi
3571fi
3572ac_ct_CC=$ac_cv_prog_ac_ct_CC
3573if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3575$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003576else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3578$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003579fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003580
Martin v. Löwiseba40652007-08-30 20:10:57 +00003581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 test -n "$ac_ct_CC" && break
3583done
Michael W. Hudson54241132001-12-07 15:38:26 +00003584
Martin v. Löwiseba40652007-08-30 20:10:57 +00003585 if test "x$ac_ct_CC" = x; then
3586 CC=""
3587 else
3588 case $cross_compiling:$ac_tool_warned in
3589yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3591$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592ac_tool_warned=yes ;;
3593esac
3594 CC=$ac_ct_CC
3595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003596fi
3597
3598fi
3599
3600
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003601test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003603as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003604See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003605
3606# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3608set X $ac_compile
3609ac_compiler=$2
3610for ac_option in --version -v -V -qversion; do
3611 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003612case "(($ac_try" in
3613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3614 *) ac_try_echo=$ac_try;;
3615esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003616eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3617$as_echo "$ac_try_echo"; } >&5
3618 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003620 if test -s conftest.err; then
3621 sed '10a\
3622... rest of stderr output deleted ...
3623 10q' conftest.err >conftest.er1
3624 cat conftest.er1 >&5
3625 fi
3626 rm -f conftest.er1 conftest.err
3627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3628 test $ac_status = 0; }
3629done
Martin v. Löwis11437992002-04-12 09:54:03 +00003630
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003632/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003633
Martin v. Löwis11437992002-04-12 09:54:03 +00003634int
3635main ()
3636{
3637
3638 ;
3639 return 0;
3640}
3641_ACEOF
3642ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003643ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003644# Try to create an executable without -o first, disregard a.out.
3645# It will help us diagnose broken compilers, and finding out an intuition
3646# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3648$as_echo_n "checking whether the C compiler works... " >&6; }
3649ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3650
3651# The possible output files:
3652ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3653
Martin v. Löwiseba40652007-08-30 20:10:57 +00003654ac_rmfiles=
3655for ac_file in $ac_files
3656do
3657 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003658 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003659 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3660 esac
3661done
3662rm -f $ac_rmfiles
3663
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003664if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003665case "(($ac_try" in
3666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3667 *) ac_try_echo=$ac_try;;
3668esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3670$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003671 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3674 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003675 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3676# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3677# in a Makefile. We should not override ac_cv_exeext if it was cached,
3678# so that the user can short-circuit this test for compilers unknown to
3679# Autoconf.
3680for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003681do
3682 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003684 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003685 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003686 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003687 # We found the default executable, but exeext='' is most
3688 # certainly right.
3689 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003690 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003691 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003692 then :; else
3693 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3694 fi
3695 # We set ac_cv_exeext here because the later test for it is not
3696 # safe: cross compilers may not add the suffix if given an `-o'
3697 # argument, so we may need to know it at that point already.
3698 # Even if this section looks crufty: it has the advantage of
3699 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003700 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003701 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003702 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 esac
3704done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003705test "$ac_cv_exeext" = no && ac_cv_exeext=
3706
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003707else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708 ac_file=''
3709fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003710if test -z "$ac_file"; then :
3711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3712$as_echo "no" >&6; }
3713$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003714sed 's/^/| /' conftest.$ac_ext >&5
3715
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003716{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003718as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003719See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003720else
3721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3722$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003723fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3725$as_echo_n "checking for C compiler default output file name... " >&6; }
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3727$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003728ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003729
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003730rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003731ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3733$as_echo_n "checking for suffix of executables... " >&6; }
3734if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003735case "(($ac_try" in
3736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3737 *) ac_try_echo=$ac_try;;
3738esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003739eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3740$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003741 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3744 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3746# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3747# work properly (i.e., refer to `conftest.exe'), while it won't with
3748# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003749for ac_file in conftest.exe conftest conftest.*; do
3750 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003752 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003754 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 * ) break;;
3756 esac
3757done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003759 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003761as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003762See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003763fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003764rm -f conftest conftest$ac_cv_exeext
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3766$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003767
3768rm -f conftest.$ac_ext
3769EXEEXT=$ac_cv_exeext
3770ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3772/* end confdefs.h. */
3773#include <stdio.h>
3774int
3775main ()
3776{
3777FILE *f = fopen ("conftest.out", "w");
3778 return ferror (f) || fclose (f) != 0;
3779
3780 ;
3781 return 0;
3782}
Skip Montanaro6dead952003-09-25 14:50:04 +00003783_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003784ac_clean_files="$ac_clean_files conftest.out"
3785# Check that the compiler produces executables we can run. If not, either
3786# the compiler is broken, or we cross compile.
3787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3788$as_echo_n "checking whether we are cross compiling... " >&6; }
3789if test "$cross_compiling" != yes; then
3790 { { ac_try="$ac_link"
3791case "(($ac_try" in
3792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3793 *) ac_try_echo=$ac_try;;
3794esac
3795eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3796$as_echo "$ac_try_echo"; } >&5
3797 (eval "$ac_link") 2>&5
3798 ac_status=$?
3799 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3800 test $ac_status = 0; }
3801 if { ac_try='./conftest$ac_cv_exeext'
3802 { { case "(($ac_try" in
3803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3804 *) ac_try_echo=$ac_try;;
3805esac
3806eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3807$as_echo "$ac_try_echo"; } >&5
3808 (eval "$ac_try") 2>&5
3809 ac_status=$?
3810 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3811 test $ac_status = 0; }; }; then
3812 cross_compiling=no
3813 else
3814 if test "$cross_compiling" = maybe; then
3815 cross_compiling=yes
3816 else
3817 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003819as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003820If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01003821See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003822 fi
3823 fi
3824fi
3825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3826$as_echo "$cross_compiling" >&6; }
3827
3828rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3829ac_clean_files=$ac_clean_files_save
3830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3831$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003832if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003833 $as_echo_n "(cached) " >&6
3834else
3835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838int
3839main ()
3840{
3841
3842 ;
3843 return 0;
3844}
3845_ACEOF
3846rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003847if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848case "(($ac_try" in
3849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3850 *) ac_try_echo=$ac_try;;
3851esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3853$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003854 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3857 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858 for ac_file in conftest.o conftest.obj conftest.*; do
3859 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003861 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3863 break;;
3864 esac
3865done
3866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003868sed 's/^/| /' conftest.$ac_ext >&5
3869
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003870{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003872as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01003873See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003874fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003875rm -f conftest.$ac_cv_objext conftest.$ac_ext
3876fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3878$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879OBJEXT=$ac_cv_objext
3880ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3882$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003883if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003884 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
Martin v. Löwis11437992002-04-12 09:54:03 +00003889int
3890main ()
3891{
3892#ifndef __GNUC__
3893 choke me
3894#endif
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003901 ac_compiler_gnu=yes
3902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003903 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003906ac_cv_c_compiler_gnu=$ac_compiler_gnu
3907
3908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3910$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3911if test $ac_compiler_gnu = yes; then
3912 GCC=yes
3913else
3914 GCC=
3915fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003916ac_test_CFLAGS=${CFLAGS+set}
3917ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3919$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003920if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003921 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003922else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 ac_save_c_werror_flag=$ac_c_werror_flag
3924 ac_c_werror_flag=yes
3925 ac_cv_prog_cc_g=no
3926 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003929
Martin v. Löwis11437992002-04-12 09:54:03 +00003930int
3931main ()
3932{
3933
3934 ;
3935 return 0;
3936}
3937_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003939 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003941 CFLAGS=""
3942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003943/* end confdefs.h. */
3944
3945int
3946main ()
3947{
3948
3949 ;
3950 return 0;
3951}
3952_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003953if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003954
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003955else
3956 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003957 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003959/* end confdefs.h. */
3960
3961int
3962main ()
3963{
3964
3965 ;
3966 return 0;
3967}
3968_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003969if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003970 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3977 ac_c_werror_flag=$ac_save_c_werror_flag
3978fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3980$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003981if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003983elif test $ac_cv_prog_cc_g = yes; then
3984 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003985 CFLAGS="-g -O2"
3986 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003987 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988 fi
3989else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003990 if test "$GCC" = yes; then
3991 CFLAGS="-O2"
3992 else
3993 CFLAGS=
3994 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3997$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003998if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003999 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004000else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004002ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004004/* end confdefs.h. */
4005#include <stdarg.h>
4006#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004007struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004008/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4009struct buf { int x; };
4010FILE * (*rcsopen) (struct buf *, struct stat *, int);
4011static char *e (p, i)
4012 char **p;
4013 int i;
4014{
4015 return p[i];
4016}
4017static char *f (char * (*g) (char **, int), char **p, ...)
4018{
4019 char *s;
4020 va_list v;
4021 va_start (v,p);
4022 s = g (p, va_arg (v,int));
4023 va_end (v);
4024 return s;
4025}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004026
4027/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4028 function prototypes and stuff, but not '\xHH' hex character constants.
4029 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004030 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004031 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4032 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004033 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004034int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4035
Martin v. Löwiseba40652007-08-30 20:10:57 +00004036/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4037 inside strings and character constants. */
4038#define FOO(x) 'x'
4039int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4040
Skip Montanaro6dead952003-09-25 14:50:04 +00004041int test (int i, double x);
4042struct s1 {int (*f) (int a);};
4043struct s2 {int (*f) (double a);};
4044int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4045int argc;
4046char **argv;
4047int
4048main ()
4049{
4050return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4051 ;
4052 return 0;
4053}
4054_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004055for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4056 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004057do
4058 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004059 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004060 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004062rm -f core conftest.err conftest.$ac_objext
4063 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004064done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004065rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004066CC=$ac_save_CC
4067
4068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004069# AC_CACHE_VAL
4070case "x$ac_cv_prog_cc_c89" in
4071 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4073$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004074 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4076$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004077 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004078 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4080$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004081esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004082if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004083
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004084fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004085
Martin v. Löwis11437992002-04-12 09:54:03 +00004086ac_ext=c
4087ac_cpp='$CPP $CPPFLAGS'
4088ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4089ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4090ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004092if test ! -z "$preset_cflags"
4093then
4094 CFLAGS=$preset_cflags
4095fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004096
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004097
4098
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4100$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004101
Martin v. Löwiseba40652007-08-30 20:10:57 +00004102# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004103if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004104 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004105
4106 case $withval in
4107 no) with_cxx_main=no
4108 MAINCC='$(CC)';;
4109 yes) with_cxx_main=yes
4110 MAINCC='$(CXX)';;
4111 *) with_cxx_main=yes
4112 MAINCC=$withval
4113 if test -z "$CXX"
4114 then
4115 CXX=$withval
4116 fi;;
4117 esac
4118else
4119
4120 with_cxx_main=no
4121 MAINCC='$(CC)'
4122
Martin v. Löwiseba40652007-08-30 20:10:57 +00004123fi
4124
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4126$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004127
4128preset_cxx="$CXX"
4129if test -z "$CXX"
4130then
4131 case "$CC" in
4132 gcc) # Extract the first word of "g++", so it can be a program name with args.
4133set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4135$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004136if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004137 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004138else
4139 case $CXX in
4140 [\\/]* | ?:[\\/]*)
4141 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4142 ;;
4143 *)
4144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4145for as_dir in notfound
4146do
4147 IFS=$as_save_IFS
4148 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004151 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004153 break 2
4154 fi
4155done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004156 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004157IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004158
4159 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4160 ;;
4161esac
4162fi
4163CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004164if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4166$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4169$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004171
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004172 ;;
4173 cc) # Extract the first word of "c++", so it can be a program name with args.
4174set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004177if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004179else
4180 case $CXX in
4181 [\\/]* | ?:[\\/]*)
4182 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4183 ;;
4184 *)
4185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186for as_dir in notfound
4187do
4188 IFS=$as_save_IFS
4189 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004190 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004191 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004192 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004193 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004194 break 2
4195 fi
4196done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004197 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004199
4200 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4201 ;;
4202esac
4203fi
4204CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004205if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4207$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4210$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004212
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004213 ;;
4214 esac
4215 if test "$CXX" = "notfound"
4216 then
4217 CXX=""
4218 fi
4219fi
4220if test -z "$CXX"
4221then
4222 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4223do
4224 # Extract the first word of "$ac_prog", so it can be a program name with args.
4225set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4227$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004228if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004229 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004230else
4231 if test -n "$CXX"; then
4232 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4233else
4234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4235for as_dir in $PATH
4236do
4237 IFS=$as_save_IFS
4238 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004239 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004240 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004241 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004243 break 2
4244 fi
4245done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004246 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004247IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004248
4249fi
4250fi
4251CXX=$ac_cv_prog_CXX
4252if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4254$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4257$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004258fi
4259
Martin v. Löwiseba40652007-08-30 20:10:57 +00004260
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004261 test -n "$CXX" && break
4262done
4263test -n "$CXX" || CXX="notfound"
4264
4265 if test "$CXX" = "notfound"
4266 then
4267 CXX=""
4268 fi
4269fi
4270if test "$preset_cxx" != "$CXX"
4271then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004273
4274 By default, distutils will build C++ extension modules with \"$CXX\".
4275 If this is not intended, then set CXX on the configure command line.
4276 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004277$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004278
4279 By default, distutils will build C++ extension modules with \"$CXX\".
4280 If this is not intended, then set CXX on the configure command line.
4281 " >&2;}
4282fi
4283
4284
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004285# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004286
4287ac_ext=c
4288ac_cpp='$CPP $CPPFLAGS'
4289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4291ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4293$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004294# On Suns, sometimes $CPP names a directory.
4295if test -n "$CPP" && test -d "$CPP"; then
4296 CPP=
4297fi
4298if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004299 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004300 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004301else
Martin v. Löwis11437992002-04-12 09:54:03 +00004302 # Double quotes because CPP needs to be expanded
4303 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4304 do
4305 ac_preproc_ok=false
4306for ac_c_preproc_warn_flag in '' yes
4307do
4308 # Use a header file that comes with gcc, so configuring glibc
4309 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004310 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4311 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004312 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004313 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004315/* end confdefs.h. */
4316#ifdef __STDC__
4317# include <limits.h>
4318#else
4319# include <assert.h>
4320#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004322_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004323if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004325else
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 # Broken: fails on valid input.
4327continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004328fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004329rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004330
Martin v. Löwiseba40652007-08-30 20:10:57 +00004331 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004335#include <ac_nonexistent.h>
4336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004337if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004338 # Broken: success on invalid input.
4339continue
4340else
Martin v. Löwis11437992002-04-12 09:54:03 +00004341 # Passes both tests.
4342ac_preproc_ok=:
4343break
4344fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004345rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004346
4347done
4348# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004349rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004350if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004351 break
4352fi
4353
4354 done
4355 ac_cv_prog_CPP=$CPP
4356
4357fi
4358 CPP=$ac_cv_prog_CPP
4359else
4360 ac_cv_prog_CPP=$CPP
4361fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4363$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004364ac_preproc_ok=false
4365for ac_c_preproc_warn_flag in '' yes
4366do
4367 # Use a header file that comes with gcc, so configuring glibc
4368 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004369 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4370 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004371 # On the NeXT, cc -E runs the code through the compiler's parser,
4372 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004374/* end confdefs.h. */
4375#ifdef __STDC__
4376# include <limits.h>
4377#else
4378# include <assert.h>
4379#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004380 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004381_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004382if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004384else
Martin v. Löwis11437992002-04-12 09:54:03 +00004385 # Broken: fails on valid input.
4386continue
4387fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004388rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004389
Martin v. Löwiseba40652007-08-30 20:10:57 +00004390 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004391 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004394#include <ac_nonexistent.h>
4395_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004396if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004397 # Broken: success on invalid input.
4398continue
4399else
Martin v. Löwis11437992002-04-12 09:54:03 +00004400 # Passes both tests.
4401ac_preproc_ok=:
4402break
4403fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004404rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004405
4406done
4407# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004408rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004409if $ac_preproc_ok; then :
4410
Martin v. Löwis11437992002-04-12 09:54:03 +00004411else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004412 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004414as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004415See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004416fi
4417
4418ac_ext=c
4419ac_cpp='$CPP $CPPFLAGS'
4420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4422ac_compiler_gnu=$ac_cv_c_compiler_gnu
4423
4424
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4426$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004427if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004428 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004429else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004430 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004431 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004432 # Loop through the user's path and test for each of PROGNAME-LIST
4433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004434for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4435do
4436 IFS=$as_save_IFS
4437 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004438 for ac_prog in grep ggrep; do
4439 for ac_exec_ext in '' $ac_executable_extensions; do
4440 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004441 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004442# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004443 # Check for GNU $ac_path_GREP
4444case `"$ac_path_GREP" --version 2>&1` in
4445*GNU*)
4446 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4447*)
4448 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004449 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004450 while :
4451 do
4452 cat "conftest.in" "conftest.in" >"conftest.tmp"
4453 mv "conftest.tmp" "conftest.in"
4454 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004455 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004456 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4457 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004458 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004459 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4460 # Best one so far, save it but keep looking for a better one
4461 ac_cv_path_GREP="$ac_path_GREP"
4462 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004463 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004464 # 10*(2^10) chars as input seems more than enough
4465 test $ac_count -gt 10 && break
4466 done
4467 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4468esac
4469
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004470 $ac_path_GREP_found && break 3
4471 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004472 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004473 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004474IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004475 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004476 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004477 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004478else
4479 ac_cv_path_GREP=$GREP
4480fi
4481
Martin v. Löwiseba40652007-08-30 20:10:57 +00004482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4484$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004485 GREP="$ac_cv_path_GREP"
4486
4487
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4489$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004490if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004491 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004492else
4493 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4494 then ac_cv_path_EGREP="$GREP -E"
4495 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004496 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004497 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004498 # Loop through the user's path and test for each of PROGNAME-LIST
4499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004500for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4501do
4502 IFS=$as_save_IFS
4503 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004504 for ac_prog in egrep; do
4505 for ac_exec_ext in '' $ac_executable_extensions; do
4506 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004507 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004508# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004509 # Check for GNU $ac_path_EGREP
4510case `"$ac_path_EGREP" --version 2>&1` in
4511*GNU*)
4512 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4513*)
4514 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004515 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004516 while :
4517 do
4518 cat "conftest.in" "conftest.in" >"conftest.tmp"
4519 mv "conftest.tmp" "conftest.in"
4520 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004521 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004522 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4523 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004524 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004525 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4526 # Best one so far, save it but keep looking for a better one
4527 ac_cv_path_EGREP="$ac_path_EGREP"
4528 ac_path_EGREP_max=$ac_count
4529 fi
4530 # 10*(2^10) chars as input seems more than enough
4531 test $ac_count -gt 10 && break
4532 done
4533 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4534esac
4535
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004536 $ac_path_EGREP_found && break 3
4537 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004538 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004539 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004540IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004541 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004542 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004543 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004544else
4545 ac_cv_path_EGREP=$EGREP
4546fi
4547
Martin v. Löwiseba40652007-08-30 20:10:57 +00004548 fi
4549fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4551$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004552 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004553
4554
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4556$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004557if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004558 $as_echo_n "(cached) " >&6
4559else
4560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004561/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004562#include <stdlib.h>
4563#include <stdarg.h>
4564#include <string.h>
4565#include <float.h>
4566
4567int
4568main ()
4569{
4570
4571 ;
4572 return 0;
4573}
4574_ACEOF
4575if ac_fn_c_try_compile "$LINENO"; then :
4576 ac_cv_header_stdc=yes
4577else
4578 ac_cv_header_stdc=no
4579fi
4580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4581
4582if test $ac_cv_header_stdc = yes; then
4583 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4585/* end confdefs.h. */
4586#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004587
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004588_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004590 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004591
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004593 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004594fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004595rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004596
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004597fi
4598
4599if test $ac_cv_header_stdc = yes; then
4600 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4602/* end confdefs.h. */
4603#include <stdlib.h>
4604
4605_ACEOF
4606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4607 $EGREP "free" >/dev/null 2>&1; then :
4608
4609else
4610 ac_cv_header_stdc=no
4611fi
4612rm -f conftest*
4613
4614fi
4615
4616if test $ac_cv_header_stdc = yes; then
4617 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4618 if test "$cross_compiling" = yes; then :
4619 :
4620else
4621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4622/* end confdefs.h. */
4623#include <ctype.h>
4624#include <stdlib.h>
4625#if ((' ' & 0x0FF) == 0x020)
4626# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4627# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4628#else
4629# define ISLOWER(c) \
4630 (('a' <= (c) && (c) <= 'i') \
4631 || ('j' <= (c) && (c) <= 'r') \
4632 || ('s' <= (c) && (c) <= 'z'))
4633# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4634#endif
4635
4636#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4637int
4638main ()
4639{
4640 int i;
4641 for (i = 0; i < 256; i++)
4642 if (XOR (islower (i), ISLOWER (i))
4643 || toupper (i) != TOUPPER (i))
4644 return 2;
4645 return 0;
4646}
4647_ACEOF
4648if ac_fn_c_try_run "$LINENO"; then :
4649
4650else
4651 ac_cv_header_stdc=no
4652fi
4653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4654 conftest.$ac_objext conftest.beam conftest.$ac_ext
4655fi
4656
4657fi
4658fi
4659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4660$as_echo "$ac_cv_header_stdc" >&6; }
4661if test $ac_cv_header_stdc = yes; then
4662
4663$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4664
4665fi
4666
4667# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4668for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4669 inttypes.h stdint.h unistd.h
4670do :
4671 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4672ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4673"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004674if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004675 cat >>confdefs.h <<_ACEOF
4676#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4677_ACEOF
4678
4679fi
4680
4681done
4682
4683
4684
4685 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01004686if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004687 MINIX=yes
4688else
4689 MINIX=
4690fi
4691
4692
4693 if test "$MINIX" = yes; then
4694
4695$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4696
4697
4698$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4699
4700
4701$as_echo "#define _MINIX 1" >>confdefs.h
4702
4703 fi
4704
4705
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4707$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004708if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004709 $as_echo_n "(cached) " >&6
4710else
4711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4712/* end confdefs.h. */
4713
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004714# define __EXTENSIONS__ 1
4715 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004716int
4717main ()
4718{
4719
4720 ;
4721 return 0;
4722}
4723_ACEOF
4724if ac_fn_c_try_compile "$LINENO"; then :
4725 ac_cv_safe_to_define___extensions__=yes
4726else
4727 ac_cv_safe_to_define___extensions__=no
4728fi
4729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4730fi
4731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4732$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4733 test $ac_cv_safe_to_define___extensions__ = yes &&
4734 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4735
4736 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4737
4738 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4739
4740 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4741
4742 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4743
4744
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004745
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004746# Check for unsupported systems
4747case $ac_sys_system/$ac_sys_release in
4748atheos*|Linux*/1*)
4749 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4750 echo See README for details.
4751 exit 1;;
4752esac
4753
4754
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4756$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004757
4758# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004759if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004760 withval=$with_suffix;
4761 case $withval in
4762 no) EXEEXT=;;
4763 yes) EXEEXT=.exe;;
4764 *) EXEEXT=$withval;;
4765 esac
4766fi
4767
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4769$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004770
4771# Test whether we're running on a non-case-sensitive system, in which
4772# case we give a warning if no ext is given
4773
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4775$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004776if test ! -d CaseSensitiveTestDir; then
4777mkdir CaseSensitiveTestDir
4778fi
4779
4780if test -d casesensitivetestdir
4781then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4783$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004784 BUILDEXEEXT=.exe
4785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4787$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004788 BUILDEXEEXT=$EXEEXT
4789fi
4790rmdir CaseSensitiveTestDir
4791
4792case $MACHDEP in
4793bsdos*)
4794 case $CC in
4795 gcc) CC="$CC -D_HAVE_BSDI";;
4796 esac;;
4797esac
4798
4799case $ac_sys_system in
4800hp*|HP*)
4801 case $CC in
4802 cc|*/cc) CC="$CC -Ae";;
4803 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004804SunOS*)
4805 # Some functions have a prototype only with that define, e.g. confstr
4806
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004807$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004808
4809 ;;
4810esac
4811
4812
4813
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4815$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004816if test -z "$LIBRARY"
4817then
4818 LIBRARY='libpython$(VERSION).a'
4819fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4821$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004822
4823# LDLIBRARY is the name of the library to link against (as opposed to the
4824# name of the library into which to insert object files). BLDLIBRARY is also
4825# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4826# is blank as the main program is not linked directly against LDLIBRARY.
4827# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4828# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4829# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4830# DLLLIBRARY is the shared (i.e., DLL) library.
4831#
4832# RUNSHARED is used to run shared python without installed libraries
4833#
4834# INSTSONAME is the name of the shared library that will be use to install
4835# on the system - some systems like version suffix, others don't
4836
4837
4838
4839
4840
4841
4842LDLIBRARY="$LIBRARY"
4843BLDLIBRARY='$(LDLIBRARY)'
4844INSTSONAME='$(LDLIBRARY)'
4845DLLLIBRARY=''
4846LDLIBRARYDIR=''
4847RUNSHARED=''
4848
4849# LINKCC is the command that links the python executable -- default is $(CC).
4850# If CXX is set, and if it is needed to link a main function that was
4851# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4852# python might then depend on the C++ runtime
4853# This is altered for AIX in order to build the export list before
4854# linking.
4855
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4857$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004858if test -z "$LINKCC"
4859then
4860 LINKCC='$(PURIFY) $(MAINCC)'
4861 case $ac_sys_system in
4862 AIX*)
4863 exp_extra="\"\""
4864 if test $ac_sys_release -ge 5 -o \
4865 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4866 exp_extra="."
4867 fi
4868 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004869 QNX*)
4870 # qcc must be used because the other compilers do not
4871 # support -N.
4872 LINKCC=qcc;;
4873 esac
4874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4876$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004877
4878# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4879# make sure we default having it set to "no": this is used by
4880# distutils.unixccompiler to know if it should add --enable-new-dtags
4881# to linker command lines, and failing to detect GNU ld simply results
4882# in the same bahaviour as before.
4883
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4885$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004886ac_prog=ld
4887if test "$GCC" = yes; then
4888 ac_prog=`$CC -print-prog-name=ld`
4889fi
4890case `"$ac_prog" -V 2>&1 < /dev/null` in
4891 *GNU*)
4892 GNULD=yes;;
4893 *)
4894 GNULD=no;;
4895esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4897$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004898
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4900$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004901# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004902if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004903 enableval=$enable_shared;
4904fi
4905
4906
4907if test -z "$enable_shared"
4908then
4909 case $ac_sys_system in
4910 CYGWIN* | atheos*)
4911 enable_shared="yes";;
4912 *)
4913 enable_shared="no";;
4914 esac
4915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4917$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004918
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4920$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004921# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004922if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004923 enableval=$enable_profiling; ac_save_cc="$CC"
4924 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004925 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004926 ac_enable_profiling="no"
4927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004929/* end confdefs.h. */
4930int main() { return 0; }
4931_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004932if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004933 ac_enable_profiling="yes"
4934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004935 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004939fi
4940
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004941 CC="$ac_save_cc"
4942fi
4943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4945$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004946
4947case "$ac_enable_profiling" in
4948 "yes")
4949 BASECFLAGS="-pg $BASECFLAGS"
4950 LDFLAGS="-pg $LDFLAGS"
4951 ;;
4952esac
4953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4955$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004956
4957# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4958# library that we build, but we do not want to link against it (we
4959# will find it with a -framework option). For this reason there is an
4960# extra variable BLDLIBRARY against which Python and the extension
4961# modules are linked, BLDLIBRARY. This is normally the same as
4962# LDLIBRARY, but empty for MacOSX framework builds.
4963if test "$enable_framework"
4964then
4965 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4966 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4967 BLDLIBRARY=''
4968else
4969 BLDLIBRARY='$(LDLIBRARY)'
4970fi
4971
4972# Other platforms follow
4973if test $enable_shared = "yes"; then
4974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004975$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004976
4977 case $ac_sys_system in
4978 BeOS*)
4979 LDLIBRARY='libpython$(VERSION).so'
4980 ;;
4981 CYGWIN*)
4982 LDLIBRARY='libpython$(VERSION).dll.a'
4983 DLLLIBRARY='libpython$(VERSION).dll'
4984 ;;
4985 SunOS*)
4986 LDLIBRARY='libpython$(VERSION).so'
4987 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4988 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4989 INSTSONAME="$LDLIBRARY".$SOVERSION
4990 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02004991 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004992 LDLIBRARY='libpython$(VERSION).so'
4993 BLDLIBRARY='-L. -lpython$(VERSION)'
4994 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4995 case $ac_sys_system in
4996 FreeBSD*)
4997 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4998 ;;
4999 esac
5000 INSTSONAME="$LDLIBRARY".$SOVERSION
5001 ;;
5002 hp*|HP*)
5003 case `uname -m` in
5004 ia64)
5005 LDLIBRARY='libpython$(VERSION).so'
5006 ;;
5007 *)
5008 LDLIBRARY='libpython$(VERSION).sl'
5009 ;;
5010 esac
5011 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
5012 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5013 ;;
5014 OSF*)
5015 LDLIBRARY='libpython$(VERSION).so'
5016 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
5017 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5018 ;;
5019 atheos*)
5020 LDLIBRARY='libpython$(VERSION).so'
5021 BLDLIBRARY='-L. -lpython$(VERSION)'
5022 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5023 ;;
5024 Darwin*)
5025 LDLIBRARY='libpython$(VERSION).dylib'
5026 BLDLIBRARY='-L. -lpython$(VERSION)'
5027 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5028 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005029 AIX*)
5030 LDLIBRARY='libpython$(VERSION).so'
5031 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5032 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005033
5034 esac
5035else # shared is disabled
5036 case $ac_sys_system in
5037 CYGWIN*)
5038 BLDLIBRARY='$(LIBRARY)'
5039 LDLIBRARY='libpython$(VERSION).dll.a'
5040 ;;
5041 esac
5042fi
5043
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5045$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046
5047if test -n "$ac_tool_prefix"; then
5048 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5049set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5051$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005052if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005053 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005054else
5055 if test -n "$RANLIB"; then
5056 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5057else
5058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5059for as_dir in $PATH
5060do
5061 IFS=$as_save_IFS
5062 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005063 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005064 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005065 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005067 break 2
5068 fi
5069done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005070 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005071IFS=$as_save_IFS
5072
5073fi
5074fi
5075RANLIB=$ac_cv_prog_RANLIB
5076if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5078$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5081$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005082fi
5083
5084
5085fi
5086if test -z "$ac_cv_prog_RANLIB"; then
5087 ac_ct_RANLIB=$RANLIB
5088 # Extract the first word of "ranlib", so it can be a program name with args.
5089set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005092if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005093 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005094else
5095 if test -n "$ac_ct_RANLIB"; then
5096 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5097else
5098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099for as_dir in $PATH
5100do
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005103 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005105 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005107 break 2
5108 fi
5109done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005110 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005111IFS=$as_save_IFS
5112
5113fi
5114fi
5115ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5116if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5118$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122fi
5123
5124 if test "x$ac_ct_RANLIB" = x; then
5125 RANLIB=":"
5126 else
5127 case $cross_compiling:$ac_tool_warned in
5128yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005131ac_tool_warned=yes ;;
5132esac
5133 RANLIB=$ac_ct_RANLIB
5134 fi
5135else
5136 RANLIB="$ac_cv_prog_RANLIB"
5137fi
5138
5139
5140for ac_prog in ar aal
5141do
5142 # Extract the first word of "$ac_prog", so it can be a program name with args.
5143set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5145$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005146if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005147 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005148else
5149 if test -n "$AR"; then
5150 ac_cv_prog_AR="$AR" # Let the user override the test.
5151else
5152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153for as_dir in $PATH
5154do
5155 IFS=$as_save_IFS
5156 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005158 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005161 break 2
5162 fi
5163done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005164 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005165IFS=$as_save_IFS
5166
5167fi
5168fi
5169AR=$ac_cv_prog_AR
5170if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5172$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005176fi
5177
5178
5179 test -n "$AR" && break
5180done
5181test -n "$AR" || AR="ar"
5182
5183
5184# tweak ARFLAGS only if the user didn't set it on the command line
5185
5186if test -z "$ARFLAGS"
5187then
5188 ARFLAGS="rc"
5189fi
5190
5191
5192# Extract the first word of "svnversion", so it can be a program name with args.
5193set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005196if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005197 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198else
5199 if test -n "$SVNVERSION"; then
5200 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5201else
5202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5203for as_dir in $PATH
5204do
5205 IFS=$as_save_IFS
5206 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005207 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005209 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005211 break 2
5212 fi
5213done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005214 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005215IFS=$as_save_IFS
5216
5217 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5218fi
5219fi
5220SVNVERSION=$ac_cv_prog_SVNVERSION
5221if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5223$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5226$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005227fi
5228
5229
5230if test $SVNVERSION = found
5231then
5232 SVNVERSION="svnversion \$(srcdir)"
5233else
5234 SVNVERSION="echo Unversioned directory"
5235fi
5236
Trent Nelsond86ceec2012-10-16 09:42:45 -04005237
Trent Nelsonabf20512012-10-17 04:32:49 -04005238if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005239 # If we're building out-of-tree make sure Include (in the current dir)
5240 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5241 # and graminit.h to get picked up from the correct directory.
5242 # (A side effect of this is that these resources will automatically be
5243 # regenerated when building out-of-tree, regardless of whether or not
5244 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5245 # off.)
5246 BASECPPFLAGS="-IInclude"
5247else
5248 BASECPPFLAGS=""
5249fi
5250
Georg Brandl3a5508e2011-03-06 10:42:21 +01005251
5252
5253
5254# Extract the first word of "hg", so it can be a program name with args.
5255set dummy hg; ac_word=$2
5256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5257$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005258if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005259 $as_echo_n "(cached) " >&6
5260else
5261 if test -n "$HAS_HG"; then
5262 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5263else
5264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5265for as_dir in $PATH
5266do
5267 IFS=$as_save_IFS
5268 test -z "$as_dir" && as_dir=.
5269 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005270 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005271 ac_cv_prog_HAS_HG="found"
5272 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5273 break 2
5274 fi
5275done
5276 done
5277IFS=$as_save_IFS
5278
5279 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5280fi
5281fi
5282HAS_HG=$ac_cv_prog_HAS_HG
5283if test -n "$HAS_HG"; then
5284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5285$as_echo "$HAS_HG" >&6; }
5286else
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5288$as_echo "no" >&6; }
5289fi
5290
5291
5292if test $HAS_HG = found
5293then
5294 HGVERSION="hg id -i \$(srcdir)"
5295 HGTAG="hg id -t \$(srcdir)"
5296 HGBRANCH="hg id -b \$(srcdir)"
5297else
5298 HGVERSION=""
5299 HGTAG=""
5300 HGBRANCH=""
5301fi
5302
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303case $MACHDEP in
5304bsdos*|hp*|HP*)
5305 # install -d does not work on BSDI or HP-UX
5306 if test -z "$INSTALL"
5307 then
5308 INSTALL="${srcdir}/install-sh -c"
5309 fi
5310esac
5311ac_aux_dir=
5312for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005313 if test -f "$ac_dir/install-sh"; then
5314 ac_aux_dir=$ac_dir
5315 ac_install_sh="$ac_aux_dir/install-sh -c"
5316 break
5317 elif test -f "$ac_dir/install.sh"; then
5318 ac_aux_dir=$ac_dir
5319 ac_install_sh="$ac_aux_dir/install.sh -c"
5320 break
5321 elif test -f "$ac_dir/shtool"; then
5322 ac_aux_dir=$ac_dir
5323 ac_install_sh="$ac_aux_dir/shtool install -c"
5324 break
5325 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326done
5327if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005328 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005329fi
5330
5331# These three variables are undocumented and unsupported,
5332# and are intended to be withdrawn in a future Autoconf release.
5333# They can cause serious problems if a builder's source tree is in a directory
5334# whose full name contains unusual characters.
5335ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5336ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5337ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5338
5339
5340# Find a good install program. We prefer a C program (faster),
5341# so one script is as good as another. But avoid the broken or
5342# incompatible versions:
5343# SysV /etc/install, /usr/sbin/install
5344# SunOS /usr/etc/install
5345# IRIX /sbin/install
5346# AIX /bin/install
5347# AmigaOS /C/install, which installs bootblocks on floppy discs
5348# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5349# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5350# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5351# OS/2's system install, which has a completely different semantic
5352# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005353# Reject install programs that cannot install multiple files.
5354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5355$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005356if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005357if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005358 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005359else
5360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5361for as_dir in $PATH
5362do
5363 IFS=$as_save_IFS
5364 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005365 # Account for people who put trailing slashes in PATH elements.
5366case $as_dir/ in #((
5367 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005368 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005369 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370 /usr/ucb/* ) ;;
5371 *)
5372 # OSF1 and SCO ODT 3.0 have their own names for install.
5373 # Don't use installbsd from OSF since it installs stuff as root
5374 # by default.
5375 for ac_prog in ginstall scoinst install; do
5376 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005377 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378 if test $ac_prog = install &&
5379 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5380 # AIX install. It has an incompatible calling convention.
5381 :
5382 elif test $ac_prog = install &&
5383 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5384 # program-specific install script used by HP pwplus--don't use.
5385 :
5386 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005387 rm -rf conftest.one conftest.two conftest.dir
5388 echo one > conftest.one
5389 echo two > conftest.two
5390 mkdir conftest.dir
5391 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5392 test -s conftest.one && test -s conftest.two &&
5393 test -s conftest.dir/conftest.one &&
5394 test -s conftest.dir/conftest.two
5395 then
5396 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5397 break 3
5398 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399 fi
5400 fi
5401 done
5402 done
5403 ;;
5404esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005405
5406 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005407IFS=$as_save_IFS
5408
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005409rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005410
5411fi
5412 if test "${ac_cv_path_install+set}" = set; then
5413 INSTALL=$ac_cv_path_install
5414 else
5415 # As a last resort, use the slow shell script. Don't cache a
5416 # value for INSTALL within a source directory, because that will
5417 # break other packages using the cache if that directory is
5418 # removed, or if the value is a relative name.
5419 INSTALL=$ac_install_sh
5420 fi
5421fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5423$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005424
5425# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5426# It thinks the first close brace ends the variable substitution.
5427test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5428
5429test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5430
5431test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5432
Trent Nelsonf6407a12012-08-30 14:56:13 +00005433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5434$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5435if test -z "$MKDIR_P"; then
5436 if ${ac_cv_path_mkdir+:} false; then :
5437 $as_echo_n "(cached) " >&6
5438else
5439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5440for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5441do
5442 IFS=$as_save_IFS
5443 test -z "$as_dir" && as_dir=.
5444 for ac_prog in mkdir gmkdir; do
5445 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005446 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005447 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5448 'mkdir (GNU coreutils) '* | \
5449 'mkdir (coreutils) '* | \
5450 'mkdir (fileutils) '4.1*)
5451 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5452 break 3;;
5453 esac
5454 done
5455 done
5456 done
5457IFS=$as_save_IFS
5458
5459fi
5460
5461 test -d ./--version && rmdir ./--version
5462 if test "${ac_cv_path_mkdir+set}" = set; then
5463 MKDIR_P="$ac_cv_path_mkdir -p"
5464 else
5465 # As a last resort, use the slow shell script. Don't cache a
5466 # value for MKDIR_P within a source directory, because that will
5467 # break other packages using the cache if that directory is
5468 # removed, or if the value is a relative name.
5469 MKDIR_P="$ac_install_sh -d"
5470 fi
5471fi
5472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5473$as_echo "$MKDIR_P" >&6; }
5474
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475
5476# Not every filesystem supports hard links
5477
5478if test -z "$LN" ; then
5479 case $ac_sys_system in
5480 BeOS*) LN="ln -s";;
5481 CYGWIN*) LN="ln -s";;
5482 atheos*) LN="ln -s";;
5483 *) LN=ln;;
5484 esac
5485fi
5486
5487# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5489$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005490
5491# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005492if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005493 withval=$with_pydebug;
5494if test "$withval" != no
5495then
5496
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005497$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005498
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5500$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005502else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5503$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005504fi
5505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005508fi
5509
5510
5511# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5512# merged with this chunk of code?
5513
5514# Optimizer/debugger flags
5515# ------------------------
5516# (The following bit of code is complicated enough - please keep things
5517# indented properly. Just pretend you're editing Python code. ;-)
5518
5519# There are two parallel sets of case statements below, one that checks to
5520# see if OPT was set and one that does BASECFLAGS setting based upon
5521# compiler and platform. BASECFLAGS tweaks need to be made even if the
5522# user set OPT.
5523
5524# tweak OPT based on compiler and platform, only if the user didn't set
5525# it on the command line
5526
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005527if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005528then
5529 case $GCC in
5530 yes)
5531 if test "$CC" != 'g++' ; then
5532 STRICT_PROTO="-Wstrict-prototypes"
5533 fi
5534 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5535 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5536 WRAP="-fwrapv"
5537 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005538
5539 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005540 case $CC in
5541 *clang*) WRAP="-fwrapv"
5542 ;;
5543 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005544
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005545 case $ac_cv_prog_cc_g in
5546 yes)
5547 if test "$Py_DEBUG" = 'true' ; then
5548 # Optimization messes up debuggers, so turn it off for
5549 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005550 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551 else
5552 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5553 fi
5554 ;;
5555 *)
5556 OPT="-O3 -Wall $STRICT_PROTO"
5557 ;;
5558 esac
5559 case $ac_sys_system in
5560 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5561 ;;
5562 esac
5563 ;;
5564
5565 *)
5566 OPT="-O"
5567 ;;
5568 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005569fi
5570
5571
5572
5573# The -arch flags for universal builds on OSX
5574UNIVERSAL_ARCH_FLAGS=
5575
5576
5577# tweak BASECFLAGS based on compiler and platform
5578case $GCC in
5579yes)
5580 # Python violates C99 rules, by casting between incompatible
5581 # pointer types. GCC may generate bad code as a result of that,
5582 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5584$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005585 ac_save_cc="$CC"
5586 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005587 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005588 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005592
5593int
5594main ()
5595{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005596
Gregory P. Smith373469a2009-11-01 21:03:38 +00005597 ;
5598 return 0;
5599}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005600_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005601if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005602 ac_cv_no_strict_aliasing_ok=yes
5603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005604 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005605fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005607fi
5608
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005609 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5611$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005612 if test $ac_cv_no_strict_aliasing_ok = yes
5613 then
5614 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5615 fi
5616
5617 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5618 # support. Without this, treatment of subnormals doesn't follow
5619 # the standard.
5620 case $ac_sys_machine in
5621 alpha*)
5622 BASECFLAGS="$BASECFLAGS -mieee"
5623 ;;
5624 esac
5625
5626 case $ac_sys_system in
5627 SCO_SV*)
5628 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5629 ;;
5630 # is there any other compiler on Darwin besides gcc?
5631 Darwin*)
5632 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5633 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005634 if test "${CC}" = gcc
5635 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5637$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005638 case "${UNIVERSALSDK}" in
5639 */MacOSX10.4u.sdk)
5640 # Build using 10.4 SDK, force usage of gcc when the
5641 # compiler is gcc, otherwise the user will get very
5642 # confusing error messages when building on OSX 10.6
5643 CC=gcc-4.0
5644 CPP=cpp-4.0
5645 ;;
5646 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5648$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005649 fi
5650
5651 # Calculate the right deployment target for this build.
5652 #
5653 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5654 if test ${cur_target} '>' 10.2; then
5655 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005656 if test ${enable_universalsdk}; then
5657 if test "${UNIVERSAL_ARCHS}" = "all"; then
5658 # Ensure that the default platform for a
5659 # 4-way universal build is OSX 10.5,
5660 # that's the first OS release where
5661 # 4-way builds make sense.
5662 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005663
5664 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5665 cur_target='10.5'
5666
5667 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5668 cur_target='10.5'
5669
5670 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5671 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005672 fi
5673 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005674 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005675 # On Intel macs default to a deployment
5676 # target of 10.4, that's the first OSX
5677 # release with Intel support.
5678 cur_target="10.4"
5679 fi
5680 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005681 fi
5682 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5683
5684 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5685 # environment with a value that is the same as what we'll use
5686 # in the Makefile to ensure that we'll get the same compiler
5687 # environment during configure and build time.
5688 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5689 export MACOSX_DEPLOYMENT_TARGET
5690 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5691
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005692 if test "${enable_universalsdk}"; then
5693 UNIVERSAL_ARCH_FLAGS=""
5694 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5695 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5696 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005697 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005698
5699 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5700 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5701 LIPO_32BIT_FLAGS=""
5702 ARCH_RUN_32BIT="true"
5703
5704 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5705 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5706 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005707 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005708
5709 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5710 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5711 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005712 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005713
5714 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5715 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5716 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005717 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005718
5719 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005720 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005721
5722 fi
5723
5724
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005725 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5726 if test "${UNIVERSALSDK}" != "/"
5727 then
5728 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5729 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5730 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005731 fi
5732
5733 fi
5734
5735
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005736 ;;
5737 OSF*)
5738 BASECFLAGS="$BASECFLAGS -mieee"
5739 ;;
5740 esac
5741 ;;
5742
5743*)
5744 case $ac_sys_system in
5745 OpenUNIX*|UnixWare*)
5746 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5747 ;;
5748 OSF*)
5749 BASECFLAGS="$BASECFLAGS -ieee -std"
5750 ;;
5751 SCO_SV*)
5752 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5753 ;;
5754 esac
5755 ;;
5756esac
5757
5758if test "$Py_DEBUG" = 'true'; then
5759 :
5760else
5761 OPT="-DNDEBUG $OPT"
5762fi
5763
5764if test "$ac_arch_flags"
5765then
5766 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5767fi
5768
5769# disable check for icc since it seems to pass, but generates a warning
5770if test "$CC" = icc
5771then
5772 ac_cv_opt_olimit_ok=no
5773fi
5774
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5776$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005777if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005778 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005779else
5780 ac_save_cc="$CC"
5781CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005784
5785int
5786main ()
5787{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005788
Gregory P. Smith373469a2009-11-01 21:03:38 +00005789 ;
5790 return 0;
5791}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005792_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005793if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005794 ac_cv_opt_olimit_ok=yes
5795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005796 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005797
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005798fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005800CC="$ac_save_cc"
5801fi
5802
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5804$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805if test $ac_cv_opt_olimit_ok = yes; then
5806 case $ac_sys_system in
5807 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5808 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5809 # environment?
5810 Darwin*)
5811 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04005812 # XXX thankfully this useless troublemaker of a flag has been
5813 # eradicated in the 3.x line. For now, make sure it isn't picked
5814 # up by any of our other platforms that use CC.
5815 AIX*|SunOS*|HP-UX*|IRIX*)
5816 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005817 *)
5818 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5819 ;;
5820 esac
5821else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5823$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005824 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005825 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005826else
5827 ac_save_cc="$CC"
5828 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005830/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005831
5832int
5833main ()
5834{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005835
Gregory P. Smith373469a2009-11-01 21:03:38 +00005836 ;
5837 return 0;
5838}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005840if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005841 ac_cv_olimit_ok=yes
5842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005843 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005844
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005845fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005847 CC="$ac_save_cc"
5848fi
5849
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5851$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005852 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01005853 case $ac_sys_system in
5854 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
5855 HP-UX*)
5856 ;;
5857 *)
5858 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5859 ;;
5860 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005861 fi
5862fi
5863
5864# Check whether GCC supports PyArg_ParseTuple format
5865if test "$GCC" = "yes"
5866then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5868$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005869 save_CFLAGS=$CFLAGS
5870 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005872/* end confdefs.h. */
5873
5874 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005875int
5876main ()
5877{
5878
5879 ;
5880 return 0;
5881}
Matthias Klosec511b472010-05-08 11:01:39 +00005882
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005883_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005884if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005885
Matthias Klosec511b472010-05-08 11:01:39 +00005886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005887$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888
Matthias Klosec511b472010-05-08 11:01:39 +00005889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005890$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005891
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005892else
Matthias Klosec511b472010-05-08 11:01:39 +00005893
5894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005895$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005896
5897fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5899 CFLAGS=$save_CFLAGS
5900fi
5901
5902# On some compilers, pthreads are available without further options
5903# (e.g. MacOS X). On some of these systems, the compiler will not
5904# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5905# So we have to see first whether pthreads are available without
5906# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5908$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005909if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005910 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005912 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005913 ac_cv_pthread_is_default=no
5914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005916/* end confdefs.h. */
5917
Stefan Krahae66ca62012-11-22 22:36:57 +01005918#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005919#include <pthread.h>
5920
5921void* routine(void* p){return NULL;}
5922
5923int main(){
5924 pthread_t p;
5925 if(pthread_create(&p,NULL,routine,NULL)!=0)
5926 return 1;
5927 (void)pthread_detach(p);
5928 return 0;
5929}
5930
5931_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005932if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005933
5934 ac_cv_pthread_is_default=yes
5935 ac_cv_kthread=no
5936 ac_cv_pthread=no
5937
5938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005939 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005943fi
5944
5945
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005946fi
5947
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5949$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005950
5951
5952if test $ac_cv_pthread_is_default = yes
5953then
5954 ac_cv_kpthread=no
5955else
5956# -Kpthread, if available, provides the right #defines
5957# and linker options to make pthread_create available
5958# Some compilers won't report that they do not support -Kpthread,
5959# so we need to run a program to see whether it really made the
5960# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5962$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005963if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005964 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005965else
5966 ac_save_cc="$CC"
5967CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005969 ac_cv_kpthread=no
5970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972/* end confdefs.h. */
5973
Stefan Krahae66ca62012-11-22 22:36:57 +01005974#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005975#include <pthread.h>
5976
5977void* routine(void* p){return NULL;}
5978
5979int main(){
5980 pthread_t p;
5981 if(pthread_create(&p,NULL,routine,NULL)!=0)
5982 return 1;
5983 (void)pthread_detach(p);
5984 return 0;
5985}
5986
5987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005988if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005989 ac_cv_kpthread=yes
5990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005991 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005995fi
5996
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005997CC="$ac_save_cc"
5998fi
5999
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6001$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002fi
6003
6004if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6005then
6006# -Kthread, if available, provides the right #defines
6007# and linker options to make pthread_create available
6008# Some compilers won't report that they do not support -Kthread,
6009# so we need to run a program to see whether it really made the
6010# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6012$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006013if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006014 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006015else
6016 ac_save_cc="$CC"
6017CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006018if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006019 ac_cv_kthread=no
6020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006022/* end confdefs.h. */
6023
Stefan Krahae66ca62012-11-22 22:36:57 +01006024#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006025#include <pthread.h>
6026
6027void* routine(void* p){return NULL;}
6028
6029int main(){
6030 pthread_t p;
6031 if(pthread_create(&p,NULL,routine,NULL)!=0)
6032 return 1;
6033 (void)pthread_detach(p);
6034 return 0;
6035}
6036
6037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006038if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006039 ac_cv_kthread=yes
6040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006041 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006045fi
6046
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006047CC="$ac_save_cc"
6048fi
6049
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6051$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006052fi
6053
6054if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6055then
6056# -pthread, if available, provides the right #defines
6057# and linker options to make pthread_create available
6058# Some compilers won't report that they do not support -pthread,
6059# so we need to run a program to see whether it really made the
6060# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6062$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006063if ${ac_cv_thread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006064 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006065else
6066 ac_save_cc="$CC"
6067CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006068if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069 ac_cv_pthread=no
6070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006072/* end confdefs.h. */
6073
Stefan Krahae66ca62012-11-22 22:36:57 +01006074#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006075#include <pthread.h>
6076
6077void* routine(void* p){return NULL;}
6078
6079int main(){
6080 pthread_t p;
6081 if(pthread_create(&p,NULL,routine,NULL)!=0)
6082 return 1;
6083 (void)pthread_detach(p);
6084 return 0;
6085}
6086
6087_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006088if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006089 ac_cv_pthread=yes
6090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006091 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006092fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6094 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006095fi
6096
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006097CC="$ac_save_cc"
6098fi
6099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6101$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006102fi
6103
6104# If we have set a CC compiler flag for thread support then
6105# check if it works for CXX, too.
6106ac_cv_cxx_thread=no
6107if test ! -z "$CXX"
6108then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6110$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006111ac_save_cxx="$CXX"
6112
6113if test "$ac_cv_kpthread" = "yes"
6114then
6115 CXX="$CXX -Kpthread"
6116 ac_cv_cxx_thread=yes
6117elif test "$ac_cv_kthread" = "yes"
6118then
6119 CXX="$CXX -Kthread"
6120 ac_cv_cxx_thread=yes
6121elif test "$ac_cv_pthread" = "yes"
6122then
6123 CXX="$CXX -pthread"
6124 ac_cv_cxx_thread=yes
6125fi
6126
6127if test $ac_cv_cxx_thread = yes
6128then
6129 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6130 $CXX -c conftest.$ac_ext 2>&5
6131 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6132 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6133 then
6134 ac_cv_cxx_thread=yes
6135 else
6136 ac_cv_cxx_thread=no
6137 fi
6138 rm -fr conftest*
6139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6141$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006142fi
6143CXX="$ac_save_cxx"
6144
6145
6146# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6148$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006149if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006150 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006153/* end confdefs.h. */
6154#include <stdlib.h>
6155#include <stdarg.h>
6156#include <string.h>
6157#include <float.h>
6158
6159int
6160main ()
6161{
6162
6163 ;
6164 return 0;
6165}
6166_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006167if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006168 ac_cv_header_stdc=yes
6169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006170 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006171fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6173
6174if test $ac_cv_header_stdc = yes; then
6175 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006177/* end confdefs.h. */
6178#include <string.h>
6179
6180_ACEOF
6181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006182 $EGREP "memchr" >/dev/null 2>&1; then :
6183
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006184else
6185 ac_cv_header_stdc=no
6186fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006187rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006188
6189fi
6190
6191if test $ac_cv_header_stdc = yes; then
6192 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006194/* end confdefs.h. */
6195#include <stdlib.h>
6196
6197_ACEOF
6198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006199 $EGREP "free" >/dev/null 2>&1; then :
6200
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006201else
6202 ac_cv_header_stdc=no
6203fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006204rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006205
6206fi
6207
6208if test $ac_cv_header_stdc = yes; then
6209 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006210 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006211 :
6212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006214/* end confdefs.h. */
6215#include <ctype.h>
6216#include <stdlib.h>
6217#if ((' ' & 0x0FF) == 0x020)
6218# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6219# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6220#else
6221# define ISLOWER(c) \
6222 (('a' <= (c) && (c) <= 'i') \
6223 || ('j' <= (c) && (c) <= 'r') \
6224 || ('s' <= (c) && (c) <= 'z'))
6225# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6226#endif
6227
6228#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6229int
6230main ()
6231{
6232 int i;
6233 for (i = 0; i < 256; i++)
6234 if (XOR (islower (i), ISLOWER (i))
6235 || toupper (i) != TOUPPER (i))
6236 return 2;
6237 return 0;
6238}
6239_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006240if ac_fn_c_try_run "$LINENO"; then :
6241
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006243 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6246 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006247fi
6248
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249fi
6250fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6252$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006253if test $ac_cv_header_stdc = yes; then
6254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006255$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006256
6257fi
6258
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006259for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6260fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006261ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006262shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006263unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006264sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6265sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006266sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006267sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006268sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006269sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006270bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006271do :
6272 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6273ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006274if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006275 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006276#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006277_ACEOF
6278
6279fi
6280
Guido van Rossum627b2d71993-12-24 10:39:16 +00006281done
6282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006283ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006284for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006285 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6287$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006288if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006289 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006292/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006293#include <sys/types.h>
6294#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006295
Martin v. Löwis11437992002-04-12 09:54:03 +00006296int
6297main ()
6298{
6299if ((DIR *) 0)
6300return 0;
6301 ;
6302 return 0;
6303}
6304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006306 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006308 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006311fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006312eval ac_res=\$$as_ac_Header
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6314$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006315if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006316 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006317#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006318_ACEOF
6319
6320ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006322
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006323done
6324# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6325if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6327$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006328if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006329 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006330else
Martin v. Löwis11437992002-04-12 09:54:03 +00006331 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006334
Martin v. Löwiseba40652007-08-30 20:10:57 +00006335/* Override any GCC internal prototype to avoid an error.
6336 Use char because int might match the return type of a GCC
6337 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006338#ifdef __cplusplus
6339extern "C"
6340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006341char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006342int
6343main ()
6344{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006345return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006346 ;
6347 return 0;
6348}
6349_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006350for ac_lib in '' dir; do
6351 if test -z "$ac_lib"; then
6352 ac_res="none required"
6353 else
6354 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006355 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006356 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006358 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006359fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360rm -f core conftest.err conftest.$ac_objext \
6361 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006362 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006363 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006365done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006366if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006367
Martin v. Löwiseba40652007-08-30 20:10:57 +00006368else
6369 ac_cv_search_opendir=no
6370fi
6371rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006372LIBS=$ac_func_search_save_LIBS
6373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6375$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006376ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006377if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006378 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006379
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006380fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006381
Michael W. Hudson54241132001-12-07 15:38:26 +00006382else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6384$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006385if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006386 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006387else
6388 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006391
Martin v. Löwiseba40652007-08-30 20:10:57 +00006392/* Override any GCC internal prototype to avoid an error.
6393 Use char because int might match the return type of a GCC
6394 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006395#ifdef __cplusplus
6396extern "C"
6397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006398char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006399int
6400main ()
6401{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006402return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006403 ;
6404 return 0;
6405}
6406_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006407for ac_lib in '' x; do
6408 if test -z "$ac_lib"; then
6409 ac_res="none required"
6410 else
6411 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006412 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006413 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006414 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006415 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006417rm -f core conftest.err conftest.$ac_objext \
6418 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006419 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006420 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006422done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006423if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006424
Martin v. Löwiseba40652007-08-30 20:10:57 +00006425else
6426 ac_cv_search_opendir=no
6427fi
6428rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006429LIBS=$ac_func_search_save_LIBS
6430fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6432$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006433ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006434if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006435 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006437fi
6438
6439fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006440
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6442$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006443if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006444 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006445else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006447/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006448#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006449int
6450main ()
6451{
6452return makedev(0, 0);
6453 ;
6454 return 0;
6455}
6456_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006458 ac_cv_header_sys_types_h_makedev=yes
6459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006460 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006461fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006462rm -f core conftest.err conftest.$ac_objext \
6463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006464
6465fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6467$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006468
6469if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006470ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006471if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006472
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006473$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006474
6475fi
6476
6477
6478
6479 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006480 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006481if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006482
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006483$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006484
6485fi
6486
6487
6488 fi
6489fi
6490
Michael W. Hudson54241132001-12-07 15:38:26 +00006491
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006492# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006493for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006494do :
6495 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006496#ifdef HAVE_CURSES_H
6497#include <curses.h>
6498#endif
6499
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006500"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006501if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006502 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006503#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006504_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006505
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006506fi
6507
6508done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006509
6510
Martin v. Löwis11017b12006-01-14 18:12:57 +00006511# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006512for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006513do :
6514 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 +00006515#ifdef HAVE_ASM_TYPES_H
6516#include <asm/types.h>
6517#endif
6518#ifdef HAVE_SYS_SOCKET_H
6519#include <sys/socket.h>
6520#endif
6521
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006522"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006523if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006524 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006525#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006526_ACEOF
6527
6528fi
6529
6530done
6531
6532
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006534was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6536$as_echo_n "checking for clock_t in time.h... " >&6; }
6537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006538/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006539#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006540
6541_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006543 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006544 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006545else
Martin v. Löwis11437992002-04-12 09:54:03 +00006546
6547
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006548$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006549
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006550
Guido van Rossum627b2d71993-12-24 10:39:16 +00006551fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006552rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006553
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6555$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006556
Neal Norwitz11690112002-07-30 01:08:28 +00006557# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6559$as_echo_n "checking for makedev... " >&6; }
6560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006561/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006562
6563#if defined(MAJOR_IN_MKDEV)
6564#include <sys/mkdev.h>
6565#elif defined(MAJOR_IN_SYSMACROS)
6566#include <sys/sysmacros.h>
6567#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006568#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006569#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006570int
6571main ()
6572{
6573 makedev(0, 0)
6574 ;
6575 return 0;
6576}
6577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006578if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006579 ac_cv_has_makedev=yes
6580else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006581 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006582fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006583rm -f core conftest.err conftest.$ac_objext \
6584 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006585if test "$ac_cv_has_makedev" = "no"; then
6586 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006588/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006589
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006590#define _OSF_SOURCE 1
6591#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006592
Neal Norwitz11690112002-07-30 01:08:28 +00006593int
6594main ()
6595{
6596 makedev(0, 0)
6597 ;
6598 return 0;
6599}
6600_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006601if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006602 ac_cv_has_makedev=yes
6603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006604 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006605fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006606rm -f core conftest.err conftest.$ac_objext \
6607 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006608 if test "$ac_cv_has_makedev" = "yes"; then
6609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006610$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006611
6612 fi
6613fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6615$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006616if test "$ac_cv_has_makedev" = "yes"; then
6617
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006619
6620fi
6621
Martin v. Löwis399a6892002-10-04 10:22:02 +00006622# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6623# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6624# defined, but the compiler does not support pragma redefine_extname,
6625# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6626# structures (such as rlimit64) without declaring them. As a
6627# work-around, disable LFS on such configurations
6628
6629use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6631$as_echo_n "checking Solaris LFS bug... " >&6; }
6632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006633/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006634
6635#define _LARGEFILE_SOURCE 1
6636#define _FILE_OFFSET_BITS 64
6637#include <sys/resource.h>
6638
Martin v. Löwis399a6892002-10-04 10:22:02 +00006639int
6640main ()
6641{
6642struct rlimit foo;
6643 ;
6644 return 0;
6645}
6646_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006647if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006648 sol_lfs_bug=no
6649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006650 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6654$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006655if test "$sol_lfs_bug" = "yes"; then
6656 use_lfs=no
6657fi
6658
6659if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006660# Two defines needed to enable largefile support on various platforms
6661# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006662case $ac_sys_system/$ac_sys_release in
6663AIX*)
6664
6665$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6666
6667 ;;
6668esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006669
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006670$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006671
6672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006673$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006674
Martin v. Löwis399a6892002-10-04 10:22:02 +00006675fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006676
Guido van Rossum84e7b241996-08-19 21:59:00 +00006677# Add some code to confdefs.h so that the test for off_t works on SCO
6678cat >> confdefs.h <<\EOF
6679#if defined(SCO_DS)
6680#undef _OFF_T
6681#endif
6682EOF
6683
Guido van Rossumef2255b2000-03-10 22:30:29 +00006684# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006685ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006686if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006687
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006688else
Martin v. Löwis11437992002-04-12 09:54:03 +00006689
6690cat >>confdefs.h <<_ACEOF
6691#define mode_t int
6692_ACEOF
6693
6694fi
6695
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006696ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006697if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006698
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006699else
Martin v. Löwis11437992002-04-12 09:54:03 +00006700
6701cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006702#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006703_ACEOF
6704
6705fi
6706
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006707ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006708if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006709
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006710else
Martin v. Löwis11437992002-04-12 09:54:03 +00006711
6712cat >>confdefs.h <<_ACEOF
6713#define pid_t int
6714_ACEOF
6715
6716fi
6717
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006720#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006721_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006722
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006723ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006724if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006725
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006726else
Martin v. Löwis11437992002-04-12 09:54:03 +00006727
6728cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006730_ACEOF
6731
6732fi
6733
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6735$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006736if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006740/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006741#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006742
6743_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006745 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006746 ac_cv_type_uid_t=yes
6747else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006748 ac_cv_type_uid_t=no
6749fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006750rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006751
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006752fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6754$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006755if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006756
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006757$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006758
6759
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006760$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006761
6762fi
6763
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006764
6765# There are two separate checks for each of the exact-width integer types we
6766# need. First we check whether the type is available using the usual
6767# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
6768# and <stdint.h> where available). We then also use the special type checks of
6769# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
6770# directly, #define's uint32_t to be a suitable type.
6771
6772ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
6773if test "x$ac_cv_type_uint32_t" = xyes; then :
6774
6775$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
6776
6777fi
6778
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006779ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6780case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006781 no|yes) ;; #(
6782 *)
6783
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006784$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006785
6786
6787cat >>confdefs.h <<_ACEOF
6788#define uint32_t $ac_cv_c_uint32_t
6789_ACEOF
6790;;
6791 esac
6792
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006793
6794ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
6795if test "x$ac_cv_type_uint64_t" = xyes; then :
6796
6797$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
6798
6799fi
6800
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006801ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6802case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006803 no|yes) ;; #(
6804 *)
6805
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006806$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006807
6808
6809cat >>confdefs.h <<_ACEOF
6810#define uint64_t $ac_cv_c_uint64_t
6811_ACEOF
6812;;
6813 esac
6814
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006815
6816ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
6817if test "x$ac_cv_type_int32_t" = xyes; then :
6818
6819$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
6820
6821fi
6822
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006823ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6824case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006825 no|yes) ;; #(
6826 *)
6827
6828cat >>confdefs.h <<_ACEOF
6829#define int32_t $ac_cv_c_int32_t
6830_ACEOF
6831;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006832esac
6833
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006834
6835ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
6836if test "x$ac_cv_type_int64_t" = xyes; then :
6837
6838$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
6839
6840fi
6841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006842ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6843case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006844 no|yes) ;; #(
6845 *)
6846
6847cat >>confdefs.h <<_ACEOF
6848#define int64_t $ac_cv_c_int64_t
6849_ACEOF
6850;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006851esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006852
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006853
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006854ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006855if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006856
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006858
6859fi
6860
Jack Jansendd19cf82001-12-06 22:36:17 +00006861
Michael W. Hudson54241132001-12-07 15:38:26 +00006862# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006863# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006864# The cast to long int works around a bug in the HP C Compiler
6865# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6866# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6867# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6869$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006870if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006873 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 +00006874
Martin v. Löwis11437992002-04-12 09:54:03 +00006875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006876 if test "$ac_cv_type_int" = yes; then
6877 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006879as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006880See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006881 else
6882 ac_cv_sizeof_int=0
6883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6888$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006889
6890
6891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006893#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006894_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006895
6896
Martin v. Löwiseba40652007-08-30 20:10:57 +00006897# The cast to long int works around a bug in the HP C Compiler
6898# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6899# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6900# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6902$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006903if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006904 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006906 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 +00006907
Martin v. Löwis11437992002-04-12 09:54:03 +00006908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006909 if test "$ac_cv_type_long" = yes; then
6910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006912as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006913See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006914 else
6915 ac_cv_sizeof_long=0
6916 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006918
Martin v. Löwis11437992002-04-12 09:54:03 +00006919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6921$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006922
6923
6924
Martin v. Löwis11437992002-04-12 09:54:03 +00006925cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006926#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006927_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006928
6929
Martin v. Löwiseba40652007-08-30 20:10:57 +00006930# The cast to long int works around a bug in the HP C Compiler
6931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6933# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6935$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006936if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006937 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006939 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 +00006940
Martin v. Löwis11437992002-04-12 09:54:03 +00006941else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006942 if test "$ac_cv_type_void_p" = yes; then
6943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006945as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006946See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006947 else
6948 ac_cv_sizeof_void_p=0
6949 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006951
Martin v. Löwis11437992002-04-12 09:54:03 +00006952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6954$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955
6956
6957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006959#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006960_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006961
6962
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963# The cast to long int works around a bug in the HP C Compiler
6964# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6965# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6966# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6968$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006969if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006970 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006972 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 +00006973
Martin v. Löwis11437992002-04-12 09:54:03 +00006974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975 if test "$ac_cv_type_short" = yes; then
6976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006978as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006979See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006980 else
6981 ac_cv_sizeof_short=0
6982 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006983fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006984
Martin v. Löwis11437992002-04-12 09:54:03 +00006985fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6987$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006988
6989
6990
Martin v. Löwis11437992002-04-12 09:54:03 +00006991cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006992#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006993_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006994
6995
Martin v. Löwiseba40652007-08-30 20:10:57 +00006996# The cast to long int works around a bug in the HP C Compiler
6997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6999# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7001$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007002if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007003 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005 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 +00007006
Martin v. Löwis11437992002-04-12 09:54:03 +00007007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007008 if test "$ac_cv_type_float" = yes; then
7009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007011as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007012See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007013 else
7014 ac_cv_sizeof_float=0
7015 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007017
Martin v. Löwis11437992002-04-12 09:54:03 +00007018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7020$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007021
7022
7023
Martin v. Löwis11437992002-04-12 09:54:03 +00007024cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007025#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007026_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007027
7028
Martin v. Löwiseba40652007-08-30 20:10:57 +00007029# The cast to long int works around a bug in the HP C Compiler
7030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7032# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7034$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007035if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007036 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007038 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 +00007039
Martin v. Löwis11437992002-04-12 09:54:03 +00007040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007041 if test "$ac_cv_type_double" = yes; then
7042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007044as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007045See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007046 else
7047 ac_cv_sizeof_double=0
7048 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007049fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050
Martin v. Löwis11437992002-04-12 09:54:03 +00007051fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7053$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007054
7055
7056
Martin v. Löwis11437992002-04-12 09:54:03 +00007057cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007058#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007059_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007060
7061
Martin v. Löwiseba40652007-08-30 20:10:57 +00007062# The cast to long int works around a bug in the HP C Compiler
7063# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7064# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7065# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7067$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007068if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007069 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007071 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 +00007072
Martin v. Löwis11437992002-04-12 09:54:03 +00007073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074 if test "$ac_cv_type_fpos_t" = yes; then
7075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007077as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007078See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007079 else
7080 ac_cv_sizeof_fpos_t=0
7081 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083
Martin v. Löwis11437992002-04-12 09:54:03 +00007084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7086$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007087
7088
7089
Martin v. Löwis11437992002-04-12 09:54:03 +00007090cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007091#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007092_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007093
Michael W. Hudson54241132001-12-07 15:38:26 +00007094
Martin v. Löwiseba40652007-08-30 20:10:57 +00007095# The cast to long int works around a bug in the HP C Compiler
7096# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7097# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7098# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7100$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007101if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007102 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007103else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104 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 +00007105
Martin v. Löwis18e16552006-02-15 17:27:45 +00007106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007107 if test "$ac_cv_type_size_t" = yes; then
7108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007110as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007111See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007112 else
7113 ac_cv_sizeof_size_t=0
7114 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007115fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007116
Martin v. Löwis18e16552006-02-15 17:27:45 +00007117fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7119$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007120
7121
7122
Martin v. Löwis18e16552006-02-15 17:27:45 +00007123cat >>confdefs.h <<_ACEOF
7124#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7125_ACEOF
7126
7127
Christian Heimes951cc0f2008-01-31 23:08:23 +00007128# The cast to long int works around a bug in the HP C Compiler
7129# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7130# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7131# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7133$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007134if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007135 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007136else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007137 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00007138
Christian Heimes951cc0f2008-01-31 23:08:23 +00007139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007140 if test "$ac_cv_type_pid_t" = yes; then
7141 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007143as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007144See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007145 else
7146 ac_cv_sizeof_pid_t=0
7147 fi
7148fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007149
Christian Heimes951cc0f2008-01-31 23:08:23 +00007150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7152$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007153
7154
7155
7156cat >>confdefs.h <<_ACEOF
7157#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7158_ACEOF
7159
7160
Michael W. Hudson54241132001-12-07 15:38:26 +00007161
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7163$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007164have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007166/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007167
Martin v. Löwis11437992002-04-12 09:54:03 +00007168int
7169main ()
7170{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007171long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007172 ;
7173 return 0;
7174}
7175_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007177
7178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007180
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007181 have_long_long=yes
7182
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7186$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007187if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007188# The cast to long int works around a bug in the HP C Compiler
7189# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7190# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7191# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7193$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007194if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007195 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007197 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 +00007198
Martin v. Löwis11437992002-04-12 09:54:03 +00007199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007200 if test "$ac_cv_type_long_long" = yes; then
7201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7202$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007203as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007204See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007205 else
7206 ac_cv_sizeof_long_long=0
7207 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007208fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007209
Martin v. Löwis11437992002-04-12 09:54:03 +00007210fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7212$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007213
7214
7215
Martin v. Löwis11437992002-04-12 09:54:03 +00007216cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007217#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007218_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007219
Michael W. Hudson54241132001-12-07 15:38:26 +00007220
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007221fi
7222
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7224$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007225have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007227/* end confdefs.h. */
7228
7229int
7230main ()
7231{
Matthias Klosec511b472010-05-08 11:01:39 +00007232long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007233 ;
7234 return 0;
7235}
7236_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007237if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007238
7239
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007240$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007241
7242 have_long_double=yes
7243
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007244fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7247$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007248if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007249# The cast to long int works around a bug in the HP C Compiler
7250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7252# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7254$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007255if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007256 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007259
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261 if test "$ac_cv_type_long_double" = yes; then
7262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007264as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007265See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007266 else
7267 ac_cv_sizeof_long_double=0
7268 fi
7269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007270
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7273$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007274
7275
7276
7277cat >>confdefs.h <<_ACEOF
7278#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7279_ACEOF
7280
7281
7282fi
7283
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7285$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007286have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007288/* end confdefs.h. */
7289
7290int
7291main ()
7292{
7293_Bool x; x = (_Bool)0;
7294 ;
7295 return 0;
7296}
7297_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007299
7300
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007301$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007302
7303 have_c99_bool=yes
7304
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7308$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007309if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007310# The cast to long int works around a bug in the HP C Compiler
7311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7313# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7315$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007316if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007317 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007320
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007321else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007322 if test "$ac_cv_type__Bool" = yes; then
7323 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7324$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007325as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007326See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007327 else
7328 ac_cv_sizeof__Bool=0
7329 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007330fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007331
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007332fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7334$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007335
7336
7337
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007338cat >>confdefs.h <<_ACEOF
7339#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7340_ACEOF
7341
7342
7343fi
7344
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007345ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007346 #include <stdint.h>
7347 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007348 #ifdef HAVE_INTTYPES_H
7349 #include <inttypes.h>
7350 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007352if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007353
7354cat >>confdefs.h <<_ACEOF
7355#define HAVE_UINTPTR_T 1
7356_ACEOF
7357
Martin v. Löwiseba40652007-08-30 20:10:57 +00007358# The cast to long int works around a bug in the HP C Compiler
7359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7361# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7363$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007364if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007365 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007366else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007367 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 +00007368
Martin v. Löwis11437992002-04-12 09:54:03 +00007369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007370 if test "$ac_cv_type_uintptr_t" = yes; then
7371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007373as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007374See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007375 else
7376 ac_cv_sizeof_uintptr_t=0
7377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007378fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007379
Martin v. Löwis11437992002-04-12 09:54:03 +00007380fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7382$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007383
7384
7385
Martin v. Löwis11437992002-04-12 09:54:03 +00007386cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007387#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007388_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007389
Michael W. Hudson54241132001-12-07 15:38:26 +00007390
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007391fi
7392
Martin v. Löwisebe26702006-10-02 14:55:51 +00007393
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007394# The cast to long int works around a bug in the HP C Compiler
7395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7397# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7399$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007400if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007401 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007402else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007403 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007404#ifdef HAVE_SYS_TYPES_H
7405#include <sys/types.h>
7406#endif
7407
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007408"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007409
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007410else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007411 if test "$ac_cv_type_off_t" = yes; then
7412 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007414as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007415See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007416 else
7417 ac_cv_sizeof_off_t=0
7418 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007420
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007421fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7423$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007424
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007425
7426
Martin v. Löwis11437992002-04-12 09:54:03 +00007427cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007428#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007429_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007430
Michael W. Hudson54241132001-12-07 15:38:26 +00007431
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7434$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007435if test "$have_long_long" = yes
7436then
7437if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007438 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007439
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007440$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7443$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007447fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007451fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007452
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007453# The cast to long int works around a bug in the HP C Compiler
7454# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7455# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7456# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7458$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007459if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007460 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007461else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007462 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007463#ifdef HAVE_SYS_TYPES_H
7464#include <sys/types.h>
7465#endif
7466#ifdef HAVE_TIME_H
7467#include <time.h>
7468#endif
7469
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007470"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007471
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007473 if test "$ac_cv_type_time_t" = yes; then
7474 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007476as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007477See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007478 else
7479 ac_cv_sizeof_time_t=0
7480 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007482
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7485$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007486
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007487
7488
Martin v. Löwis11437992002-04-12 09:54:03 +00007489cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007490#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007491_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007492
Michael W. Hudson54241132001-12-07 15:38:26 +00007493
7494
Trent Mick635f6fb2000-08-23 21:33:05 +00007495# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007496ac_save_cc="$CC"
7497if test "$ac_cv_kpthread" = "yes"
7498then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007499elif test "$ac_cv_kthread" = "yes"
7500then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007501elif test "$ac_cv_pthread" = "yes"
7502then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007503fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7505$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007506have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007508/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007509
7510 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007511int
7512main ()
7513{
Guido van Rossum12580492000-09-24 16:47:19 +00007514pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 ;
7516 return 0;
7517}
Matthias Klosec511b472010-05-08 11:01:39 +00007518
Martin v. Löwis11437992002-04-12 09:54:03 +00007519_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007521 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7525$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007526if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007527 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007528# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7529# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7530# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7532$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007533if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007534 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007536 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007537#ifdef HAVE_PTHREAD_H
7538#include <pthread.h>
7539#endif
7540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007541"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007542
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007543else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544 if test "$ac_cv_type_pthread_t" = yes; then
7545 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7546$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007547as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007548See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007549 else
7550 ac_cv_sizeof_pthread_t=0
7551 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007553
Trent Mick635f6fb2000-08-23 21:33:05 +00007554fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7556$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007557
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007558
7559
Martin v. Löwis11437992002-04-12 09:54:03 +00007560cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007561#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007562_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007563
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007564
Trent Mick635f6fb2000-08-23 21:33:05 +00007565fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007566CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007567
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7569$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007571if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007572 enableval=$enable_toolbox_glue;
7573fi
Jack Jansene578a632001-08-15 01:27:14 +00007574
7575
7576if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007577then
Jack Jansene578a632001-08-15 01:27:14 +00007578 case $ac_sys_system/$ac_sys_release in
7579 Darwin/*)
7580 enable_toolbox_glue="yes";;
7581 *)
7582 enable_toolbox_glue="no";;
7583 esac
7584fi
7585case "$enable_toolbox_glue" in
7586yes)
Jack Jansene578a632001-08-15 01:27:14 +00007587 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007588 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007589
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007590$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007591
7592 ;;
7593*)
Jack Jansene578a632001-08-15 01:27:14 +00007594 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007595 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007596 ;;
7597esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7599$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007600
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007601
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007602
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007603case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007604 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007605 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7606 ;;
7607 Darwin/*)
7608 OTHER_LIBTOOL_OPT=""
7609 ;;
7610esac
7611
7612
Ronald Oussoren25967582009-09-06 10:00:26 +00007613ARCH_RUN_32BIT=""
7614
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007615case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007616 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007617 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7618 if test "${enable_universalsdk}"; then
7619 :
7620 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007621 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007622 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007623 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007624 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007625 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007626 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007627 if test ${gcc_version} '<' 4.0
7628 then
7629 LIBTOOL_CRUFT="-lcc_dynamic"
7630 else
7631 LIBTOOL_CRUFT=""
7632 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007633 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007634 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007637/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007638
Ronald Oussoren25967582009-09-06 10:00:26 +00007639 #include <unistd.h>
7640 int main(int argc, char*argv[])
7641 {
7642 if (sizeof(long) == 4) {
7643 return 0;
7644 } else {
7645 return 1;
7646 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007647 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007648
Ronald Oussoren25967582009-09-06 10:00:26 +00007649_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007650if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007651 ac_osx_32bit=yes
7652else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007653 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007654fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7656 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007657fi
7658
7659
Ronald Oussoren25967582009-09-06 10:00:26 +00007660 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007661 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007662 i386)
7663 MACOSX_DEFAULT_ARCH="i386"
7664 ;;
7665 ppc)
7666 MACOSX_DEFAULT_ARCH="ppc"
7667 ;;
7668 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007669 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007670 ;;
7671 esac
7672 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007673 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007674 i386)
7675 MACOSX_DEFAULT_ARCH="x86_64"
7676 ;;
7677 ppc)
7678 MACOSX_DEFAULT_ARCH="ppc64"
7679 ;;
7680 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007681 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007682 ;;
7683 esac
7684
7685 #ARCH_RUN_32BIT="true"
7686 fi
7687
7688 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007689 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007690 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007691esac
7692
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7694$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007695if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007696then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007697 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007698 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007699 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007700
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007701$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007702
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7704$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007705 if test $enable_shared = "yes"
7706 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007707 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00007708 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7711$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007712fi
7713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7715$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007716case $ac_sys_system/$ac_sys_release in
7717 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007718
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007720
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7722$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007723 ;;
7724 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7726$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007727 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007728esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007729
Guido van Rossum0a516c91994-09-12 10:58:40 +00007730# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007731
Michael W. Hudson54241132001-12-07 15:38:26 +00007732
7733
7734
7735
Ronald Oussoren75912852010-04-08 08:13:31 +00007736
Guido van Rossum0a516c91994-09-12 10:58:40 +00007737# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007738# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7740$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007741if test -z "$SO"
7742then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007743 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007744 hp*|HP*)
7745 case `uname -m` in
7746 ia64) SO=.so;;
7747 *) SO=.sl;;
7748 esac
7749 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007750 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007751 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007752 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007753else
7754 # this might also be a termcap variable, see #610332
7755 echo
7756 echo '====================================================================='
7757 echo '+ +'
7758 echo '+ WARNING: You have set SO in your environment. +'
7759 echo '+ Do you really mean to change the extension for shared libraries? +'
7760 echo '+ Continuing in 10 seconds to let you to ponder. +'
7761 echo '+ +'
7762 echo '====================================================================='
7763 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007764fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7766$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007767
Ronald Oussoren79f90492009-01-02 10:44:46 +00007768
Neal Norwitz58e28882006-05-19 07:00:58 +00007769cat >>confdefs.h <<_ACEOF
7770#define SHLIB_EXT "$SO"
7771_ACEOF
7772
Guido van Rossum0a516c91994-09-12 10:58:40 +00007773# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007774# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007775# (Shared libraries in this instance are shared modules to be loaded into
7776# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7778$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007779if test -z "$LDSHARED"
7780then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007781 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007782 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007783 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007784 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007785 ;;
7786 BeOS*)
7787 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007788 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007789 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007790 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007791 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007793 if test "$GCC" = "yes" ; then
7794 LDSHARED='$(CC) -shared'
7795 LDCXXSHARED='$(CXX) -shared'
7796 else
7797 LDSHARED='$(CC) -G'
7798 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007799 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007800 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007801 if test "$GCC" = "yes" ; then
7802 LDSHARED='$(CC) -shared'
7803 LDCXXSHARED='$(CXX) -shared'
7804 else
7805 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007806 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007807 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007808 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007809 LDSHARED='$(CC) -bundle'
7810 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007811 if test "$enable_framework" ; then
7812 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007813 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7814 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007815 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007816 else
7817 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007818 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007819 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007820 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007821 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007822 LDSHARED='$(CC) -bundle'
7823 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007824 if test "$enable_framework" ; then
7825 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007826 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7827 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007828 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007829 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007830 # No framework, use the Python app as bundle-loader
7831 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007832 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007833 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007834 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007835 Darwin/*)
7836 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7837 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007838
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007839 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007840 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007841 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007842 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007843 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007844 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7845 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007846 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007847 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007848 LDSHARED='$(CC) -bundle'
7849 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007850 if test "$enable_framework" ; then
7851 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007852 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7853 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007854 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007855 else
7856 # No framework, use the Python app as bundle-loader
7857 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7858 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007859 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007860 fi
7861 fi
7862 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007863 Linux*|GNU*|QNX*)
7864 LDSHARED='$(CC) -shared'
7865 LDCXXSHARED='$(CXX) -shared';;
7866 BSD/OS*/4*)
7867 LDSHARED="gcc -shared"
7868 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007869 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007870 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007871 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007872 LDSHARED='$(CC) -shared'
7873 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007874 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007875 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007876 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007877 OpenBSD*)
7878 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7879 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007880 LDSHARED='$(CC) -shared $(CCSHARED)'
7881 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007882 else
7883 case `uname -r` in
7884 [01].* | 2.[0-7] | 2.[0-7].*)
7885 LDSHARED="ld -Bshareable ${LDFLAGS}"
7886 ;;
7887 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007888 LDSHARED='$(CC) -shared $(CCSHARED)'
7889 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007890 ;;
7891 esac
7892 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007893 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007894 LDSHARED='$(CC) -shared'
7895 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007896 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007897 if test "$GCC" = "yes" ; then
7898 LDSHARED='$(CC) -shared'
7899 LDCXXSHARED='$(CXX) -shared'
7900 else
7901 LDSHARED='$(CC) -G'
7902 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007903 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007904 SCO_SV*)
7905 LDSHARED='$(CC) -Wl,-G,-Bexport'
7906 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7907 CYGWIN*)
7908 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7909 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7910 atheos*)
7911 LDSHARED="gcc -shared"
7912 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007913 *) LDSHARED="ld";;
7914 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7917$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007918LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007919BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007920# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007921# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7923$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007924if test -z "$CCSHARED"
7925then
Guido van Rossum07397971997-04-29 21:49:50 +00007926 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007927 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007928 then CCSHARED="-fPIC";
7929 elif test `uname -p` = sparc;
7930 then CCSHARED="-xcode=pic32";
7931 else CCSHARED="-Kpic";
7932 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007933 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007934 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007935 else CCSHARED="+z";
7936 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007937 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007938 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007939 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007940 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007941 if test "$GCC" = "yes"
7942 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007943 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007944 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007945 SCO_SV*)
7946 if test "$GCC" = "yes"
7947 then CCSHARED="-fPIC"
7948 else CCSHARED="-Kpic -belf"
7949 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007950 IRIX*/6*) case $CC in
7951 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007952 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007953 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007954 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007955 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7958$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007959# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007960# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7962$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007963if test -z "$LINKFORSHARED"
7964then
Guido van Rossum07397971997-04-29 21:49:50 +00007965 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007966 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007967 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007968 LINKFORSHARED="-Wl,-E -Wl,+s";;
7969# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007970 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007971 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007972 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007974 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7975 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007976 # not used by the core itself but which needs to be in the core so
7977 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007978 # -prebind is no longer used, because it actually seems to give a
7979 # slowdown in stead of a speedup, maybe due to the large number of
7980 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007981
7982 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007983 if test "$enable_framework"
7984 then
Jack Jansenda49e192005-01-07 13:08:22 +00007985 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007986 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007987 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007988 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007989 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007990 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007991 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007992 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7993 then
7994 LINKFORSHARED="-Wl,--export-dynamic"
7995 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007996 SunOS/5*) case $CC in
7997 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007998 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007999 then
8000 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008001 fi;;
8002 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008003 CYGWIN*)
8004 if test $enable_shared = "no"
8005 then
8006 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8007 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008008 QNX*)
8009 # -Wl,-E causes the symbols to be added to the dynamic
8010 # symbol table so that they can be found when a module
8011 # is loaded. -N 2048K causes the stack size to be set
8012 # to 2048 kilobytes so that the stack doesn't overflow
8013 # when running test_compile.py.
8014 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008015 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8018$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008019
Michael W. Hudson54241132001-12-07 15:38:26 +00008020
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008021
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8023$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008024if test ! "$LIBRARY" = "$LDLIBRARY"
8025then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008026 case $ac_sys_system in
8027 CYGWIN*)
8028 # Cygwin needs CCSHARED when building extension DLLs
8029 # but not when building the interpreter DLL.
8030 CFLAGSFORSHARED='';;
8031 *)
8032 CFLAGSFORSHARED='$(CCSHARED)'
8033 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008034fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8036$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008037
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008038# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8039# library (with --enable-shared).
8040# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008041# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8042# if it is not required, since it creates a dependency of the shared library
8043# to LIBS. This, in turn, means that applications linking the shared libpython
8044# don't need to link LIBS explicitly. The default should be only changed
8045# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008046
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8048$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008049case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008050 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008051 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008052esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8054$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008055
8056
Guido van Rossum627b2d71993-12-24 10:39:16 +00008057# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8059$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008060if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008061 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008062else
Martin v. Löwis11437992002-04-12 09:54:03 +00008063 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008064LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008067
Martin v. Löwiseba40652007-08-30 20:10:57 +00008068/* Override any GCC internal prototype to avoid an error.
8069 Use char because int might match the return type of a GCC
8070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008071#ifdef __cplusplus
8072extern "C"
8073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008074char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008075int
8076main ()
8077{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008078return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ;
8080 return 0;
8081}
8082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008086 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008088rm -f core conftest.err conftest.$ac_objext \
8089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008090LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8093$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008094if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 cat >>confdefs.h <<_ACEOF
8096#define HAVE_LIBDL 1
8097_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008098
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008099 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008100
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008101fi
8102 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8104$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008105if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008107else
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008109LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008112
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113/* Override any GCC internal prototype to avoid an error.
8114 Use char because int might match the return type of a GCC
8115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008116#ifdef __cplusplus
8117extern "C"
8118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008119char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008120int
8121main ()
8122{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 ;
8125 return 0;
8126}
8127_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008131 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008132fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008133rm -f core conftest.err conftest.$ac_objext \
8134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008135LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8138$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008139if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008140 cat >>confdefs.h <<_ACEOF
8141#define HAVE_LIBDLD 1
8142_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008143
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008144 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008145
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008146fi
8147 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008148
Ronald Oussoren79f90492009-01-02 10:44:46 +00008149# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008150if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8152$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008153if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008154 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008155else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008156 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008159
Martin v. Löwiseba40652007-08-30 20:10:57 +00008160/* Override any GCC internal prototype to avoid an error.
8161 Use char because int might match the return type of a GCC
8162 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008163#ifdef __cplusplus
8164extern "C"
8165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008166char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008167int
8168main ()
8169{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008170return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 ;
8172 return 0;
8173}
8174_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008175for ac_lib in '' pthread rt posix4; do
8176 if test -z "$ac_lib"; then
8177 ac_res="none required"
8178 else
8179 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008180 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008182 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008184fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008185rm -f core conftest.err conftest.$ac_objext \
8186 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008187 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008191if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008192
Martin v. Löwiseba40652007-08-30 20:10:57 +00008193else
8194 ac_cv_search_sem_init=no
8195fi
8196rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008197LIBS=$ac_func_search_save_LIBS
8198fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8200$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008201ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008202if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008203 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008204
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008205fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008206 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008207 # posix4 on Solaris 2.6
8208 # pthread (first!) on Linux
8209fi
8210
Martin v. Löwis19d17342003-06-14 21:03:05 +00008211# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8213$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008214if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008215 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008216else
8217 ac_check_lib_save_LIBS=$LIBS
8218LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008220/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008221
Martin v. Löwiseba40652007-08-30 20:10:57 +00008222/* Override any GCC internal prototype to avoid an error.
8223 Use char because int might match the return type of a GCC
8224 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008225#ifdef __cplusplus
8226extern "C"
8227#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008228char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008229int
8230main ()
8231{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008232return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008233 ;
8234 return 0;
8235}
8236_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008237if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008238 ac_cv_lib_intl_textdomain=yes
8239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008240 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008242rm -f core conftest.err conftest.$ac_objext \
8243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008244LIBS=$ac_check_lib_save_LIBS
8245fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8247$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008248if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008249
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008251
8252fi
8253
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008254
8255# checks for system dependent C++ extensions support
8256case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008257 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8258$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008260/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008261
Georg Brandl94800df2011-02-25 11:09:02 +00008262 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008263int
8264main ()
8265{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008266loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 ;
8268 return 0;
8269}
Matthias Klosec511b472010-05-08 11:01:39 +00008270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008273
Matthias Klosec511b472010-05-08 11:01:39 +00008274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008275$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
Matthias Klosec511b472010-05-08 11:01:39 +00008277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008278$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008279
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008280else
Matthias Klosec511b472010-05-08 11:01:39 +00008281
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008283$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008284
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008285fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008286rm -f core conftest.err conftest.$ac_objext \
8287 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008288 *) ;;
8289esac
8290
Guido van Rossum70c7f481998-03-26 18:44:10 +00008291# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008292# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8294$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008295if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008297else
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008299LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008302
Martin v. Löwiseba40652007-08-30 20:10:57 +00008303/* Override any GCC internal prototype to avoid an error.
8304 Use char because int might match the return type of a GCC
8305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008306#ifdef __cplusplus
8307extern "C"
8308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008309char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008310int
8311main ()
8312{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 ;
8315 return 0;
8316}
8317_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008318if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008319 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008321 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008323rm -f core conftest.err conftest.$ac_objext \
8324 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008325LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8328$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008329if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008330 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008331fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008332 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8334$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008335if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008336 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008337else
Martin v. Löwis11437992002-04-12 09:54:03 +00008338 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008339LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008342
Martin v. Löwiseba40652007-08-30 20:10:57 +00008343/* Override any GCC internal prototype to avoid an error.
8344 Use char because int might match the return type of a GCC
8345 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008346#ifdef __cplusplus
8347extern "C"
8348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008349char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008350int
8351main ()
8352{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008353return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 ;
8355 return 0;
8356}
8357_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008358if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008360else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008361 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008362fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008363rm -f core conftest.err conftest.$ac_objext \
8364 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008365LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8368$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008369if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008370 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008371fi
8372 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008373
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008374case "$ac_sys_system" in
8375BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8377$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008378if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008379 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008380else
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008382LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386/* Override any GCC internal prototype to avoid an error.
8387 Use char because int might match the return type of a GCC
8388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008389#ifdef __cplusplus
8390extern "C"
8391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008392char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008393int
8394main ()
8395{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008396return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 ;
8398 return 0;
8399}
8400_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008404 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008405fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008406rm -f core conftest.err conftest.$ac_objext \
8407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008408LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008409fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8411$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008412if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008413 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008414fi
8415 # BeOS
8416;;
8417esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8420$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008421
Martin v. Löwiseba40652007-08-30 20:10:57 +00008422# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008423if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008424 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8426$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008427LIBS="$withval $LIBS"
8428
8429else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8431$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008432fi
8433
Guido van Rossum7f43da71994-08-01 12:15:30 +00008434
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008435if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008436 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8437set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8439$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008440if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008441 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008442else
8443 case $PKG_CONFIG in
8444 [\\/]* | ?:[\\/]*)
8445 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8446 ;;
8447 *)
8448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8449for as_dir in $PATH
8450do
8451 IFS=$as_save_IFS
8452 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008453 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008455 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008457 break 2
8458 fi
8459done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008460 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008461IFS=$as_save_IFS
8462
8463 ;;
8464esac
8465fi
8466PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8467if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8469$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8472$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008473fi
8474
8475
8476fi
8477if test -z "$ac_cv_path_PKG_CONFIG"; then
8478 ac_pt_PKG_CONFIG=$PKG_CONFIG
8479 # Extract the first word of "pkg-config", so it can be a program name with args.
8480set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8482$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008483if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008484 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008485else
8486 case $ac_pt_PKG_CONFIG in
8487 [\\/]* | ?:[\\/]*)
8488 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8489 ;;
8490 *)
8491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8492for as_dir in $PATH
8493do
8494 IFS=$as_save_IFS
8495 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008496 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01008497 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008498 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008500 break 2
8501 fi
8502done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008503 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008504IFS=$as_save_IFS
8505
8506 ;;
8507esac
8508fi
8509ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8510if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8512$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008513else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8515$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008516fi
8517
8518 if test "x$ac_pt_PKG_CONFIG" = x; then
8519 PKG_CONFIG=""
8520 else
8521 case $cross_compiling:$ac_tool_warned in
8522yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8524$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008525ac_tool_warned=yes ;;
8526esac
8527 PKG_CONFIG=$ac_pt_PKG_CONFIG
8528 fi
8529else
8530 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8531fi
8532
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008533
8534# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8536$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008537
8538# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008539if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008540 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008541else
8542 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008543fi
8544
8545
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8547$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008548
8549# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8551$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008552
8553# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008554if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008555 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008556else
8557 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008558fi
8559
8560
8561if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008562 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8563else
8564 LIBFFI_INCLUDEDIR=""
8565fi
8566
8567
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8569$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008570
Benjamin Peterson867475c2009-04-29 20:36:25 +00008571# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8573$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008574
8575# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008576if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008577 withval=$with_dbmliborder;
8578if test x$with_dbmliborder = xyes
8579then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008580as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008581else
8582 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8583 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8584 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008585 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008586 fi
8587 done
8588fi
8589fi
8590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8592$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008593
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008594# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008595
8596
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8598$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Martin v. Löwiseba40652007-08-30 20:10:57 +00008600# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008601if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008602 withval=$with_signal_module;
8603fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008604
8605
8606if test -z "$with_signal_module"
8607then with_signal_module="yes"
8608fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8610$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008611
8612if test "${with_signal_module}" = "yes"; then
8613 USE_SIGNAL_MODULE=""
8614 SIGNAL_OBJS=""
8615else
8616 USE_SIGNAL_MODULE="#"
8617 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8618fi
8619
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008620# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008621
Barry Warsawc0d24d82000-06-29 16:12:00 +00008622USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008623
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8625$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008626
Guido van Rossumec2f0731997-01-22 20:54:01 +00008627
Martin v. Löwiseba40652007-08-30 20:10:57 +00008628# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008629if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008630 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8632$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008633LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008634if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008635 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008636fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8639$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008640fi
8641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642
8643# Templates for things AC_DEFINEd more than once.
8644# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008645
8646
Martin v. Löwis11437992002-04-12 09:54:03 +00008647
8648
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8650$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008651
Martin v. Löwiseba40652007-08-30 20:10:57 +00008652# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008654 withval=$with_threads;
8655fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008656
8657
Barry Warsawc0d24d82000-06-29 16:12:00 +00008658# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008659
Martin v. Löwiseba40652007-08-30 20:10:57 +00008660# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008661if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008662 withval=$with_thread; with_threads=$with_thread
8663fi
8664
Barry Warsawc0d24d82000-06-29 16:12:00 +00008665
8666if test -z "$with_threads"
8667then with_threads="yes"
8668fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8670$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008671
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008672
Barry Warsawc0d24d82000-06-29 16:12:00 +00008673if test "$with_threads" = "no"
8674then
8675 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008676elif test "$ac_cv_pthread_is_default" = yes
8677then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008678 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008679
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008680 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008681 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008682
8683 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008685elif test "$ac_cv_kpthread" = "yes"
8686then
8687 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008688 if test "$ac_cv_cxx_thread" = "yes"; then
8689 CXX="$CXX -Kpthread"
8690 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008691 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008692
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008693 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008694 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008695elif test "$ac_cv_kthread" = "yes"
8696then
8697 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008698 if test "$ac_cv_cxx_thread" = "yes"; then
8699 CXX="$CXX -Kthread"
8700 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008701 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008702
8703 posix_threads=yes
8704 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008705elif test "$ac_cv_pthread" = "yes"
8706then
8707 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008708 if test "$ac_cv_cxx_thread" = "yes"; then
8709 CXX="$CXX -pthread"
8710 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008711 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008712
8713 posix_threads=yes
8714 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008715else
8716 if test ! -z "$with_threads" -a -d "$with_threads"
8717 then LDFLAGS="$LDFLAGS -L$with_threads"
8718 fi
8719 if test ! -z "$withval" -a -d "$withval"
8720 then LDFLAGS="$LDFLAGS -L$withval"
8721 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008722
8723 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008724 # define _POSIX_THREADS in unistd.h. Some apparently don't
8725 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8727$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008730
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008731#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008732#ifdef _POSIX_THREADS
8733yes
8734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008735
8736_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008737if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008738 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008739 unistd_defines_pthreads=yes
8740else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008741 unistd_defines_pthreads=no
8742fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008743rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008744
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8746$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008747
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008748 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008749
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008750 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008751if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008752 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008753
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008755
Martin v. Löwis11437992002-04-12 09:54:03 +00008756
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008757$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008758
8759 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008760 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008761else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008762
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008763 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008764if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008765 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008766
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008768
Martin v. Löwis11437992002-04-12 09:54:03 +00008769
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008770$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008771
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008772 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008773else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008774
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8776$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008777
Martin v. Löwiseba40652007-08-30 20:10:57 +00008778# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779if test "${with_pth+set}" = set; then :
8780 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8781$as_echo "$withval" >&6; }
8782 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008783
8784
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008785$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008786
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008787 LIBS="-lpth $LIBS"
8788 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008789else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8791$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008792
8793 # Just looking for pthread_create in libpthread is not enough:
8794 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8795 # So we really have to include pthread.h, and then link.
8796 _libs=$LIBS
8797 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8799$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008801/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01008802
8803#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008804#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008805
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008806void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008807int
8808main ()
8809{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008810
8811pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ;
8813 return 0;
8814}
8815_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008817
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8819$as_echo "yes" >&6; }
8820 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008821
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008822 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008823 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008824else
Martin v. Löwis11437992002-04-12 09:54:03 +00008825
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008826 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008827 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008828if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008830
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008831 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008832 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008833else
Guido van Rossumad678af1998-10-02 14:42:15 +00008834
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008836if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008837 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008838
8839
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008840$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008841
8842 THREADOBJ="Python/thread.o"
8843else
8844
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008845 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008846if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008848
8849
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008850$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008851
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008852 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008853else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008854
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8856$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008857if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008859else
Martin v. Löwis11437992002-04-12 09:54:03 +00008860 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008861LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864
Martin v. Löwiseba40652007-08-30 20:10:57 +00008865/* Override any GCC internal prototype to avoid an error.
8866 Use char because int might match the return type of a GCC
8867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008868#ifdef __cplusplus
8869extern "C"
8870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008871char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008872int
8873main ()
8874{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008875return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ;
8877 return 0;
8878}
8879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008883 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008885rm -f core conftest.err conftest.$ac_objext \
8886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008887LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008888fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8890$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008891if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008892 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008893
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008894 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008895 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008896 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008897else
Greg Steinadf63d62000-07-05 10:38:09 +00008898
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8900$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008901if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008902 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008903else
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008905LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008908
Martin v. Löwiseba40652007-08-30 20:10:57 +00008909/* Override any GCC internal prototype to avoid an error.
8910 Use char because int might match the return type of a GCC
8911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008912#ifdef __cplusplus
8913extern "C"
8914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008915char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008916int
8917main ()
8918{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008919return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ;
8921 return 0;
8922}
8923_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008927 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008928fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008929rm -f core conftest.err conftest.$ac_objext \
8930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008931LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8934$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008935if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008936 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008937
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008938 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008939 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008940 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008941else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8944$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008945if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008946 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008947else
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008949LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008952
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953/* Override any GCC internal prototype to avoid an error.
8954 Use char because int might match the return type of a GCC
8955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008956#ifdef __cplusplus
8957extern "C"
8958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008959char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008960int
8961main ()
8962{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ;
8965 return 0;
8966}
8967_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008968if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008971 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008973rm -f core conftest.err conftest.$ac_objext \
8974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008975LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8978$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008979if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008980 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008981
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008982 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008983 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008984 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008985else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008986
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8988$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008989if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008990 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008991else
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008993LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008996
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997/* Override any GCC internal prototype to avoid an error.
8998 Use char because int might match the return type of a GCC
8999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000#ifdef __cplusplus
9001extern "C"
9002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009003char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009004int
9005main ()
9006{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009007return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 ;
9009 return 0;
9010}
9011_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009017rm -f core conftest.err conftest.$ac_objext \
9018 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009019LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009020fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9022$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009023if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009025
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009026 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009027 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009028 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009029else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009030
Martin v. Löwis130fb172001-07-19 11:00:41 +00009031 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009032fi
9033
Guido van Rossum627b2d71993-12-24 10:39:16 +00009034
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009035fi
9036
Guido van Rossum0be3e491997-05-22 20:33:33 +00009037fi
9038
Guido van Rossum49545951997-12-02 19:28:29 +00009039fi
9040
Guido van Rossumb93a8621998-05-07 13:27:32 +00009041fi
9042
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009043
Michael W. Hudson54241132001-12-07 15:38:26 +00009044fi
9045
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009046
9047fi
9048
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009049fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050rm -f core conftest.err conftest.$ac_objext \
9051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052fi
9053
Martin v. Löwis11437992002-04-12 09:54:03 +00009054fi
9055
9056
9057fi
9058
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009059
Michael W. Hudson54241132001-12-07 15:38:26 +00009060
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9062$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009063if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009064 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009065else
Martin v. Löwis11437992002-04-12 09:54:03 +00009066 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009067LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009070
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071/* Override any GCC internal prototype to avoid an error.
9072 Use char because int might match the return type of a GCC
9073 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009074#ifdef __cplusplus
9075extern "C"
9076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009077char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009078int
9079main ()
9080{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 ;
9083 return 0;
9084}
9085_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009091rm -f core conftest.err conftest.$ac_objext \
9092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009093LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009094fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9096$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009097if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009098 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009099
Martin v. Löwis130fb172001-07-19 11:00:41 +00009100 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009101 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009102 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009103fi
9104
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009105
Neal Norwitza978ab02002-11-02 16:58:05 +00009106 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9108$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009109if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009110 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009111else
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009113LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009116
Martin v. Löwiseba40652007-08-30 20:10:57 +00009117/* Override any GCC internal prototype to avoid an error.
9118 Use char because int might match the return type of a GCC
9119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009120#ifdef __cplusplus
9121extern "C"
9122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009123char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009124int
9125main ()
9126{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009127return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009128 ;
9129 return 0;
9130}
9131_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009132if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009135 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009137rm -f core conftest.err conftest.$ac_objext \
9138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009139LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9142$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009143if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009144 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009145
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009146 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009147 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009148 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009149fi
9150
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009151 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009152
Martin v. Löwis130fb172001-07-19 11:00:41 +00009153 if test "$USE_THREAD_MODULE" != "#"
9154 then
9155 # If the above checks didn't disable threads, (at least) OSF1
9156 # needs this '-threads' argument during linking.
9157 case $ac_sys_system in
9158 OSF1) LDLAST=-threads;;
9159 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009160 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009161fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009162
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009163if test "$posix_threads" = "yes"; then
9164 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009165
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009166$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009167
9168 fi
9169
9170 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9171 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009172 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009173$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009174
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009175 ;;
9176 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009177$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009178
9179 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009180 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009181$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009182
9183 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009184 esac
9185
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9187$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009188 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009189 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009192 ac_cv_pthread_system_supported=no
9193else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009195/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009196
9197 #include <stdio.h>
9198 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009199 void *foo(void *parm) {
9200 return NULL;
9201 }
9202 main() {
9203 pthread_attr_t attr;
9204 pthread_t id;
9205 if (pthread_attr_init(&attr)) exit(-1);
9206 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9207 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9208 exit(0);
9209 }
9210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009211if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009212 ac_cv_pthread_system_supported=yes
9213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009214 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009218fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009219
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220
Guido van Rossum627b2d71993-12-24 10:39:16 +00009221fi
9222
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9224$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009225 if test "$ac_cv_pthread_system_supported" = "yes"; then
9226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009227$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009228
9229 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009230 for ac_func in pthread_sigmask
9231do :
9232 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009233if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009234 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009235#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009236_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009237 case $ac_sys_system in
9238 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009239
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009240$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009241
9242 ;;
9243 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009244fi
9245done
9246
9247fi
9248
9249
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009250# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9253$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009254# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009256 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009257 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009260 ipv6=no
9261 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009262 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9263$as_echo "yes" >&6; }
9264 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009265
9266 ipv6=yes
9267 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009269else
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009272/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273 /* AF_INET6 available check */
9274#include <sys/types.h>
9275#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009276int
9277main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009278{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009279int domain = AF_INET6;
9280 ;
9281 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009282}
Martin v. Löwis11437992002-04-12 09:54:03 +00009283_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009284if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009285
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9287$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009288 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009289
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009290else
Matthias Klosec511b472010-05-08 11:01:39 +00009291
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9293$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009294 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009295
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009296fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009299if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9301$as_echo_n "checking if RFC2553 API is available... " >&6; }
9302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009303/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009304
9305 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009306#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009307int
9308main ()
9309{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009310struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009311 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 ;
9313 return 0;
9314}
Matthias Klosec511b472010-05-08 11:01:39 +00009315
Martin v. Löwis11437992002-04-12 09:54:03 +00009316_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009317if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009318
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009320$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009321 ipv6=yes
9322
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009323else
Matthias Klosec511b472010-05-08 11:01:39 +00009324
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009327 ipv6=no
9328
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009331fi
9332
9333if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009334 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009335
9336fi
9337
Martin v. Löwiseba40652007-08-30 20:10:57 +00009338fi
9339
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009340
9341ipv6type=unknown
9342ipv6lib=none
9343ipv6trylibc=no
9344
9345if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9347$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009348 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9349 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009350 case $i in
9351 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009353/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009354
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009355#include <netinet/in.h>
9356#ifdef IPV6_INRIA_VERSION
9357yes
9358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009359_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009362 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009363fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009364rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009365
9366 ;;
9367 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009369/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009370
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009371#include <netinet/in.h>
9372#ifdef __KAME__
9373yes
9374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009375_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009377 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009378 ipv6type=$i;
9379 ipv6lib=inet6
9380 ipv6libdir=/usr/local/v6/lib
9381 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009382fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009383rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009384
9385 ;;
9386 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009388/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009389
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009390#include <features.h>
9391#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9392yes
9393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009394_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009396 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009397 ipv6type=$i;
9398 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009399fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009400rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009401
9402 ;;
9403 linux-inet6)
9404 if test -d /usr/inet6; then
9405 ipv6type=$i
9406 ipv6lib=inet6
9407 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009408 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009409 fi
9410 ;;
9411 solaris)
9412 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009413 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009414 ipv6type=$i
9415 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009416 fi
9417 fi
9418 ;;
9419 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009421/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009422
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009423#include <sys/param.h>
9424#ifdef _TOSHIBA_INET6
9425yes
9426#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009427_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009428if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009430 ipv6type=$i;
9431 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009432 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009433fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009434rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009435
9436 ;;
9437 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009439/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009440
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009441#include </usr/local/v6/include/sys/v6config.h>
9442#ifdef __V6D__
9443yes
9444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009445_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009447 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009448 ipv6type=$i;
9449 ipv6lib=v6;
9450 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009451 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009452fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009453rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009454
9455 ;;
9456 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009459
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009460#include <sys/param.h>
9461#ifdef _ZETA_MINAMI_INET6
9462yes
9463#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009464_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009466 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009467 ipv6type=$i;
9468 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009469 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009470fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009471rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009472
9473 ;;
9474 esac
9475 if test "$ipv6type" != "unknown"; then
9476 break
9477 fi
9478 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9480$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009481fi
9482
9483if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9484 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9485 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9486 echo "using lib$ipv6lib"
9487 else
9488 if test $ipv6trylibc = "yes"; then
9489 echo "using libc"
9490 else
9491 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9492 echo "You need to fetch lib$ipv6lib.a from appropriate"
9493 echo 'ipv6 kit and compile beforehand.'
9494 exit 1
9495 fi
9496 fi
9497fi
9498
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9500$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009502/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009503
9504 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009505int
9506main ()
9507{
9508FSIORefNum fRef = 0
9509 ;
9510 return 0;
9511}
Mark Dickinson0712b562010-05-08 19:13:21 +00009512
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009514if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009515
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009516
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009517$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009518
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9520$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009521
Mark Dickinson0712b562010-05-08 19:13:21 +00009522else
9523
9524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9525$as_echo "no" >&6; }
9526
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009527fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9529
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009530# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9532$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009533
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009536 withval=$with_doc_strings;
9537fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009538
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009539
9540if test -z "$with_doc_strings"
9541then with_doc_strings="yes"
9542fi
9543if test "$with_doc_strings" != "no"
9544then
9545
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009546$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009547
9548fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9550$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009551
Neil Schemenauera35c6882001-02-27 04:45:05 +00009552# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9554$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009555
Martin v. Löwiseba40652007-08-30 20:10:57 +00009556# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009557if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009558 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009559if test "$withval" != no
9560then
9561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009562$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009563
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9565$as_echo "yes" >&6; }
9566else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9567$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009568fi
9569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9571$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009572fi
9573
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009574
9575# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9577$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009578
Martin v. Löwiseba40652007-08-30 20:10:57 +00009579# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009581 withval=$with_pymalloc;
9582fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009583
Neil Schemenauera35c6882001-02-27 04:45:05 +00009584
Neil Schemenauer16c22972002-03-22 15:34:49 +00009585if test -z "$with_pymalloc"
9586then with_pymalloc="yes"
9587fi
9588if test "$with_pymalloc" != "no"
9589then
Martin v. Löwis11437992002-04-12 09:54:03 +00009590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009592
9593fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9595$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009596
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009597# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9599$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009600
9601# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009602if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009603 withval=$with_valgrind;
9604else
9605 with_valgrind=no
9606fi
9607
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9609$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009610if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009611 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009612if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009614$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009615
9616else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009617 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009618
9619fi
9620
9621
9622fi
9623
Barry Warsawef82cd72000-06-30 16:21:01 +00009624# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9626$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009627
Martin v. Löwiseba40652007-08-30 20:10:57 +00009628# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009629if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009630 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009631if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009632then
9633
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009635
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9637$as_echo "yes" >&6; }
9638else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9639$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009640fi
9641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9643$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009644fi
9645
Barry Warsawef82cd72000-06-30 16:21:01 +00009646
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009647# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009648
Guido van Rossum98935bf2001-09-05 19:13:16 +00009649DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009650
Guido van Rossume97ee181999-12-20 21:27:22 +00009651# the dlopen() function means we might want to use dynload_shlib.o. some
9652# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009653for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009654do :
9655 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009656if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009658#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009659_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009660
Guido van Rossume97ee181999-12-20 21:27:22 +00009661fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009662done
Guido van Rossume97ee181999-12-20 21:27:22 +00009663
Michael W. Hudson54241132001-12-07 15:38:26 +00009664
Guido van Rossume97ee181999-12-20 21:27:22 +00009665# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9666# loading of modules.
9667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9669$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009670if test -z "$DYNLOADFILE"
9671then
9672 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009673 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9674 if test "$ac_cv_func_dlopen" = yes
9675 then DYNLOADFILE="dynload_shlib.o"
9676 else DYNLOADFILE="dynload_aix.o"
9677 fi
9678 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009679 BeOS*) DYNLOADFILE="dynload_beos.o";;
9680 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009681 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9682 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009683 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009684 *)
9685 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9686 # out any dynamic loading
9687 if test "$ac_cv_func_dlopen" = yes
9688 then DYNLOADFILE="dynload_shlib.o"
9689 else DYNLOADFILE="dynload_stub.o"
9690 fi
9691 ;;
9692 esac
9693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9695$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009696if test "$DYNLOADFILE" != "dynload_stub.o"
9697then
Martin v. Löwis11437992002-04-12 09:54:03 +00009698
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009699$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009700
9701fi
9702
Neil Schemenauer4e425612001-06-19 15:44:15 +00009703# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9704
Michael W. Hudson54241132001-12-07 15:38:26 +00009705
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9707$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009708if test -z "$MACHDEP_OBJS"
9709then
Jack Jansene578a632001-08-15 01:27:14 +00009710 MACHDEP_OBJS=$extra_machdep_objs
9711else
9712 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009713fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9715$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009716
Guido van Rossum627b2d71993-12-24 10:39:16 +00009717# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009718for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9719 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009720 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009721 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009722 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009723 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009724 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009725 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9726 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009727 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009728 setlocale setregid setreuid setresuid setresgid \
9729 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009730 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009731 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009732 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009733do :
9734 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9735ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009736if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009738#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009739_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009741fi
9742done
9743
Michael W. Hudson54241132001-12-07 15:38:26 +00009744
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009745# For some functions, having a definition is not sufficient, since
9746# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9748$as_echo_n "checking for chroot... " >&6; }
9749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009750/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009751#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009752int
9753main ()
9754{
9755void *x=chroot
9756 ;
9757 return 0;
9758}
9759_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009761
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009762$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009763
Matthias Klosec511b472010-05-08 11:01:39 +00009764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9768$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009769
9770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9773$as_echo_n "checking for link... " >&6; }
9774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009775/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009776#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009777int
9778main ()
9779{
9780void *x=link
9781 ;
9782 return 0;
9783}
9784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009785if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009786
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009787$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009788
Matthias Klosec511b472010-05-08 11:01:39 +00009789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009790$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9793$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009794
9795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9798$as_echo_n "checking for symlink... " >&6; }
9799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009800/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009801#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009802int
9803main ()
9804{
9805void *x=symlink
9806 ;
9807 return 0;
9808}
9809_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009810if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009811
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009812$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009813
Matthias Klosec511b472010-05-08 11:01:39 +00009814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009815$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9818$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009819
9820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9823$as_echo_n "checking for fchdir... " >&6; }
9824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009825/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009826#include <unistd.h>
9827int
9828main ()
9829{
9830void *x=fchdir
9831 ;
9832 return 0;
9833}
9834_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009835if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009836
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009837$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009838
Matthias Klosec511b472010-05-08 11:01:39 +00009839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009840$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9843$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009844
9845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9848$as_echo_n "checking for fsync... " >&6; }
9849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009850/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009851#include <unistd.h>
9852int
9853main ()
9854{
9855void *x=fsync
9856 ;
9857 return 0;
9858}
9859_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009860if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009861
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009862$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009863
Matthias Klosec511b472010-05-08 11:01:39 +00009864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009865$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009869
9870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9873$as_echo_n "checking for fdatasync... " >&6; }
9874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009875/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009876#include <unistd.h>
9877int
9878main ()
9879{
9880void *x=fdatasync
9881 ;
9882 return 0;
9883}
9884_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009885if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009887$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009888
Matthias Klosec511b472010-05-08 11:01:39 +00009889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009890$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009894
9895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9898$as_echo_n "checking for epoll... " >&6; }
9899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009900/* end confdefs.h. */
9901#include <sys/epoll.h>
9902int
9903main ()
9904{
9905void *x=epoll_create
9906 ;
9907 return 0;
9908}
9909_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009910if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009911
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009912$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009913
Matthias Klosec511b472010-05-08 11:01:39 +00009914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009915$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9918$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009919
9920fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9923$as_echo_n "checking for kqueue... " >&6; }
9924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009925/* end confdefs.h. */
9926
9927#include <sys/types.h>
9928#include <sys/event.h>
9929
9930int
9931main ()
9932{
9933int x=kqueue()
9934 ;
9935 return 0;
9936}
9937_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009938if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009939
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009940$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009941
Matthias Klosec511b472010-05-08 11:01:39 +00009942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009943$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009947
9948fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009950# On some systems (eg. FreeBSD 5), we would find a definition of the
9951# functions ctermid_r, setgroups in the library, but no prototype
9952# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9953# address to avoid compiler warnings and potential miscompilations
9954# because of the missing prototypes.
9955
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9957$as_echo_n "checking for ctermid_r... " >&6; }
9958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009959/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009960
Martin v. Löwisd5843682002-11-21 20:41:28 +00009961#include <stdio.h>
9962
Martin v. Löwisd5843682002-11-21 20:41:28 +00009963int
9964main ()
9965{
9966void* p = ctermid_r
9967 ;
9968 return 0;
9969}
9970_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009972
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009973$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009974
Matthias Klosec511b472010-05-08 11:01:39 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009976$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009980
9981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9983
Antoine Pitroub170f172010-09-10 18:47:36 +00009984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9985$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009986if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009987 $as_echo_n "(cached) " >&6
9988else
9989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009990/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009991#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009992int
9993main ()
9994{
9995void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009996
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009997 ;
9998 return 0;
9999}
10000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010001if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010002 ac_cv_flock_decl=yes
10003else
10004 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010005
10006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010008
Antoine Pitroub170f172010-09-10 18:47:36 +000010009fi
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10011$as_echo "$ac_cv_flock_decl" >&6; }
10012if test "x${ac_cv_flock_decl}" = xyes; then
10013 for ac_func in flock
10014do :
10015 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010016if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010017 cat >>confdefs.h <<_ACEOF
10018#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010019_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010020
Antoine Pitrou85729812010-09-07 14:55:24 +000010021else
Antoine Pitroub170f172010-09-10 18:47:36 +000010022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010023$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010024if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010025 $as_echo_n "(cached) " >&6
10026else
10027 ac_check_lib_save_LIBS=$LIBS
10028LIBS="-lbsd $LIBS"
10029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10030/* end confdefs.h. */
10031
10032/* Override any GCC internal prototype to avoid an error.
10033 Use char because int might match the return type of a GCC
10034 builtin and then its argument prototype would still apply. */
10035#ifdef __cplusplus
10036extern "C"
10037#endif
10038char flock ();
10039int
10040main ()
10041{
10042return flock ();
10043 ;
10044 return 0;
10045}
10046_ACEOF
10047if ac_fn_c_try_link "$LINENO"; then :
10048 ac_cv_lib_bsd_flock=yes
10049else
10050 ac_cv_lib_bsd_flock=no
10051fi
10052rm -f core conftest.err conftest.$ac_objext \
10053 conftest$ac_exeext conftest.$ac_ext
10054LIBS=$ac_check_lib_save_LIBS
10055fi
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10057$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010058if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010059 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010060
10061
10062$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10063
10064
10065fi
10066
10067
10068fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010069done
10070
Antoine Pitrou85729812010-09-07 14:55:24 +000010071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010072
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10074$as_echo_n "checking for getpagesize... " >&6; }
10075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010076/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010077
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010078#include <unistd.h>
10079
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010080int
10081main ()
10082{
10083void* p = getpagesize
10084 ;
10085 return 0;
10086}
10087_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010089
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010091
Matthias Klosec511b472010-05-08 11:01:39 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010097
10098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010100
Charles-François Natali93a11752011-11-27 13:01:35 +010010101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10102$as_echo_n "checking for broken unsetenv... " >&6; }
10103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10104/* end confdefs.h. */
10105
10106#include <stdlib.h>
10107
10108int
10109main ()
10110{
10111int res = unsetenv("DUMMY")
10112 ;
10113 return 0;
10114}
10115_ACEOF
10116if ac_fn_c_try_compile "$LINENO"; then :
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119else
10120
10121$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10122
10123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10124$as_echo "yes" >&6; }
10125
10126fi
10127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10128
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010129for ac_prog in true
10130do
10131 # Extract the first word of "$ac_prog", so it can be a program name with args.
10132set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10134$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010135if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010136 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010137else
10138 if test -n "$TRUE"; then
10139 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10140else
10141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10142for as_dir in $PATH
10143do
10144 IFS=$as_save_IFS
10145 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010146 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010148 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010149 $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 +000010150 break 2
10151 fi
10152done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010153 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010154IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010155
10156fi
10157fi
10158TRUE=$ac_cv_prog_TRUE
10159if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10161$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010165fi
10166
Martin v. Löwiseba40652007-08-30 20:10:57 +000010167
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010168 test -n "$TRUE" && break
10169done
10170test -n "$TRUE" || TRUE="/bin/true"
10171
10172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10174$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010175if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010176 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010177else
10178 ac_check_lib_save_LIBS=$LIBS
10179LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010181/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010182
Martin v. Löwiseba40652007-08-30 20:10:57 +000010183/* Override any GCC internal prototype to avoid an error.
10184 Use char because int might match the return type of a GCC
10185 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010186#ifdef __cplusplus
10187extern "C"
10188#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010189char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010190int
10191main ()
10192{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010193return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010194 ;
10195 return 0;
10196}
10197_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010198if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010199 ac_cv_lib_c_inet_aton=yes
10200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010201 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010203rm -f core conftest.err conftest.$ac_objext \
10204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010205LIBS=$ac_check_lib_save_LIBS
10206fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10208$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010209if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010210 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10213$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010214if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010215 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010216else
10217 ac_check_lib_save_LIBS=$LIBS
10218LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010221
Martin v. Löwiseba40652007-08-30 20:10:57 +000010222/* Override any GCC internal prototype to avoid an error.
10223 Use char because int might match the return type of a GCC
10224 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010225#ifdef __cplusplus
10226extern "C"
10227#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010228char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010229int
10230main ()
10231{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010232return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010233 ;
10234 return 0;
10235}
10236_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010237if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010238 ac_cv_lib_resolv_inet_aton=yes
10239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010242rm -f core conftest.err conftest.$ac_objext \
10243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010244LIBS=$ac_check_lib_save_LIBS
10245fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10247$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010248if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010249 cat >>confdefs.h <<_ACEOF
10250#define HAVE_LIBRESOLV 1
10251_ACEOF
10252
10253 LIBS="-lresolv $LIBS"
10254
10255fi
10256
10257
10258fi
10259
10260
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010261# On Tru64, chflags seems to be present, but calling it will
10262# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10264$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010265if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010266 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010269 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010272/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010273
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010274#include <sys/stat.h>
10275#include <unistd.h>
10276int main(int argc, char*argv[])
10277{
10278 if(chflags(argv[0], 0) != 0)
10279 return 1;
10280 return 0;
10281}
Ned Deily43e10542011-06-27 23:41:53 -070010282
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010284if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010285 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010287 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010288fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10290 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010291fi
10292
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010293
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010294fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10296$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010297if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010299if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010300 ac_cv_have_chflags="yes"
10301else
10302 ac_cv_have_chflags="no"
10303fi
10304
10305fi
10306if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010308$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010309
10310fi
10311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10313$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010314if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010315 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010316else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010318 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010321/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010322
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010323#include <sys/stat.h>
10324#include <unistd.h>
10325int main(int argc, char*argv[])
10326{
10327 if(lchflags(argv[0], 0) != 0)
10328 return 1;
10329 return 0;
10330}
Ned Deily43e10542011-06-27 23:41:53 -070010331
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010333if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010334 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010337fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010340fi
10341
10342
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010343fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10345$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010346if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010347 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010348if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010349 ac_cv_have_lchflags="yes"
10350else
10351 ac_cv_have_lchflags="no"
10352fi
10353
10354fi
10355if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010356
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010358
10359fi
10360
Ronald Oussorenf8752642006-07-06 10:13:35 +000010361case $ac_sys_system/$ac_sys_release in
10362Darwin/*)
10363 _CUR_CFLAGS="${CFLAGS}"
10364 _CUR_LDFLAGS="${LDFLAGS}"
10365 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10366 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10367 ;;
10368esac
10369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10371$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010372if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010373 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010374else
10375 ac_check_lib_save_LIBS=$LIBS
10376LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010378/* end confdefs.h. */
10379
Martin v. Löwiseba40652007-08-30 20:10:57 +000010380/* Override any GCC internal prototype to avoid an error.
10381 Use char because int might match the return type of a GCC
10382 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010383#ifdef __cplusplus
10384extern "C"
10385#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010386char inflateCopy ();
10387int
10388main ()
10389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010390return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010391 ;
10392 return 0;
10393}
10394_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010396 ac_cv_lib_z_inflateCopy=yes
10397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010398 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010399fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010400rm -f core conftest.err conftest.$ac_objext \
10401 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010402LIBS=$ac_check_lib_save_LIBS
10403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10405$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010406if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010408$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010409
10410fi
10411
10412
Ronald Oussorenf8752642006-07-06 10:13:35 +000010413case $ac_sys_system/$ac_sys_release in
10414Darwin/*)
10415 CFLAGS="${_CUR_CFLAGS}"
10416 LDFLAGS="${_CUR_LDFLAGS}"
10417 ;;
10418esac
10419
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10421$as_echo_n "checking for hstrerror... " >&6; }
10422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010423/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010424
Martin v. Löwise9416172003-05-03 10:12:45 +000010425#include <netdb.h>
10426
Martin v. Löwise9416172003-05-03 10:12:45 +000010427int
10428main ()
10429{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010430void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010431 ;
10432 return 0;
10433}
10434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010435if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010436
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010438
Matthias Klosec511b472010-05-08 11:01:39 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010440$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010444
10445fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446rm -f core conftest.err conftest.$ac_objext \
10447 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10450$as_echo_n "checking for inet_aton... " >&6; }
10451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010452/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010453
Martin v. Löwis86d66262006-02-17 08:40:11 +000010454#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010455#include <sys/socket.h>
10456#include <netinet/in.h>
10457#include <arpa/inet.h>
10458
Martin v. Löwise9416172003-05-03 10:12:45 +000010459int
10460main ()
10461{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010462void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010463 ;
10464 return 0;
10465}
10466_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010468
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010469$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010470
Matthias Klosec511b472010-05-08 11:01:39 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010472$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10475$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010476
10477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010478rm -f core conftest.err conftest.$ac_objext \
10479 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010480
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10482$as_echo_n "checking for inet_pton... " >&6; }
10483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010484/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010485
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010486#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010487#include <sys/socket.h>
10488#include <netinet/in.h>
10489#include <arpa/inet.h>
10490
Martin v. Löwise9416172003-05-03 10:12:45 +000010491int
10492main ()
10493{
10494void* p = inet_pton
10495 ;
10496 return 0;
10497}
10498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010501$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010502
Matthias Klosec511b472010-05-08 11:01:39 +000010503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010504$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10507$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010508
10509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010511
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010512# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10514$as_echo_n "checking for setgroups... " >&6; }
10515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010516/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010517
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010518#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010519#ifdef HAVE_GRP_H
10520#include <grp.h>
10521#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010522
Martin v. Löwisd5843682002-11-21 20:41:28 +000010523int
10524main ()
10525{
10526void* p = setgroups
10527 ;
10528 return 0;
10529}
10530_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010532
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010533$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010534
Matthias Klosec511b472010-05-08 11:01:39 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010536$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010537else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10539$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010540
10541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010543
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010544# check for openpty and forkpty
10545
10546for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010547do :
10548 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010549if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010550 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010551#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010552_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010553
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010554else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10556$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010557if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010558 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010559else
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010561LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010564
Martin v. Löwiseba40652007-08-30 20:10:57 +000010565/* Override any GCC internal prototype to avoid an error.
10566 Use char because int might match the return type of a GCC
10567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010568#ifdef __cplusplus
10569extern "C"
10570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010571char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010572int
10573main ()
10574{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010575return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 ;
10577 return 0;
10578}
10579_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010580if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010581 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010582else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010583 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010585rm -f core conftest.err conftest.$ac_objext \
10586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010587LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010588fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10590$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010591if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010592 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010593 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10596$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010597if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010598 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010599else
10600 ac_check_lib_save_LIBS=$LIBS
10601LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010603/* end confdefs.h. */
10604
Martin v. Löwiseba40652007-08-30 20:10:57 +000010605/* Override any GCC internal prototype to avoid an error.
10606 Use char because int might match the return type of a GCC
10607 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010608#ifdef __cplusplus
10609extern "C"
10610#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010611char openpty ();
10612int
10613main ()
10614{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010615return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010616 ;
10617 return 0;
10618}
10619_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010620if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010621 ac_cv_lib_bsd_openpty=yes
10622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010623 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010624fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625rm -f core conftest.err conftest.$ac_objext \
10626 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010627LIBS=$ac_check_lib_save_LIBS
10628fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10630$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010631if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010632 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010633 LIBS="$LIBS -lbsd"
10634fi
10635
10636
10637fi
10638
Fred Drake8cef4cf2000-06-28 16:40:38 +000010639
10640fi
10641done
10642
10643for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010644do :
10645 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010646if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010647 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010648#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010649_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010650
Fred Drake8cef4cf2000-06-28 16:40:38 +000010651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10653$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010654if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010656else
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010658LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010661
Martin v. Löwiseba40652007-08-30 20:10:57 +000010662/* Override any GCC internal prototype to avoid an error.
10663 Use char because int might match the return type of a GCC
10664 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010665#ifdef __cplusplus
10666extern "C"
10667#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010668char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010669int
10670main ()
10671{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010673 ;
10674 return 0;
10675}
10676_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010677if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010679else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682rm -f core conftest.err conftest.$ac_objext \
10683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010684LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010685fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10687$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010688if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010690 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10693$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010694if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010695 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010696else
10697 ac_check_lib_save_LIBS=$LIBS
10698LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010700/* end confdefs.h. */
10701
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702/* Override any GCC internal prototype to avoid an error.
10703 Use char because int might match the return type of a GCC
10704 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010705#ifdef __cplusplus
10706extern "C"
10707#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010708char forkpty ();
10709int
10710main ()
10711{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010712return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010713 ;
10714 return 0;
10715}
10716_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010718 ac_cv_lib_bsd_forkpty=yes
10719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010720 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010721fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010722rm -f core conftest.err conftest.$ac_objext \
10723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010724LIBS=$ac_check_lib_save_LIBS
10725fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10727$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010728if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010729 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010730 LIBS="$LIBS -lbsd"
10731fi
10732
10733
10734fi
10735
Fred Drake8cef4cf2000-06-28 16:40:38 +000010736
10737fi
10738done
10739
Jack Jansendd19cf82001-12-06 22:36:17 +000010740
Brett Cannonaa5778d2008-03-18 04:09:00 +000010741# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010742for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010743do :
10744 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010745if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010746 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010747#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010748_ACEOF
10749
10750fi
10751done
10752
10753
Michael W. Hudson54241132001-12-07 15:38:26 +000010754# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010755for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010756do :
10757 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10758ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010759if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010761#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010762_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010765done
10766
Michael W. Hudson54241132001-12-07 15:38:26 +000010767
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010768ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010769if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010770 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010771
Martin v. Löwis1142de32002-03-29 16:28:31 +000010772else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010773 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010774 *" dup2.$ac_objext "* ) ;;
10775 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010776 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010777esac
10778
Martin v. Löwis1142de32002-03-29 16:28:31 +000010779fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010780
10781ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010782if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010783 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10784
10785else
10786 case " $LIBOBJS " in
10787 *" getcwd.$ac_objext "* ) ;;
10788 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10789 ;;
10790esac
10791
10792fi
10793
10794ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010795if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010796 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10797
10798else
10799 case " $LIBOBJS " in
10800 *" strdup.$ac_objext "* ) ;;
10801 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10802 ;;
10803esac
10804
10805fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010806
10807
10808for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010809do :
10810 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010811if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010812 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010813#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010814_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010816/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010817#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010818int
10819main ()
10820{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010821getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010822 ;
10823 return 0;
10824}
10825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010826if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010828$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010829
Guido van Rossum627b2d71993-12-24 10:39:16 +000010830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010832
Guido van Rossum627b2d71993-12-24 10:39:16 +000010833fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010834done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010835
Jack Jansen150753c2003-03-29 22:07:47 +000010836for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837do :
10838 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010839if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010840 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010841#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010844/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010845#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010846int
10847main ()
10848{
10849setpgrp(0,0);
10850 ;
10851 return 0;
10852}
10853_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010856$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010857
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010860
10861fi
10862done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010863
Thomas Wouters3a584202000-08-05 23:28:51 +000010864for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010865do :
10866 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010867if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010869#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010870_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010872/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010873#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010874int
10875main ()
10876{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010877gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 ;
10879 return 0;
10880}
10881_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010882if ac_fn_c_try_compile "$LINENO"; then :
10883
Guido van Rossum627b2d71993-12-24 10:39:16 +000010884else
Skip Montanaro6dead952003-09-25 14:50:04 +000010885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010886$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010887
Martin v. Löwis11437992002-04-12 09:54:03 +000010888
Guido van Rossum627b2d71993-12-24 10:39:16 +000010889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010892fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010893done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010894
Michael W. Hudson54241132001-12-07 15:38:26 +000010895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10897$as_echo_n "checking for major... " >&6; }
10898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010900
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010901#if defined(MAJOR_IN_MKDEV)
10902#include <sys/mkdev.h>
10903#elif defined(MAJOR_IN_SYSMACROS)
10904#include <sys/sysmacros.h>
10905#else
10906#include <sys/types.h>
10907#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010908
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010909int
10910main ()
10911{
10912
10913 makedev(major(0),minor(0));
10914
10915 ;
10916 return 0;
10917}
10918_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010919if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010920
10921
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010922$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010923
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10925$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010926
10927else
Skip Montanaro6dead952003-09-25 14:50:04 +000010928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10930$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010931
10932fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933rm -f core conftest.err conftest.$ac_objext \
10934 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010935
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010936# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010937# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10939$as_echo_n "checking for getaddrinfo... " >&6; }
10940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010942
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010943#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010944#include <sys/socket.h>
10945#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010946#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010947
Martin v. Löwis11437992002-04-12 09:54:03 +000010948int
10949main ()
10950{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010951getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 ;
10953 return 0;
10954}
10955_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010956if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010957 have_getaddrinfo=yes
10958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010959 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961rm -f core conftest.err conftest.$ac_objext \
10962 conftest$ac_exeext conftest.$ac_ext
10963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10964$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010965if test $have_getaddrinfo = yes
10966then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10968$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010969 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010971else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010973 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010976/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010977
Stefan Krah0afe4e42012-11-22 23:56:51 +010010978#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010979#include <sys/types.h>
10980#include <netdb.h>
10981#include <string.h>
10982#include <sys/socket.h>
10983#include <netinet/in.h>
10984
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010985int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010986{
10987 int passive, gaierr, inet4 = 0, inet6 = 0;
10988 struct addrinfo hints, *ai, *aitop;
10989 char straddr[INET6_ADDRSTRLEN], strport[16];
10990
10991 for (passive = 0; passive <= 1; passive++) {
10992 memset(&hints, 0, sizeof(hints));
10993 hints.ai_family = AF_UNSPEC;
10994 hints.ai_flags = passive ? AI_PASSIVE : 0;
10995 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010996 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010997 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10998 (void)gai_strerror(gaierr);
10999 goto bad;
11000 }
11001 for (ai = aitop; ai; ai = ai->ai_next) {
11002 if (ai->ai_addr == NULL ||
11003 ai->ai_addrlen == 0 ||
11004 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11005 straddr, sizeof(straddr), strport, sizeof(strport),
11006 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11007 goto bad;
11008 }
11009 switch (ai->ai_family) {
11010 case AF_INET:
11011 if (strcmp(strport, "54321") != 0) {
11012 goto bad;
11013 }
11014 if (passive) {
11015 if (strcmp(straddr, "0.0.0.0") != 0) {
11016 goto bad;
11017 }
11018 } else {
11019 if (strcmp(straddr, "127.0.0.1") != 0) {
11020 goto bad;
11021 }
11022 }
11023 inet4++;
11024 break;
11025 case AF_INET6:
11026 if (strcmp(strport, "54321") != 0) {
11027 goto bad;
11028 }
11029 if (passive) {
11030 if (strcmp(straddr, "::") != 0) {
11031 goto bad;
11032 }
11033 } else {
11034 if (strcmp(straddr, "::1") != 0) {
11035 goto bad;
11036 }
11037 }
11038 inet6++;
11039 break;
11040 case AF_UNSPEC:
11041 goto bad;
11042 break;
11043 default:
11044 /* another family support? */
11045 break;
11046 }
11047 }
11048 }
11049
11050 if (!(inet4 == 0 || inet4 == 2))
11051 goto bad;
11052 if (!(inet6 == 0 || inet6 == 2))
11053 goto bad;
11054
11055 if (aitop)
11056 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011057 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011058
11059 bad:
11060 if (aitop)
11061 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011062 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011063}
11064
Martin v. Löwis11437992002-04-12 09:54:03 +000011065_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011067 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011069 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011070fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11072 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011074
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011075fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011076
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078
Benjamin Peterson75fed812010-11-01 01:47:19 +000011079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11080$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11081
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011082if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011083then
11084 if test $ipv6 = yes
11085 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011086 echo 'Fatal: You must get working getaddrinfo() function.'
11087 echo ' or you can specify "--disable-ipv6"'.
11088 exit 1
11089 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011090else
Martin v. Löwis11437992002-04-12 09:54:03 +000011091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011092$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011093
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011094fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011095
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011096for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097do :
11098 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011099if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011101#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011102_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011103
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011104fi
11105done
11106
Michael W. Hudson54241132001-12-07 15:38:26 +000011107
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011108# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11110$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011111if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011113else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011115/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011116#include <sys/types.h>
11117#include <sys/time.h>
11118#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011119
Martin v. Löwis11437992002-04-12 09:54:03 +000011120int
11121main ()
11122{
11123if ((struct tm *) 0)
11124return 0;
11125 ;
11126 return 0;
11127}
11128_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011129if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011130 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011135fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11137$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011138if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011139
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011140$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011141
11142fi
11143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11145$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011146if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011147 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011150/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011151#include <sys/types.h>
11152#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011153
Martin v. Löwis11437992002-04-12 09:54:03 +000011154int
11155main ()
11156{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011157struct tm tm;
11158 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 ;
11161 return 0;
11162}
11163_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011164if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011165 ac_cv_struct_tm=time.h
11166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011167 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011170fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11172$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011173if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011175$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011176
11177fi
11178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011179ac_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 +000011180#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011181
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011183if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011184
11185cat >>confdefs.h <<_ACEOF
11186#define HAVE_STRUCT_TM_TM_ZONE 1
11187_ACEOF
11188
11189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011190fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011191
Martin v. Löwis11437992002-04-12 09:54:03 +000011192if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011194$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011195
11196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11198"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011199if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011200 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011202 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011203fi
11204
Martin v. Löwiseba40652007-08-30 20:10:57 +000011205cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011207_ACEOF
11208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11210$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011211if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011215/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011216#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217#if !HAVE_DECL_TZNAME
11218extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
Martin v. Löwis11437992002-04-12 09:54:03 +000011221int
11222main ()
11223{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011224return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ;
11226 return 0;
11227}
11228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230 ac_cv_var_tzname=yes
11231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011232 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011234rm -f core conftest.err conftest.$ac_objext \
11235 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011236fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11238$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011239 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011242
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243 fi
11244fi
11245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011246ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011247if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011248
11249cat >>confdefs.h <<_ACEOF
11250#define HAVE_STRUCT_STAT_ST_RDEV 1
11251_ACEOF
11252
11253
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011254fi
11255
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011256ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011257if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011258
Martin v. Löwis11437992002-04-12 09:54:03 +000011259cat >>confdefs.h <<_ACEOF
11260#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11261_ACEOF
11262
11263
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011264fi
11265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011266ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011267if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011268
11269cat >>confdefs.h <<_ACEOF
11270#define HAVE_STRUCT_STAT_ST_FLAGS 1
11271_ACEOF
11272
11273
11274fi
11275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011277if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011278
11279cat >>confdefs.h <<_ACEOF
11280#define HAVE_STRUCT_STAT_ST_GEN 1
11281_ACEOF
11282
11283
11284fi
11285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011287if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011288
11289cat >>confdefs.h <<_ACEOF
11290#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11291_ACEOF
11292
11293
11294fi
11295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011296ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011297if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011298
Martin v. Löwis11437992002-04-12 09:54:03 +000011299cat >>confdefs.h <<_ACEOF
11300#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11301_ACEOF
11302
11303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011305
11306else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011307 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011308 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11310 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011311esac
11312
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011313fi
11314
Michael W. Hudson54241132001-12-07 15:38:26 +000011315
Martin v. Löwis11437992002-04-12 09:54:03 +000011316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11318$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011319if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011320 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321else
Matthias Klosec511b472010-05-08 11:01:39 +000011322
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011325#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011326int
11327main ()
11328{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011329return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011335 ac_cv_header_time_altzone=yes
11336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011340
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341fi
11342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11344$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011345if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011347$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011348
11349fi
11350
Guido van Rossumda88dad1995-01-26 00:46:29 +000011351was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11353$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011356
11357#include <sys/types.h>
11358#include <sys/select.h>
11359#include <sys/time.h>
11360
Martin v. Löwis11437992002-04-12 09:54:03 +000011361int
11362main ()
11363{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011364;
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ;
11366 return 0;
11367}
11368_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011370
11371
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011372$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011373
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011374 was_it_defined=yes
11375
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11379$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011380
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11382$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011383if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011384 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011385else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011387/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011388#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011389int
11390main ()
11391{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011392struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 ;
11394 return 0;
11395}
11396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011398 ac_cv_struct_addrinfo=yes
11399else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011400 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11403fi
11404
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11406$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011407if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011409$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011410
11411fi
11412
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11414$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011415if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011416 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011417else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011419/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011420
11421# include <sys/types.h>
11422# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011423int
11424main ()
11425{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011426struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ;
11428 return 0;
11429}
11430_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011431if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011432 ac_cv_struct_sockaddr_storage=yes
11433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011434 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11437fi
11438
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11440$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011441if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011443$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011444
11445fi
11446
Guido van Rossum627b2d71993-12-24 10:39:16 +000011447# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11450$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011451if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011452 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011453else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011456$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011457int
11458main ()
11459{
11460static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011461test_array [0] = 0;
11462return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
11464 ;
11465 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011466}
Martin v. Löwis11437992002-04-12 09:54:03 +000011467_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011468if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011469 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011471 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011474fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11476$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011477if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011478 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011479
11480fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11483$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011484if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011485 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011486else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011488/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011489
Martin v. Löwis11437992002-04-12 09:54:03 +000011490int
11491main ()
11492{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011493
Martin v. Löwis11437992002-04-12 09:54:03 +000011494#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011495 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011496 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011497 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011499 char const *const *pcpcc;
11500 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 /* NEC SVR4.0.2 mips cc rejects this. */
11502 struct point {int x, y;};
11503 static struct point const zero = {0,0};
11504 /* AIX XL C 1.02.0.0 rejects this.
11505 It does not let you subtract one const X* pointer from another in
11506 an arm of an if-expression whose if-part is not a constant
11507 expression */
11508 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511 ++pcpcc;
11512 ppc = (char**) pcpcc;
11513 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011514 { /* SCO 3.2v4 cc rejects this sort of thing. */
11515 char tx;
11516 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011518
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011520 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 }
11522 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11523 int x[] = {25, 17};
11524 const int *foo = &x[0];
11525 ++foo;
11526 }
11527 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11528 typedef const int *iptr;
11529 iptr p = 0;
11530 ++p;
11531 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011532 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011534 struct s { int j; const int *ap[3]; } bx;
11535 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 }
11537 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11538 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011539 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011541 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011542#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011543
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 ;
11545 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011546}
Martin v. Löwis11437992002-04-12 09:54:03 +000011547_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011548if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011549 ac_cv_c_const=yes
11550else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011551 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011554fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11556$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011557if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011559$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011560
11561fi
11562
Michael W. Hudson54241132001-12-07 15:38:26 +000011563
Guido van Rossumda88dad1995-01-26 00:46:29 +000011564works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11566$as_echo_n "checking for working volatile... " >&6; }
11567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011568/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011569
Martin v. Löwis11437992002-04-12 09:54:03 +000011570int
11571main ()
11572{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011573volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 ;
11575 return 0;
11576}
11577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011578if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011579 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011580else
Skip Montanaro6dead952003-09-25 14:50:04 +000011581
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011582$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011583
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011584
Guido van Rossum627b2d71993-12-24 10:39:16 +000011585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11588$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011589
Guido van Rossumda88dad1995-01-26 00:46:29 +000011590works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11592$as_echo_n "checking for working signed char... " >&6; }
11593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011594/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011595
Martin v. Löwis11437992002-04-12 09:54:03 +000011596int
11597main ()
11598{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011599signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 ;
11601 return 0;
11602}
11603_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011604if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011605 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011606else
Skip Montanaro6dead952003-09-25 14:50:04 +000011607
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011608$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011609
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011610
Guido van Rossum7f43da71994-08-01 12:15:30 +000011611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11614$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011615
Guido van Rossumda88dad1995-01-26 00:46:29 +000011616have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11618$as_echo_n "checking for prototypes... " >&6; }
11619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011620/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011621int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011622int
11623main ()
11624{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011625return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 ;
11627 return 0;
11628}
11629_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011632$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011633
Matthias Klosec511b472010-05-08 11:01:39 +000011634 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11638$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011639
Guido van Rossumda88dad1995-01-26 00:46:29 +000011640works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11642$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011644/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011645
11646#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011647int foo(int x, ...) {
11648 va_list va;
11649 va_start(va, x);
11650 va_arg(va, int);
11651 va_arg(va, char *);
11652 va_arg(va, double);
11653 return 0;
11654}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011655
Martin v. Löwis11437992002-04-12 09:54:03 +000011656int
11657main ()
11658{
Guido van Rossum90eea071996-08-30 20:58:57 +000011659return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011660 ;
11661 return 0;
11662}
11663_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011664if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011665
11666
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011667$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011668
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011669 works=yes
11670
Guido van Rossum627b2d71993-12-24 10:39:16 +000011671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11674$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011675
Martin v. Löwisd6320502004-08-12 13:45:08 +000011676# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11678$as_echo_n "checking for socketpair... " >&6; }
11679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011680/* end confdefs.h. */
11681
11682#include <sys/types.h>
11683#include <sys/socket.h>
11684
11685int
11686main ()
11687{
11688void *x=socketpair
11689 ;
11690 return 0;
11691}
11692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011695$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011696
Matthias Klosec511b472010-05-08 11:01:39 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011698$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11701$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011702
11703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011705
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011706# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11708$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011710/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011711#include <sys/types.h>
11712#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011713int
11714main ()
11715{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011716struct sockaddr x;
11717x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011718 ;
11719 return 0;
11720}
11721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011722if ac_fn_c_try_compile "$LINENO"; then :
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11724$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011727
11728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11730$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011731
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011734
Guido van Rossumda88dad1995-01-26 00:46:29 +000011735va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11737$as_echo_n "checking whether va_list is an array... " >&6; }
11738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011739/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011740
11741#ifdef HAVE_STDARG_PROTOTYPES
11742#include <stdarg.h>
11743#else
11744#include <varargs.h>
11745#endif
11746
Martin v. Löwis11437992002-04-12 09:54:03 +000011747int
11748main ()
11749{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011750va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011751 ;
11752 return 0;
11753}
11754_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011755if ac_fn_c_try_compile "$LINENO"; then :
11756
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757else
Skip Montanaro6dead952003-09-25 14:50:04 +000011758
Martin v. Löwis11437992002-04-12 09:54:03 +000011759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011760$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011761
Guido van Rossumda88dad1995-01-26 00:46:29 +000011762 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11767$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011768
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011769# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
11771
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011772ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011773if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011774
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011775 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11778$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011779 OLD_CFLAGS=$CFLAGS
11780 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011782/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011783
11784# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011785
Martin v. Löwis11437992002-04-12 09:54:03 +000011786int
11787main ()
11788{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011789
11790 char *name;
11791 struct hostent *he, *res;
11792 char buffer[2048];
11793 int buflen = 2048;
11794 int h_errnop;
11795
11796 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011797
11798 ;
11799 return 0;
11800}
11801_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011803
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011804 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011805
Martin v. Löwis11437992002-04-12 09:54:03 +000011806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11810$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011811
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011812else
Skip Montanaro6dead952003-09-25 14:50:04 +000011813
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11815$as_echo "no" >&6; }
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11817$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011819/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011820
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011821# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011822
Martin v. Löwis11437992002-04-12 09:54:03 +000011823int
11824main ()
11825{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011826
11827 char *name;
11828 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011829 char buffer[2048];
11830 int buflen = 2048;
11831 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011832
Matthias Klosec511b472010-05-08 11:01:39 +000011833 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011834
11835 ;
11836 return 0;
11837}
11838_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011839if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011841 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011842
Martin v. Löwis11437992002-04-12 09:54:03 +000011843
Matthias Klosec511b472010-05-08 11:01:39 +000011844$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011845
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11847$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011848
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011849else
Skip Montanaro6dead952003-09-25 14:50:04 +000011850
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11852$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11854$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11856/* end confdefs.h. */
11857
11858# include <netdb.h>
11859
11860int
11861main ()
11862{
11863
11864 char *name;
11865 struct hostent *he;
11866 struct hostent_data data;
11867
11868 (void) gethostbyname_r(name, he, &data);
11869
11870 ;
11871 return 0;
11872}
11873_ACEOF
11874if ac_fn_c_try_compile "$LINENO"; then :
11875
11876 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11877
11878
11879$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11880
11881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11882$as_echo "yes" >&6; }
11883
11884else
11885
11886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11887$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011888
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011891
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011894
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011897 CFLAGS=$OLD_CFLAGS
11898
11899else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011901 for ac_func in gethostbyname
11902do :
11903 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011904if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011905 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011906#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011907_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011908
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011909fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011910done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011911
Michael W. Hudson54241132001-12-07 15:38:26 +000011912
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011913fi
11914
Michael W. Hudson54241132001-12-07 15:38:26 +000011915
11916
11917
11918
11919
11920
Guido van Rossum627b2d71993-12-24 10:39:16 +000011921# checks for system services
11922# (none yet)
11923
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011924# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011925ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011926if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011927
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011928else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11930$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011931if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011932 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011933else
Martin v. Löwis11437992002-04-12 09:54:03 +000011934 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011935LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011938
Martin v. Löwiseba40652007-08-30 20:10:57 +000011939/* Override any GCC internal prototype to avoid an error.
11940 Use char because int might match the return type of a GCC
11941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011942#ifdef __cplusplus
11943extern "C"
11944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011945char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011946int
11947main ()
11948{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011949return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011950 ;
11951 return 0;
11952}
11953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011954if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011955 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011957 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011959rm -f core conftest.err conftest.$ac_objext \
11960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011961LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11964$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011965if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 cat >>confdefs.h <<_ACEOF
11967#define HAVE_LIBIEEE 1
11968_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011969
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011970 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011971
Guido van Rossum627b2d71993-12-24 10:39:16 +000011972fi
11973
Michael W. Hudson54241132001-12-07 15:38:26 +000011974
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011975fi
11976
Michael W. Hudson54241132001-12-07 15:38:26 +000011977
Guido van Rossum7f253911997-05-09 02:42:48 +000011978# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11980$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011981
Martin v. Löwiseba40652007-08-30 20:10:57 +000011982# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011983if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011984 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011985if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011986then
11987
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011988$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11991$as_echo "yes" >&6; }
11992else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11993$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011994fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11997$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011998fi
11999
Guido van Rossum7f253911997-05-09 02:42:48 +000012000
Guido van Rossum7f43da71994-08-01 12:15:30 +000012001# check for --with-libm=...
12002
Guido van Rossum563e7081996-09-10 18:20:48 +000012003case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012004Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012005BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012006*) LIBM=-lm
12007esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12009$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012010
Martin v. Löwiseba40652007-08-30 20:10:57 +000012011# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012012if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012013 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012014if test "$withval" = no
12015then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12017$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012018elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012019then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12021$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012022else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012023fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12026$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012027fi
12028
Guido van Rossum7f43da71994-08-01 12:15:30 +000012029
12030# check for --with-libc=...
12031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12033$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012034
Martin v. Löwiseba40652007-08-30 20:10:57 +000012035# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012036if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012037 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012038if test "$withval" = no
12039then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12041$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012042elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012043then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12045$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012046else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012047fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12050$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012051fi
12052
Guido van Rossum7f43da71994-08-01 12:15:30 +000012053
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012054# **************************************************
12055# * Check for various properties of floating point *
12056# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012057
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12059$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012060if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012062else
12063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012064if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012065 ac_cv_little_endian_double=no
12066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012068/* end confdefs.h. */
12069
12070#include <string.h>
12071int main() {
12072 double x = 9006104071832581.0;
12073 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12074 return 0;
12075 else
12076 return 1;
12077}
12078
12079_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012080if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012081 ac_cv_little_endian_double=yes
12082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12086 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012087fi
12088
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012089fi
12090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12092$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012093if test "$ac_cv_little_endian_double" = yes
12094then
12095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012096$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012097
12098fi
12099
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12101$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012102if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012103 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012104else
12105
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012107 ac_cv_big_endian_double=no
12108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012110/* end confdefs.h. */
12111
12112#include <string.h>
12113int main() {
12114 double x = 9006104071832581.0;
12115 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12116 return 0;
12117 else
12118 return 1;
12119}
12120
12121_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012123 ac_cv_big_endian_double=yes
12124else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012125 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012126fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012129fi
12130
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012131fi
12132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12134$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012135if test "$ac_cv_big_endian_double" = yes
12136then
12137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012138$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012139
12140fi
12141
12142# Some ARM platforms use a mixed-endian representation for doubles.
12143# While Python doesn't currently have full support for these platforms
12144# (see e.g., issue 1762561), we can at least make sure that float <-> string
12145# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12147$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012148if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012149 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012150else
12151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012153 ac_cv_mixed_endian_double=no
12154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012156/* end confdefs.h. */
12157
12158#include <string.h>
12159int main() {
12160 double x = 9006104071832581.0;
12161 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12162 return 0;
12163 else
12164 return 1;
12165}
12166
12167_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012168if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012169 ac_cv_mixed_endian_double=yes
12170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012171 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012172fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012175fi
12176
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012177fi
12178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12180$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012181if test "$ac_cv_mixed_endian_double" = yes
12182then
12183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012185
12186fi
12187
12188# The short float repr introduced in Python 3.1 requires the
12189# correctly-rounded string <-> double conversion functions from
12190# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12191# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012192# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012193# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012194
12195# This inline assembler syntax may also work for suncc and icc,
12196# so we try it on all platforms.
12197
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12199$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012201/* end confdefs.h. */
12202
12203int
12204main ()
12205{
12206
Mark Dickinsona548dee2009-11-15 13:12:43 +000012207 unsigned short cw;
12208 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12209 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012210
12211 ;
12212 return 0;
12213}
12214_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012215if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012216 have_gcc_asm_for_x87=yes
12217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012218 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012219fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12222$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012223if test "$have_gcc_asm_for_x87" = yes
12224then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012225
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012226$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012227
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012228fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012229
Mark Dickinson04b27232009-01-04 12:29:36 +000012230# Detect whether system arithmetic is subject to x87-style double
12231# rounding issues. The result of this test has little meaning on non
12232# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12233# mode is round-to-nearest and double rounding issues are present, and
12234# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12236$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012237# $BASECFLAGS may affect the result
12238ac_save_cc="$CC"
12239CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012240if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012241 ac_cv_x87_double_rounding=no
12242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012244/* end confdefs.h. */
12245
12246#include <stdlib.h>
12247#include <math.h>
12248int main() {
12249 volatile double x, y, z;
12250 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12251 x = 0.99999999999999989; /* 1-2**-53 */
12252 y = 1./x;
12253 if (y != 1.)
12254 exit(0);
12255 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12256 x = 1e16;
12257 y = 2.99999;
12258 z = x + y;
12259 if (z != 1e16+4.)
12260 exit(0);
12261 /* both tests show evidence of double rounding */
12262 exit(1);
12263}
12264
12265_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012266if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012267 ac_cv_x87_double_rounding=no
12268else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012269 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12272 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012273fi
12274
Mark Dickinson99abd142009-10-24 13:44:16 +000012275CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12277$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012278if test "$ac_cv_x87_double_rounding" = yes
12279then
12280
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012281$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012282
12283fi
12284
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012285# ************************************
12286# * Check for mathematical functions *
12287# ************************************
12288
12289LIBS_SAVE=$LIBS
12290LIBS="$LIBS $LIBM"
12291
Mark Dickinson265d7382008-04-21 22:32:24 +000012292# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12293# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12295$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012296if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012297 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012298else
12299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012300if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012301 ac_cv_tanh_preserves_zero_sign=no
12302else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012304/* end confdefs.h. */
12305
12306#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012307#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012308int main() {
12309 /* return 0 if either negative zeros don't exist
12310 on this platform or if negative zeros exist
12311 and tanh(-0.) == -0. */
12312 if (atan2(0., -1.) == atan2(-0., -1.) ||
12313 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12314 else exit(1);
12315}
12316
12317_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012318if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012319 ac_cv_tanh_preserves_zero_sign=yes
12320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012321 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12324 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012325fi
12326
Mark Dickinson265d7382008-04-21 22:32:24 +000012327fi
12328
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12330$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012331if test "$ac_cv_tanh_preserves_zero_sign" = yes
12332then
12333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012335
12336fi
12337
Mark Dickinson65898e02009-09-05 10:27:00 +000012338for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012339do :
12340 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12341ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012342if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012343 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012344#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012345_ACEOF
12346
12347fi
12348done
12349
Mark Dickinson65898e02009-09-05 10:27:00 +000012350for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012351do :
12352 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12353ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012354if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012355 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012357_ACEOF
12358
12359fi
12360done
12361
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012362ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12363"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012364if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012365 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012366else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012367 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012368fi
12369
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012370cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012371#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012373ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12374"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012375if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012376 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012377else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012378 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012379fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012380
12381cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012382#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012383_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012384ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12385"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012386if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012387 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012388else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012389 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012390fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012391
12392cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012393#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012394_ACEOF
12395
12396
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012397LIBS=$LIBS_SAVE
12398
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012399# For multiprocessing module, check that sem_open
12400# actually works. For FreeBSD versions <= 7.2,
12401# the kernel module that provides POSIX semaphores
12402# isn't loaded by default, so an attempt to call
12403# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12405$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012406if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012407 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012408else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012410 ac_cv_posix_semaphores_enabled=yes
12411else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012413/* end confdefs.h. */
12414
12415#include <unistd.h>
12416#include <fcntl.h>
12417#include <stdio.h>
12418#include <semaphore.h>
12419#include <sys/stat.h>
12420
12421int main(void) {
12422 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12423 if (a == SEM_FAILED) {
12424 perror("sem_open");
12425 return 1;
12426 }
12427 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012428 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012429 return 0;
12430}
12431
12432_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012433if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012434 ac_cv_posix_semaphores_enabled=yes
12435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012437fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12439 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012440fi
12441
12442
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012443fi
12444
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12446$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012447if test $ac_cv_posix_semaphores_enabled = no
12448then
12449
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012450$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012451
12452fi
12453
12454# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12456$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012457if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012461 ac_cv_broken_sem_getvalue=yes
12462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012464/* end confdefs.h. */
12465
12466#include <unistd.h>
12467#include <fcntl.h>
12468#include <stdio.h>
12469#include <semaphore.h>
12470#include <sys/stat.h>
12471
12472int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012473 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012474 int count;
12475 int res;
12476 if(a==SEM_FAILED){
12477 perror("sem_open");
12478 return 1;
12479
12480 }
12481 res = sem_getvalue(a, &count);
12482 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012483 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012484 return res==-1 ? 1 : 0;
12485}
12486
12487_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012488if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012489 ac_cv_broken_sem_getvalue=no
12490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012491 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012492fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12494 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012495fi
12496
12497
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012498fi
12499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12501$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012502if test $ac_cv_broken_sem_getvalue = yes
12503then
12504
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012505$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012506
12507fi
12508
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012509# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12511$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012512# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012514 enableval=$enable_big_digits; case $enable_big_digits in
12515yes)
12516 enable_big_digits=30 ;;
12517no)
12518 enable_big_digits=15 ;;
1251915|30)
12520 ;;
12521*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012522 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012523esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12525$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012526
12527cat >>confdefs.h <<_ACEOF
12528#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12529_ACEOF
12530
12531
12532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12534$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012535fi
12536
12537
Guido van Rossumef2255b2000-03-10 22:30:29 +000012538# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012539ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012540if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
12542
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012544
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012545 wchar_h="yes"
12546
Guido van Rossumef2255b2000-03-10 22:30:29 +000012547else
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012549
12550fi
12551
Michael W. Hudson54241132001-12-07 15:38:26 +000012552
Martin v. Löwis11437992002-04-12 09:54:03 +000012553
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012554# determine wchar_t size
12555if test "$wchar_h" = yes
12556then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012557 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012558# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12559# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12560# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12562$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012563if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012564 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012566 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12567"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Martin v. Löwis11437992002-04-12 09:54:03 +000012569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012570 if test "$ac_cv_type_wchar_t" = yes; then
12571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012573as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012574See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012575 else
12576 ac_cv_sizeof_wchar_t=0
12577 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012578fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12582$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012583
12584
12585
Martin v. Löwis11437992002-04-12 09:54:03 +000012586cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012587#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012588_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012589
Michael W. Hudson54241132001-12-07 15:38:26 +000012590
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012591fi
12592
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12594$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012595have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012597/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012598
12599#include <tcl.h>
12600#if TCL_UTF_MAX != 6
12601# error "NOT UCS4_TCL"
12602#endif
12603int
12604main ()
12605{
12606
12607 ;
12608 return 0;
12609}
12610_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012612
12613
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012614$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012615
12616 have_ucs4_tcl=yes
12617
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12621$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012622
Skip Montanaro6dead952003-09-25 14:50:04 +000012623# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012624if test "$wchar_h" = yes
12625then
12626 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12628$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012629 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012630 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012631else
12632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012633 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012634 ac_cv_wchar_t_signed=yes
12635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012637/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012638
12639 #include <wchar.h>
12640 int main()
12641 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012642 /* Success: exit code 0 */
12643 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012644 }
12645
12646_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012647if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012648 ac_cv_wchar_t_signed=yes
12649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012650 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012651fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12653 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012654fi
12655
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012656fi
12657
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12659$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012660fi
12661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12663$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012664# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012665if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012666 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012667else
12668 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012669fi
12670
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012671
12672if test $enable_unicode = yes
12673then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012674 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012675 case "$have_ucs4_tcl" in
12676 yes) enable_unicode="ucs4"
12677 ;;
12678 *) enable_unicode="ucs2"
12679 ;;
12680 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012681fi
12682
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012683
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012684case "$enable_unicode" in
12685ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012686 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012687
12688 ;;
12689ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012691
12692 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020012693no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010012694*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012695esac
12696
Michael W. Hudson54241132001-12-07 15:38:26 +000012697
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
12699
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012700if test "$enable_unicode" = "no"
12701then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012702 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12704$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012705else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012706 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012708$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012709
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012710
12711 # wchar_t is only usable if it maps to an unsigned type
12712 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012713 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012714 then
12715 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012717$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012720
12721 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12722 then
12723 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012724 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012725
12726 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12727 then
12728 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012729 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012730
12731 else
12732 PY_UNICODE_TYPE="no type found"
12733 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12735$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012736fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012737
12738# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12740$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012741if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012742 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744 ac_cv_c_bigendian=unknown
12745 # See if we're dealing with a universal compiler.
12746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12747/* end confdefs.h. */
12748#ifndef __APPLE_CC__
12749 not a universal capable compiler
12750 #endif
12751 typedef int dummy;
12752
Skip Montanaro6dead952003-09-25 14:50:04 +000012753_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012754if ac_fn_c_try_compile "$LINENO"; then :
12755
12756 # Check for potential -arch flags. It is not universal unless
12757 # there are at least two -arch flags with different values.
12758 ac_arch=
12759 ac_prev=
12760 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12761 if test -n "$ac_prev"; then
12762 case $ac_word in
12763 i?86 | x86_64 | ppc | ppc64)
12764 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12765 ac_arch=$ac_word
12766 else
12767 ac_cv_c_bigendian=universal
12768 break
12769 fi
12770 ;;
12771 esac
12772 ac_prev=
12773 elif test "x$ac_word" = "x-arch"; then
12774 ac_prev=arch
12775 fi
12776 done
12777fi
12778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12779 if test $ac_cv_c_bigendian = unknown; then
12780 # See if sys/param.h defines the BYTE_ORDER macro.
12781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012782/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012783#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012785
Martin v. Löwis11437992002-04-12 09:54:03 +000012786int
12787main ()
12788{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012789#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12790 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12791 && LITTLE_ENDIAN)
12792 bogus endian macros
12793 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012794
12795 ;
12796 return 0;
12797}
12798_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012800 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012803#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012804 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012805
Martin v. Löwis11437992002-04-12 09:54:03 +000012806int
12807main ()
12808{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012809#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012810 not big endian
12811 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012812
12813 ;
12814 return 0;
12815}
12816_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012817if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012818 ac_cv_c_bigendian=yes
12819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823fi
12824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12825 fi
12826 if test $ac_cv_c_bigendian = unknown; then
12827 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012829/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830#include <limits.h>
12831
Martin v. Löwis11437992002-04-12 09:54:03 +000012832int
12833main ()
12834{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012835#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12836 bogus endian macros
12837 #endif
12838
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 ;
12840 return 0;
12841}
12842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012843if ac_fn_c_try_compile "$LINENO"; then :
12844 # It does; now see whether it defined to _BIG_ENDIAN or not.
12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846/* end confdefs.h. */
12847#include <limits.h>
12848
12849int
12850main ()
12851{
12852#ifndef _BIG_ENDIAN
12853 not big endian
12854 #endif
12855
12856 ;
12857 return 0;
12858}
12859_ACEOF
12860if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012863 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012864fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12866fi
12867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12868 fi
12869 if test $ac_cv_c_bigendian = unknown; then
12870 # Compile a test program.
12871 if test "$cross_compiling" = yes; then :
12872 # Try to guess by grepping values from an object file.
12873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12874/* end confdefs.h. */
12875short int ascii_mm[] =
12876 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12877 short int ascii_ii[] =
12878 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12879 int use_ascii (int i) {
12880 return ascii_mm[i] + ascii_ii[i];
12881 }
12882 short int ebcdic_ii[] =
12883 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12884 short int ebcdic_mm[] =
12885 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12886 int use_ebcdic (int i) {
12887 return ebcdic_mm[i] + ebcdic_ii[i];
12888 }
12889 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012891int
12892main ()
12893{
12894return use_ascii (foo) == use_ebcdic (foo);
12895 ;
12896 return 0;
12897}
12898_ACEOF
12899if ac_fn_c_try_compile "$LINENO"; then :
12900 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12901 ac_cv_c_bigendian=yes
12902 fi
12903 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12904 if test "$ac_cv_c_bigendian" = unknown; then
12905 ac_cv_c_bigendian=no
12906 else
12907 # finding both strings is unlikely to happen, but who knows?
12908 ac_cv_c_bigendian=unknown
12909 fi
12910 fi
12911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012915/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012917int
12918main ()
12919{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012921 /* Are we little or big endian? From Harbison&Steele. */
12922 union
12923 {
12924 long int l;
12925 char c[sizeof (long int)];
12926 } u;
12927 u.l = 1;
12928 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929
12930 ;
12931 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012932}
Martin v. Löwis11437992002-04-12 09:54:03 +000012933_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012935 ac_cv_c_bigendian=no
12936else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012937 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012938fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12946$as_echo "$ac_cv_c_bigendian" >&6; }
12947 case $ac_cv_c_bigendian in #(
12948 yes)
12949 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12950;; #(
12951 no)
12952 ;; #(
12953 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012957 ;; #(
12958 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012959 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010012960 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012961 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012962
Michael W. Hudson54241132001-12-07 15:38:26 +000012963
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012964# Check whether right shifting a negative integer extends the sign bit
12965# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12967$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012968if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012970else
Martin v. Löwis11437992002-04-12 09:54:03 +000012971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012973 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012976/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012977
12978int main()
12979{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012980 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012981}
12982
Martin v. Löwis11437992002-04-12 09:54:03 +000012983_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012984if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012985 ac_cv_rshift_extends_sign=yes
12986else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012987 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12990 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012991fi
12992
Martin v. Löwiseba40652007-08-30 20:10:57 +000012993fi
12994
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12996$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012997if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012998then
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013000$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013001
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013002fi
13003
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013004# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13006$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013007if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013008 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013009else
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013012/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013013#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013014int
13015main ()
13016{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013017
13018 FILE *f = fopen("/dev/null", "r");
13019 flockfile(f);
13020 getc_unlocked(f);
13021 funlockfile(f);
13022
Martin v. Löwis11437992002-04-12 09:54:03 +000013023 ;
13024 return 0;
13025}
13026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013028 ac_cv_have_getc_unlocked=yes
13029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013030 ac_cv_have_getc_unlocked=no
13031fi
13032rm -f core conftest.err conftest.$ac_objext \
13033 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13037$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013038if test "$ac_cv_have_getc_unlocked" = yes
13039then
Martin v. Löwis11437992002-04-12 09:54:03 +000013040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013041$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013042
13043fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013044
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013045# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013046# save the value of LIBS so we don't actually link Python with readline
13047LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013048
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013049# On some systems we need to link readline to a termcap compatible
13050# library. NOTE: Keep the precedence of listed libraries synchronised
13051# with setup.py.
13052py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13054$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013055for py_libtermcap in "" ncursesw ncurses curses termcap; do
13056 if test -z "$py_libtermcap"; then
13057 READLINE_LIBS="-lreadline"
13058 else
13059 READLINE_LIBS="-lreadline -l$py_libtermcap"
13060 fi
13061 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013063/* end confdefs.h. */
13064
Martin v. Löwiseba40652007-08-30 20:10:57 +000013065/* Override any GCC internal prototype to avoid an error.
13066 Use char because int might match the return type of a GCC
13067 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013068#ifdef __cplusplus
13069extern "C"
13070#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013071char readline ();
13072int
13073main ()
13074{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013075return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013076 ;
13077 return 0;
13078}
13079_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013081 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083rm -f core conftest.err conftest.$ac_objext \
13084 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013085 if test $py_cv_lib_readline = yes; then
13086 break
13087 fi
13088done
13089# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13090#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013091if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13093$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13096$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013099
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013100fi
13101
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013102# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13104$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013105if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013107else
13108 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013109LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013111/* end confdefs.h. */
13112
Martin v. Löwiseba40652007-08-30 20:10:57 +000013113/* Override any GCC internal prototype to avoid an error.
13114 Use char because int might match the return type of a GCC
13115 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013116#ifdef __cplusplus
13117extern "C"
13118#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013119char rl_callback_handler_install ();
13120int
13121main ()
13122{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013123return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013124 ;
13125 return 0;
13126}
13127_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013128if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013129 ac_cv_lib_readline_rl_callback_handler_install=yes
13130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013132fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133rm -f core conftest.err conftest.$ac_objext \
13134 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013135LIBS=$ac_check_lib_save_LIBS
13136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13138$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013139if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013142
13143fi
13144
13145
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013146# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013148/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013149#include <readline/readline.h>
13150_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013151if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013152 have_readline=yes
13153else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013154 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013155
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013156fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013157rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013158if test $have_readline = yes
13159then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013161/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013162#include <readline/readline.h>
13163
13164_ACEOF
13165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013169
13170fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013171rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013174/* end confdefs.h. */
13175#include <readline/readline.h>
13176
13177_ACEOF
13178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013179 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013182
13183fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013184rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013185
13186fi
13187
Martin v. Löwis0daad592001-09-30 21:09:59 +000013188# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13190$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013191if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013193else
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013195LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013198
Martin v. Löwiseba40652007-08-30 20:10:57 +000013199/* Override any GCC internal prototype to avoid an error.
13200 Use char because int might match the return type of a GCC
13201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013202#ifdef __cplusplus
13203extern "C"
13204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013205char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013206int
13207main ()
13208{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013209return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 ;
13211 return 0;
13212}
13213_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013217 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013218fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219rm -f core conftest.err conftest.$ac_objext \
13220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013221LIBS=$ac_check_lib_save_LIBS
13222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13224$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013225if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013228
Martin v. Löwis0daad592001-09-30 21:09:59 +000013229fi
13230
Michael W. Hudson54241132001-12-07 15:38:26 +000013231
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013232# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13234$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013235if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013236 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013237else
13238 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013239LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013241/* end confdefs.h. */
13242
13243/* Override any GCC internal prototype to avoid an error.
13244 Use char because int might match the return type of a GCC
13245 builtin and then its argument prototype would still apply. */
13246#ifdef __cplusplus
13247extern "C"
13248#endif
13249char rl_completion_display_matches_hook ();
13250int
13251main ()
13252{
13253return rl_completion_display_matches_hook ();
13254 ;
13255 return 0;
13256}
13257_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013258if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013259 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013262fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013263rm -f core conftest.err conftest.$ac_objext \
13264 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013265LIBS=$ac_check_lib_save_LIBS
13266fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13268$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013269if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013272
13273fi
13274
13275
Martin v. Löwis0daad592001-09-30 21:09:59 +000013276# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13278$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013279if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013280 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013281else
Martin v. Löwis11437992002-04-12 09:54:03 +000013282 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013283LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Martin v. Löwiseba40652007-08-30 20:10:57 +000013287/* Override any GCC internal prototype to avoid an error.
13288 Use char because int might match the return type of a GCC
13289 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013290#ifdef __cplusplus
13291extern "C"
13292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013293char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013294int
13295main ()
13296{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013297return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 ;
13299 return 0;
13300}
13301_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013302if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013303 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013305 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013306fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013307rm -f core conftest.err conftest.$ac_objext \
13308 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013309LIBS=$ac_check_lib_save_LIBS
13310fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13312$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013313if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013316
Guido van Rossum353ae582001-07-10 16:45:32 +000013317fi
13318
Jack Jansendd19cf82001-12-06 22:36:17 +000013319
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013320# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013322/* end confdefs.h. */
13323#include <readline/readline.h>
13324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013325if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013326 have_readline=yes
13327else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013328 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013329
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013330fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013331rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013332if test $have_readline = yes
13333then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013335/* end confdefs.h. */
13336#include <readline/readline.h>
13337
13338_ACEOF
13339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013340 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013342$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013343
13344fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013345rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013346
13347fi
13348
Martin v. Löwis82bca632006-02-10 20:49:30 +000013349# End of readline checks: restore LIBS
13350LIBS=$LIBS_no_readline
13351
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13353$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013354if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013355 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013356else
Martin v. Löwis11437992002-04-12 09:54:03 +000013357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013358if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013359 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013360else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013362/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013363
13364int main()
13365{
13366 int val1 = nice(1);
13367 if (val1 != -1 && val1 == nice(2))
13368 exit(0);
13369 exit(1);
13370}
13371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013373if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013374 ac_cv_broken_nice=yes
13375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013376 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013377fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13379 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013380fi
13381
Martin v. Löwiseba40652007-08-30 20:10:57 +000013382fi
13383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13385$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013386if test "$ac_cv_broken_nice" = yes
13387then
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013390
13391fi
13392
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13394$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013395if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013396 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013398 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013399 ac_cv_broken_poll=no
13400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013402/* end confdefs.h. */
13403
13404#include <poll.h>
13405
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013406int main()
13407{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013408 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013409 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013410
13411 close (42);
13412
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013413 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013414 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013415 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013416 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013417 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013418 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013419 return 1;
13420}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013421
13422_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013423if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013424 ac_cv_broken_poll=yes
13425else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013426 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013427fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13429 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013432fi
13433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13435$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013436if test "$ac_cv_broken_poll" = yes
13437then
13438
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013440
13441fi
13442
Brett Cannon43802422005-02-10 20:48:03 +000013443# 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 +000013444# (which is not required by ISO C or UNIX spec) and/or if we support
13445# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013446ac_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 +000013447#include <$ac_cv_struct_tm>
13448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013449"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013450if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013451
13452cat >>confdefs.h <<_ACEOF
13453#define HAVE_STRUCT_TM_TM_ZONE 1
13454_ACEOF
13455
13456
13457fi
13458
13459if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13460
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013462
13463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13465"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013466if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013467 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013469 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013470fi
13471
Martin v. Löwiseba40652007-08-30 20:10:57 +000013472cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013473#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013474_ACEOF
13475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13477$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013478if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013482/* end confdefs.h. */
13483#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013484#if !HAVE_DECL_TZNAME
13485extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013486#endif
13487
13488int
13489main ()
13490{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013491return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013492 ;
13493 return 0;
13494}
13495_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013496if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013497 ac_cv_var_tzname=yes
13498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013500fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013501rm -f core conftest.err conftest.$ac_objext \
13502 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013503fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13505$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013506 if test $ac_cv_var_tzname = yes; then
13507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013508$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013509
13510 fi
13511fi
13512
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013513
Martin v. Löwis1d459062005-03-14 21:23:33 +000013514# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13516$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013517if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013518 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013519else
13520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013521if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013522 ac_cv_working_tzset=no
13523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013526
13527#include <stdlib.h>
13528#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013529#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013530
13531#if HAVE_TZNAME
13532extern char *tzname[];
13533#endif
13534
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013535int main()
13536{
Brett Cannon18367812003-09-19 00:59:16 +000013537 /* Note that we need to ensure that not only does tzset(3)
13538 do 'something' with localtime, but it works as documented
13539 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013540 This includes making sure that tzname is set properly if
13541 tm->tm_zone does not exist since it is the alternative way
13542 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013543
13544 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013545 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013546 */
13547
Martin v. Löwis1d459062005-03-14 21:23:33 +000013548 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013549 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13550
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013551 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013552 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013553 if (localtime(&groundhogday)->tm_hour != 0)
13554 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013555#if HAVE_TZNAME
13556 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13557 if (strcmp(tzname[0], "UTC") ||
13558 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13559 exit(1);
13560#endif
Brett Cannon18367812003-09-19 00:59:16 +000013561
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013562 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013563 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013564 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013565 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013566#if HAVE_TZNAME
13567 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13568 exit(1);
13569#endif
Brett Cannon18367812003-09-19 00:59:16 +000013570
13571 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13572 tzset();
13573 if (localtime(&groundhogday)->tm_hour != 11)
13574 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013575#if HAVE_TZNAME
13576 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13577 exit(1);
13578#endif
13579
13580#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013581 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13582 exit(1);
13583 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13584 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013585#endif
Brett Cannon18367812003-09-19 00:59:16 +000013586
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013587 exit(0);
13588}
13589
13590_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013591if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013592 ac_cv_working_tzset=yes
13593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013594 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013596rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13597 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013598fi
13599
Martin v. Löwiseba40652007-08-30 20:10:57 +000013600fi
13601
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13603$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013604if test "$ac_cv_working_tzset" = yes
13605then
13606
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013607$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013608
13609fi
13610
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013611# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13613$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013614if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013615 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013618/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013619#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013620int
13621main ()
13622{
13623
13624struct stat st;
13625st.st_mtim.tv_nsec = 1;
13626
13627 ;
13628 return 0;
13629}
13630_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013632 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13637fi
13638
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13640$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013641if test "$ac_cv_stat_tv_nsec" = yes
13642then
13643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013644$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013645
13646fi
13647
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013648# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13650$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013651if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013652 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013653else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013655/* end confdefs.h. */
13656#include <sys/stat.h>
13657int
13658main ()
13659{
13660
13661struct stat st;
13662st.st_mtimespec.tv_nsec = 1;
13663
13664 ;
13665 return 0;
13666}
13667_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013669 ac_cv_stat_tv_nsec2=yes
13670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13674fi
13675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13677$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013678if test "$ac_cv_stat_tv_nsec2" = yes
13679then
13680
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013681$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013682
13683fi
13684
Jack Jansen666b1e72001-10-31 12:11:48 +000013685# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13687$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013688if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013689 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013690else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013692/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013693#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013694int
13695main ()
13696{
Jack Jansen666b1e72001-10-31 12:11:48 +000013697
13698 int rtn;
13699 rtn = mvwdelch(0,0,0);
13700
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 ;
13702 return 0;
13703}
13704_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013705if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013706 ac_cv_mvwdelch_is_expression=yes
13707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13711fi
13712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13714$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013715
13716if test "$ac_cv_mvwdelch_is_expression" = yes
13717then
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013719$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013720
13721fi
13722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13724$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013725if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013726 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013729/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013730#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013731int
13732main ()
13733{
Jack Jansen666b1e72001-10-31 12:11:48 +000013734
13735 WINDOW *w;
13736 w->_flags = 0;
13737
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 ;
13739 return 0;
13740}
13741_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013742if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013743 ac_cv_window_has_flags=yes
13744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013745 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13748fi
13749
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13751$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013752
Jack Jansen666b1e72001-10-31 12:11:48 +000013753
13754if test "$ac_cv_window_has_flags" = yes
13755then
Martin v. Löwis11437992002-04-12 09:54:03 +000013756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013757$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013758
13759fi
13760
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13762$as_echo_n "checking for is_term_resized... " >&6; }
13763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013764/* end confdefs.h. */
13765#include <curses.h>
13766int
13767main ()
13768{
13769void *x=is_term_resized
13770 ;
13771 return 0;
13772}
13773_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013774if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013776$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013777
Matthias Klosec511b472010-05-08 11:01:39 +000013778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013779$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13782$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013783
13784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13786
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13788$as_echo_n "checking for resize_term... " >&6; }
13789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013790/* end confdefs.h. */
13791#include <curses.h>
13792int
13793main ()
13794{
13795void *x=resize_term
13796 ;
13797 return 0;
13798}
13799_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013800if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013803
Matthias Klosec511b472010-05-08 11:01:39 +000013804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13808$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013809
13810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13814$as_echo_n "checking for resizeterm... " >&6; }
13815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013816/* end confdefs.h. */
13817#include <curses.h>
13818int
13819main ()
13820{
13821void *x=resizeterm
13822 ;
13823 return 0;
13824}
13825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013828$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013829
Matthias Klosec511b472010-05-08 11:01:39 +000013830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013831$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13834$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013835
13836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13838
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13840$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013841
13842if test -r /dev/ptmx
13843then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13845$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013847$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013848
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13851$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013852fi
13853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13855$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013856
13857if test -r /dev/ptc
13858then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13860$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013861
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013862$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013863
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13866$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013867fi
13868
Mark Dickinson82864d12009-11-15 16:18:58 +000013869if test "$have_long_long" = yes
13870then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13872$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013873 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013874 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013876 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013877 ac_cv_have_long_long_format=no
13878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013880/* end confdefs.h. */
13881
13882 #include <stdio.h>
13883 #include <stddef.h>
13884 #include <string.h>
13885
13886 #ifdef HAVE_SYS_TYPES_H
13887 #include <sys/types.h>
13888 #endif
13889
13890 int main()
13891 {
13892 char buffer[256];
13893
13894 if (sprintf(buffer, "%lld", (long long)123) < 0)
13895 return 1;
13896 if (strcmp(buffer, "123"))
13897 return 1;
13898
13899 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13900 return 1;
13901 if (strcmp(buffer, "-123"))
13902 return 1;
13903
13904 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13905 return 1;
13906 if (strcmp(buffer, "123"))
13907 return 1;
13908
13909 return 0;
13910 }
13911
13912_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013913if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013914 ac_cv_have_long_long_format=yes
13915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013916 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013920fi
13921
13922
Mark Dickinson82864d12009-11-15 16:18:58 +000013923fi
13924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13926$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013927fi
13928
Mark Dickinson5ce84742009-12-31 20:48:04 +000013929if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013930then
13931
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013932$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013933
13934fi
13935
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013936if test $ac_sys_system = Darwin
13937then
13938 LIBS="$LIBS -framework CoreFoundation"
13939fi
13940
Mark Dickinson82864d12009-11-15 16:18:58 +000013941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13943$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013944if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013945 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013947 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013948 ac_cv_have_size_t_format="cross -- assuming yes"
13949
Brett Cannon09d12362006-05-11 05:11:33 +000013950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013952/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013953
Brett Cannon09d12362006-05-11 05:11:33 +000013954#include <stdio.h>
13955#include <stddef.h>
13956#include <string.h>
13957
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013958#ifdef HAVE_SYS_TYPES_H
13959#include <sys/types.h>
13960#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013961
13962#ifdef HAVE_SSIZE_T
13963typedef ssize_t Py_ssize_t;
13964#elif SIZEOF_VOID_P == SIZEOF_LONG
13965typedef long Py_ssize_t;
13966#else
13967typedef int Py_ssize_t;
13968#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013969
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013970int main()
13971{
13972 char buffer[256];
13973
Brett Cannon09d12362006-05-11 05:11:33 +000013974 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13975 return 1;
13976
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013977 if (strcmp(buffer, "123"))
13978 return 1;
13979
13980 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13981 return 1;
13982
13983 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013984 return 1;
13985
13986 return 0;
13987}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013988
Brett Cannon09d12362006-05-11 05:11:33 +000013989_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013990if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013991 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013993 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013994fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013997fi
13998
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013999fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14001$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014002if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014005
14006fi
14007
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014008ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014009#ifdef HAVE_SYS_TYPES_H
14010#include <sys/types.h>
14011#endif
14012#ifdef HAVE_SYS_SOCKET_H
14013#include <sys/socket.h>
14014#endif
14015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014016"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014017if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014018
Martin v. Löwis11437992002-04-12 09:54:03 +000014019else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014021$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014022
14023fi
14024
Michael W. Hudson54241132001-12-07 15:38:26 +000014025
Benjamin Peterson7497e912010-10-16 00:53:39 +000014026case $ac_sys_system in
14027AIX*)
14028
14029$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14030 ;;
14031esac
14032
14033
Michael W. Hudson54241132001-12-07 15:38:26 +000014034
14035
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014036for h in `(cd $srcdir;echo Python/thread_*.h)`
14037do
14038 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14039done
14040
Michael W. Hudson54241132001-12-07 15:38:26 +000014041
Neal Norwitzd24499d2005-12-18 21:36:39 +000014042SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14044$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014045for dir in $SRCDIRS; do
14046 if test ! -d $dir; then
14047 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014048 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014049done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14051$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014052
Guido van Rossum627b2d71993-12-24 10:39:16 +000014053# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014054ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014055
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014056ac_config_files="$ac_config_files Modules/ld_so_aix"
14057
Martin v. Löwis11437992002-04-12 09:54:03 +000014058cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014059# This file is a shell script that caches the results of configure
14060# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014061# scripts and configure runs, see configure's option --config-cache.
14062# It is not useful on other systems. If it contains results you don't
14063# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014064#
Martin v. Löwis11437992002-04-12 09:54:03 +000014065# config.status only pays attention to the cache file if you give it
14066# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014067#
Skip Montanaro6dead952003-09-25 14:50:04 +000014068# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014069# loading this file, other *unset* `ac_cv_foo' will be assigned the
14070# following values.
14071
14072_ACEOF
14073
Guido van Rossumf78abae1997-01-21 22:02:36 +000014074# The following way of writing the cache mishandles newlines in values,
14075# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014076# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014077# Ultrix sh set writes to stderr and can't be redirected directly,
14078# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079(
14080 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14081 eval ac_val=\$$ac_var
14082 case $ac_val in #(
14083 *${as_nl}*)
14084 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014085 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14086$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014087 esac
14088 case $ac_var in #(
14089 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014090 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14091 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014092 esac ;;
14093 esac
14094 done
14095
Martin v. Löwis11437992002-04-12 09:54:03 +000014096 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014097 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14098 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099 # `set' does not quote correctly, so add quotes: double-quote
14100 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014102 "s/'/'\\\\''/g;
14103 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014104 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 *)
14106 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014107 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014109 esac |
14110 sort
14111) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014113 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014115 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14117 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014118 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14119 :end' >>confcache
14120if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14121 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014122 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014123 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14124$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014125 if test ! -f "$cache_file" || test -h "$cache_file"; then
14126 cat confcache >"$cache_file"
14127 else
14128 case $cache_file in #(
14129 */* | ?:*)
14130 mv -f confcache "$cache_file"$$ &&
14131 mv -f "$cache_file"$$ "$cache_file" ;; #(
14132 *)
14133 mv -f confcache "$cache_file" ;;
14134 esac
14135 fi
14136 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014137 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014138 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14139$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014140 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014141fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014142rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014143
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014144test "x$prefix" = xNONE && prefix=$ac_default_prefix
14145# Let make expand exec_prefix.
14146test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014147
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014148DEFS=-DHAVE_CONFIG_H
14149
Skip Montanaro6dead952003-09-25 14:50:04 +000014150ac_libobjs=
14151ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014152U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014153for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14154 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014155 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014156 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014157 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14158 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014159 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14160 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014161done
14162LIBOBJS=$ac_libobjs
14163
14164LTLIBOBJS=$ac_ltlibobjs
14165
14166
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014168
Matthias Klose3cef2a92012-03-14 23:39:33 +010014169: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014170ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014171ac_clean_files_save=$ac_clean_files
14172ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014173{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14174$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14175as_write_fail=0
14176cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014177#! $SHELL
14178# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014179# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014180# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014181# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014182
Martin v. Löwis11437992002-04-12 09:54:03 +000014183debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014184ac_cs_recheck=false
14185ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014186
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014187SHELL=\${CONFIG_SHELL-$SHELL}
14188export SHELL
14189_ASEOF
14190cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14191## -------------------- ##
14192## M4sh Initialization. ##
14193## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014194
Martin v. Löwiseba40652007-08-30 20:10:57 +000014195# Be more Bourne compatible
14196DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014197if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014198 emulate sh
14199 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014200 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014201 # is contrary to our usage. Disable this feature.
14202 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014203 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014205 case `(set -o) 2>/dev/null` in #(
14206 *posix*) :
14207 set -o posix ;; #(
14208 *) :
14209 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014210esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014211fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014212
Skip Montanaro6dead952003-09-25 14:50:04 +000014213
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014214as_nl='
14215'
14216export as_nl
14217# Printing a long string crashes Solaris 7 /usr/bin/printf.
14218as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14219as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14220as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14221# Prefer a ksh shell builtin over an external printf program on Solaris,
14222# but without wasting forks for bash or zsh.
14223if test -z "$BASH_VERSION$ZSH_VERSION" \
14224 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14225 as_echo='print -r --'
14226 as_echo_n='print -rn --'
14227elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14228 as_echo='printf %s\n'
14229 as_echo_n='printf %s'
14230else
14231 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14232 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14233 as_echo_n='/usr/ucb/echo -n'
14234 else
14235 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14236 as_echo_n_body='eval
14237 arg=$1;
14238 case $arg in #(
14239 *"$as_nl"*)
14240 expr "X$arg" : "X\\(.*\\)$as_nl";
14241 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14242 esac;
14243 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14244 '
14245 export as_echo_n_body
14246 as_echo_n='sh -c $as_echo_n_body as_echo'
14247 fi
14248 export as_echo_body
14249 as_echo='sh -c $as_echo_body as_echo'
14250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
14252# The user is always right.
14253if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014254 PATH_SEPARATOR=:
14255 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14256 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14257 PATH_SEPARATOR=';'
14258 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014259fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014260
Martin v. Löwiseba40652007-08-30 20:10:57 +000014261
14262# IFS
14263# We need space, tab and new line, in precisely that order. Quoting is
14264# there to prevent editors from complaining about space-tab.
14265# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14266# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014267IFS=" "" $as_nl"
14268
14269# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014270as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014272 *[\\/]* ) as_myself=$0 ;;
14273 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014274for as_dir in $PATH
14275do
14276 IFS=$as_save_IFS
14277 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14279 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014280IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
Martin v. Löwiseba40652007-08-30 20:10:57 +000014282 ;;
14283esac
14284# We did not find ourselves, most probably we were run as `sh COMMAND'
14285# in which case we are not to be found in the path.
14286if test "x$as_myself" = x; then
14287 as_myself=$0
14288fi
14289if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014290 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14291 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014292fi
14293
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294# Unset variables that we do not need and which cause bugs (e.g. in
14295# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14296# suppresses any "Segmentation fault" message there. '((' could
14297# trigger a bug in pdksh 5.2.14.
14298for as_var in BASH_ENV ENV MAIL MAILPATH
14299do eval test x\${$as_var+set} = xset \
14300 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014301done
14302PS1='$ '
14303PS2='> '
14304PS4='+ '
14305
14306# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014307LC_ALL=C
14308export LC_ALL
14309LANGUAGE=C
14310export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014312# CDPATH.
14313(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14314
14315
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014316# as_fn_error STATUS ERROR [LINENO LOG_FD]
14317# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014318# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14319# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014320# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014321as_fn_error ()
14322{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014323 as_status=$1; test $as_status -eq 0 && as_status=1
14324 if test "$4"; then
14325 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14326 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014327 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014328 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014329 as_fn_exit $as_status
14330} # as_fn_error
14331
14332
14333# as_fn_set_status STATUS
14334# -----------------------
14335# Set $? to STATUS, without forking.
14336as_fn_set_status ()
14337{
14338 return $1
14339} # as_fn_set_status
14340
14341# as_fn_exit STATUS
14342# -----------------
14343# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14344as_fn_exit ()
14345{
14346 set +e
14347 as_fn_set_status $1
14348 exit $1
14349} # as_fn_exit
14350
14351# as_fn_unset VAR
14352# ---------------
14353# Portably unset VAR.
14354as_fn_unset ()
14355{
14356 { eval $1=; unset $1;}
14357}
14358as_unset=as_fn_unset
14359# as_fn_append VAR VALUE
14360# ----------------------
14361# Append the text in VALUE to the end of the definition contained in VAR. Take
14362# advantage of any shell optimizations that allow amortized linear growth over
14363# repeated appends, instead of the typical quadratic growth present in naive
14364# implementations.
14365if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14366 eval 'as_fn_append ()
14367 {
14368 eval $1+=\$2
14369 }'
14370else
14371 as_fn_append ()
14372 {
14373 eval $1=\$$1\$2
14374 }
14375fi # as_fn_append
14376
14377# as_fn_arith ARG...
14378# ------------------
14379# Perform arithmetic evaluation on the ARGs, and store the result in the
14380# global $as_val. Take advantage of shells that can avoid forks. The arguments
14381# must be portable across $(()) and expr.
14382if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14383 eval 'as_fn_arith ()
14384 {
14385 as_val=$(( $* ))
14386 }'
14387else
14388 as_fn_arith ()
14389 {
14390 as_val=`expr "$@" || test $? -eq 1`
14391 }
14392fi # as_fn_arith
14393
14394
Martin v. Löwiseba40652007-08-30 20:10:57 +000014395if expr a : '\(a\)' >/dev/null 2>&1 &&
14396 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14397 as_expr=expr
14398else
14399 as_expr=false
14400fi
14401
14402if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14403 as_basename=basename
14404else
14405 as_basename=false
14406fi
14407
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014408if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14409 as_dirname=dirname
14410else
14411 as_dirname=false
14412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014413
Martin v. Löwiseba40652007-08-30 20:10:57 +000014414as_me=`$as_basename -- "$0" ||
14415$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14416 X"$0" : 'X\(//\)$' \| \
14417 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014419 sed '/^.*\/\([^/][^/]*\)\/*$/{
14420 s//\1/
14421 q
14422 }
14423 /^X\/\(\/\/\)$/{
14424 s//\1/
14425 q
14426 }
14427 /^X\/\(\/\).*/{
14428 s//\1/
14429 q
14430 }
14431 s/.*/./; q'`
14432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014433# Avoid depending upon Character Ranges.
14434as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14435as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14436as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14437as_cr_digits='0123456789'
14438as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014439
14440ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014441case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014442-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014443 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014444 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014445 xy) ECHO_C='\c';;
14446 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14447 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448 esac;;
14449*)
14450 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014451esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014452
Martin v. Löwis11437992002-04-12 09:54:03 +000014453rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014454if test -d conf$$.dir; then
14455 rm -f conf$$.dir/conf$$.file
14456else
14457 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014458 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460if (echo >conf$$.file) 2>/dev/null; then
14461 if ln -s conf$$.file conf$$ 2>/dev/null; then
14462 as_ln_s='ln -s'
14463 # ... but there are two gotchas:
14464 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14465 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014466 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014467 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014468 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014469 elif ln conf$$.file conf$$ 2>/dev/null; then
14470 as_ln_s=ln
14471 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014472 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014474else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014475 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014477rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14478rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480
14481# as_fn_mkdir_p
14482# -------------
14483# Create "$as_dir" as a directory, including parents if necessary.
14484as_fn_mkdir_p ()
14485{
14486
14487 case $as_dir in #(
14488 -*) as_dir=./$as_dir;;
14489 esac
14490 test -d "$as_dir" || eval $as_mkdir_p || {
14491 as_dirs=
14492 while :; do
14493 case $as_dir in #(
14494 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14495 *) as_qdir=$as_dir;;
14496 esac
14497 as_dirs="'$as_qdir' $as_dirs"
14498 as_dir=`$as_dirname -- "$as_dir" ||
14499$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14500 X"$as_dir" : 'X\(//\)[^/]' \| \
14501 X"$as_dir" : 'X\(//\)$' \| \
14502 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14503$as_echo X"$as_dir" |
14504 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14505 s//\1/
14506 q
14507 }
14508 /^X\(\/\/\)[^/].*/{
14509 s//\1/
14510 q
14511 }
14512 /^X\(\/\/\)$/{
14513 s//\1/
14514 q
14515 }
14516 /^X\(\/\).*/{
14517 s//\1/
14518 q
14519 }
14520 s/.*/./; q'`
14521 test -d "$as_dir" && break
14522 done
14523 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014524 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014525
14526
14527} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014528if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014529 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014530else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014531 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014532 as_mkdir_p=false
14533fi
14534
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014535
14536# as_fn_executable_p FILE
14537# -----------------------
14538# Test if FILE is an executable regular file.
14539as_fn_executable_p ()
14540{
14541 test -f "$1" && test -x "$1"
14542} # as_fn_executable_p
14543as_test_x='test -x'
14544as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
14546# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014547as_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 +000014548
14549# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014550as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014551
14552
Martin v. Löwis11437992002-04-12 09:54:03 +000014553exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554## ----------------------------------- ##
14555## Main body of $CONFIG_STATUS script. ##
14556## ----------------------------------- ##
14557_ASEOF
14558test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014560cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14561# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014562# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014563# values after options handling.
14564ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014565This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014566generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014567
14568 CONFIG_FILES = $CONFIG_FILES
14569 CONFIG_HEADERS = $CONFIG_HEADERS
14570 CONFIG_LINKS = $CONFIG_LINKS
14571 CONFIG_COMMANDS = $CONFIG_COMMANDS
14572 $ $0 $@
14573
Martin v. Löwiseba40652007-08-30 20:10:57 +000014574on `(hostname || uname -n) 2>/dev/null | sed 1q`
14575"
14576
Martin v. Löwis11437992002-04-12 09:54:03 +000014577_ACEOF
14578
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014579case $ac_config_files in *"
14580"*) set x $ac_config_files; shift; ac_config_files=$*;;
14581esac
14582
14583case $ac_config_headers in *"
14584"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14585esac
14586
14587
14588cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014589# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014590config_files="$ac_config_files"
14591config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014592
Martin v. Löwiseba40652007-08-30 20:10:57 +000014593_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014594
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014596ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014597\`$as_me' instantiates files and other configuration actions
14598from templates according to the current configuration. Unless the files
14599and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014601Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014602
14603 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014604 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014605 --config print configuration, then exit
14606 -q, --quiet, --silent
14607 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 -d, --debug don't remove temporary files
14609 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014610 --file=FILE[:TEMPLATE]
14611 instantiate the configuration file FILE
14612 --header=FILE[:TEMPLATE]
14613 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014614
14615Configuration files:
14616$config_files
14617
14618Configuration headers:
14619$config_headers
14620
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014621Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014622
Martin v. Löwiseba40652007-08-30 20:10:57 +000014623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014624cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14625ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014626ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014627python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014628configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014629 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014631Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014632This config.status script is free software; the Free Software Foundation
14633gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014634
14635ac_pwd='$ac_pwd'
14636srcdir='$srcdir'
14637INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000014638MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014639test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014640_ACEOF
14641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14643# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014644ac_need_defaults=:
14645while test $# != 0
14646do
14647 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014648 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014649 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14650 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014651 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014653 --*=)
14654 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14655 ac_optarg=
14656 ac_shift=:
14657 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014659 ac_option=$1
14660 ac_optarg=$2
14661 ac_shift=shift
14662 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 esac
14664
Skip Montanaro6dead952003-09-25 14:50:04 +000014665 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014666 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014667 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14668 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014670 $as_echo "$ac_cs_version"; exit ;;
14671 --config | --confi | --conf | --con | --co | --c )
14672 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014673 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 debug=: ;;
14675 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014676 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014677 case $ac_optarg in
14678 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014679 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014680 esac
14681 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 ac_need_defaults=false;;
14683 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014684 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014685 case $ac_optarg in
14686 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14687 esac
14688 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014689 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014690 --he | --h)
14691 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014692 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014693Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014694 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014695 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014696 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14697 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14698 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014699
14700 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014701 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014702Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014703
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014704 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014705 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014706
14707 esac
14708 shift
14709done
14710
Skip Montanaro6dead952003-09-25 14:50:04 +000014711ac_configure_extra_args=
14712
14713if $ac_cs_silent; then
14714 exec 6>/dev/null
14715 ac_configure_extra_args="$ac_configure_extra_args --silent"
14716fi
14717
14718_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014720if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010014721 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014722 shift
14723 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14724 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014725 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014726 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014727fi
14728
Martin v. Löwis11437992002-04-12 09:54:03 +000014729_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014730cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014731exec 5>>config.log
14732{
14733 echo
14734 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14735## Running $as_me. ##
14736_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014737 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014738} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014739
Martin v. Löwiseba40652007-08-30 20:10:57 +000014740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014741cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014742_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014745
14746# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014747for ac_config_target in $ac_config_targets
14748do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014749 case $ac_config_target in
14750 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14751 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14752 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14753 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014754 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14755 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14757 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014758 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014759 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014760
Matthias Klose3cef2a92012-03-14 23:39:33 +010014761 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014762 esac
14763done
14764
Martin v. Löwiseba40652007-08-30 20:10:57 +000014765
Martin v. Löwis11437992002-04-12 09:54:03 +000014766# If the user did not use the arguments to specify the items to instantiate,
14767# then the envvar interface is used. Set only those that are not.
14768# We use the long form for the default assignment because of an extremely
14769# bizarre bug on SunOS 4.1.3.
14770if $ac_need_defaults; then
14771 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14772 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14773fi
14774
Skip Montanaro6dead952003-09-25 14:50:04 +000014775# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014776# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014777# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014778# Hook for its removal unless debugging.
14779# Note that there is a small window in which the directory will not be cleaned:
14780# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014781$debug ||
14782{
Matthias Klose3cef2a92012-03-14 23:39:33 +010014783 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014784 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010014785 : "${ac_tmp:=$tmp}"
14786 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014787' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014788 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014789}
Martin v. Löwis11437992002-04-12 09:54:03 +000014790# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014791
Martin v. Löwis11437992002-04-12 09:54:03 +000014792{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014793 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010014794 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014795} ||
14796{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014797 tmp=./conf$$-$RANDOM
14798 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014799} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010014800ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014802# Set up the scripts for CONFIG_FILES section.
14803# No need to generate them if there are no CONFIG_FILES.
14804# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014805if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014807
14808ac_cr=`echo X | tr X '\015'`
14809# On cygwin, bash can eat \r inside `` if the user requested igncr.
14810# But we know of no other shell where ac_cr would be empty at this
14811# point, so we can use a bashism as a fallback.
14812if test "x$ac_cr" = x; then
14813 eval ac_cr=\$\'\\r\'
14814fi
14815ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14816if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014817 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014818else
14819 ac_cs_awk_cr=$ac_cr
14820fi
14821
Matthias Klose3cef2a92012-03-14 23:39:33 +010014822echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014823_ACEOF
14824
Martin v. Löwiseba40652007-08-30 20:10:57 +000014825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014826{
14827 echo "cat >conf$$subs.awk <<_ACEOF" &&
14828 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14829 echo "_ACEOF"
14830} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014831 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14832ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014833ac_delim='%!_!# '
14834for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014835 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014836 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014838 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14839 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014840 break
14841 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014842 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014843 else
14844 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014846done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014847rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014849cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010014850cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014851_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014852sed -n '
14853h
14854s/^/S["/; s/!.*/"]=/
14855p
14856g
14857s/^[^!]*!//
14858:repl
14859t repl
14860s/'"$ac_delim"'$//
14861t delim
14862:nl
14863h
14864s/\(.\{148\}\)..*/\1/
14865t more1
14866s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14867p
14868n
14869b repl
14870:more1
14871s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14872p
14873g
14874s/.\{148\}//
14875t nl
14876:delim
14877h
14878s/\(.\{148\}\)..*/\1/
14879t more2
14880s/["\\]/\\&/g; s/^/"/; s/$/"/
14881p
14882b
14883:more2
14884s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14885p
14886g
14887s/.\{148\}//
14888t delim
14889' <conf$$subs.awk | sed '
14890/^[^""]/{
14891 N
14892 s/\n//
14893}
14894' >>$CONFIG_STATUS || ac_write_fail=1
14895rm -f conf$$subs.awk
14896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14897_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010014898cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014899 for (key in S) S_is_set[key] = 1
14900 FS = ""
14901
14902}
14903{
14904 line = $ 0
14905 nfields = split(line, field, "@")
14906 substed = 0
14907 len = length(field[1])
14908 for (i = 2; i < nfields; i++) {
14909 key = field[i]
14910 keylen = length(key)
14911 if (S_is_set[key]) {
14912 value = S[key]
14913 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14914 len += length(value) + length(field[++i])
14915 substed = 1
14916 } else
14917 len += 1 + keylen
14918 }
14919
14920 print line
14921}
14922
14923_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014924_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14926if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14927 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14928else
14929 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010014930fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014931 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014932_ACEOF
14933
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014934# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14935# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014936# trailing colons and then remove the whole line if VPATH becomes empty
14937# (actually we leave an empty line to preserve line numbers).
14938if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014939 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14940h
14941s///
14942s/^/:/
14943s/[ ]*$/:/
14944s/:\$(srcdir):/:/g
14945s/:\${srcdir}:/:/g
14946s/:@srcdir@:/:/g
14947s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014948s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014949x
14950s/\(=[ ]*\).*/\1/
14951G
14952s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014953s/^[^=]*=[ ]*$//
14954}'
14955fi
14956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014957cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014958fi # test -n "$CONFIG_FILES"
14959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014960# Set up the scripts for CONFIG_HEADERS section.
14961# No need to generate them if there are no CONFIG_HEADERS.
14962# This happens for instance with `./config.status Makefile'.
14963if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014964cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014965BEGIN {
14966_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014968# Transform confdefs.h into an awk script `defines.awk', embedded as
14969# here-document in config.status, that substitutes the proper values into
14970# config.h.in to produce config.h.
14971
14972# Create a delimiter string that does not exist in confdefs.h, to ease
14973# handling of long lines.
14974ac_delim='%!_!# '
14975for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010014976 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14977 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014978 break
14979 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014980 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014981 else
14982 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14983 fi
14984done
14985
14986# For the awk script, D is an array of macro values keyed by name,
14987# likewise P contains macro parameters if any. Preserve backslash
14988# newline sequences.
14989
14990ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14991sed -n '
14992s/.\{148\}/&'"$ac_delim"'/g
14993t rset
14994:rset
14995s/^[ ]*#[ ]*define[ ][ ]*/ /
14996t def
14997d
14998:def
14999s/\\$//
15000t bsnl
15001s/["\\]/\\&/g
15002s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15003D["\1"]=" \3"/p
15004s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15005d
15006:bsnl
15007s/["\\]/\\&/g
15008s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15009D["\1"]=" \3\\\\\\n"\\/p
15010t cont
15011s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15012t cont
15013d
15014:cont
15015n
15016s/.\{148\}/&'"$ac_delim"'/g
15017t clear
15018:clear
15019s/\\$//
15020t bsnlc
15021s/["\\]/\\&/g; s/^/"/; s/$/"/p
15022d
15023:bsnlc
15024s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15025b cont
15026' <confdefs.h | sed '
15027s/'"$ac_delim"'/"\\\
15028"/g' >>$CONFIG_STATUS || ac_write_fail=1
15029
15030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15031 for (key in D) D_is_set[key] = 1
15032 FS = ""
15033}
15034/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15035 line = \$ 0
15036 split(line, arg, " ")
15037 if (arg[1] == "#") {
15038 defundef = arg[2]
15039 mac1 = arg[3]
15040 } else {
15041 defundef = substr(arg[1], 2)
15042 mac1 = arg[2]
15043 }
15044 split(mac1, mac2, "(") #)
15045 macro = mac2[1]
15046 prefix = substr(line, 1, index(line, defundef) - 1)
15047 if (D_is_set[macro]) {
15048 # Preserve the white space surrounding the "#".
15049 print prefix "define", macro P[macro] D[macro]
15050 next
15051 } else {
15052 # Replace #undef with comments. This is necessary, for example,
15053 # in the case of _POSIX_SOURCE, which is predefined and required
15054 # on some systems where configure will not decide to define it.
15055 if (defundef == "undef") {
15056 print "/*", prefix defundef, macro, "*/"
15057 next
15058 }
15059 }
15060}
15061{ print }
15062_ACAWK
15063_ACEOF
15064cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015065 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015066fi # test -n "$CONFIG_HEADERS"
15067
15068
15069eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15070shift
15071for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072do
15073 case $ac_tag in
15074 :[FHLC]) ac_mode=$ac_tag; continue;;
15075 esac
15076 case $ac_mode$ac_tag in
15077 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015078 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015079 :[FH]-) ac_tag=-:-;;
15080 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15081 esac
15082 ac_save_IFS=$IFS
15083 IFS=:
15084 set x $ac_tag
15085 IFS=$ac_save_IFS
15086 shift
15087 ac_file=$1
15088 shift
15089
15090 case $ac_mode in
15091 :L) ac_source=$1;;
15092 :[FH])
15093 ac_file_inputs=
15094 for ac_f
15095 do
15096 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015097 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015098 *) # Look for the file first in the build tree, then in the source tree
15099 # (if the path is not absolute). The absolute path cannot be DOS-style,
15100 # because $ac_f cannot contain `:'.
15101 test -f "$ac_f" ||
15102 case $ac_f in
15103 [\\/$]*) false;;
15104 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15105 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015106 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015108 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15109 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015110 done
15111
15112 # Let's still pretend it is `configure' which instantiates (i.e., don't
15113 # use $as_me), people would be surprised to read:
15114 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015115 configure_input='Generated from '`
15116 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15117 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118 if test x"$ac_file" != x-; then
15119 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015120 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15121$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015123 # Neutralize special characters interpreted by sed in replacement strings.
15124 case $configure_input in #(
15125 *\&* | *\|* | *\\* )
15126 ac_sed_conf_input=`$as_echo "$configure_input" |
15127 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15128 *) ac_sed_conf_input=$configure_input;;
15129 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015130
15131 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015132 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15133 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134 esac
15135 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 esac
15137
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015139$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015140 X"$ac_file" : 'X\(//\)[^/]' \| \
15141 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015143$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15145 s//\1/
15146 q
15147 }
15148 /^X\(\/\/\)[^/].*/{
15149 s//\1/
15150 q
15151 }
15152 /^X\(\/\/\)$/{
15153 s//\1/
15154 q
15155 }
15156 /^X\(\/\).*/{
15157 s//\1/
15158 q
15159 }
15160 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015161 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015162 ac_builddir=.
15163
Martin v. Löwiseba40652007-08-30 20:10:57 +000015164case "$ac_dir" in
15165.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15166*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015167 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015168 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015169 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015170 case $ac_top_builddir_sub in
15171 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15172 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15173 esac ;;
15174esac
15175ac_abs_top_builddir=$ac_pwd
15176ac_abs_builddir=$ac_pwd$ac_dir_suffix
15177# for backward compatibility:
15178ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015179
15180case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015181 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015183 ac_top_srcdir=$ac_top_builddir_sub
15184 ac_abs_top_srcdir=$ac_pwd ;;
15185 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187 ac_top_srcdir=$srcdir
15188 ac_abs_top_srcdir=$srcdir ;;
15189 *) # Relative name.
15190 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15191 ac_top_srcdir=$ac_top_build_prefix$srcdir
15192 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015193esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015194ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015195
Martin v. Löwis11437992002-04-12 09:54:03 +000015196
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197 case $ac_mode in
15198 :F)
15199 #
15200 # CONFIG_FILE
15201 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015202
15203 case $INSTALL in
15204 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015205 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015207 ac_MKDIR_P=$MKDIR_P
15208 case $MKDIR_P in
15209 [\\/$]* | ?:[\\/]* ) ;;
15210 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15211 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015212_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015213
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215# If the template does not know about datarootdir, expand it.
15216# FIXME: This hack should be removed a few years after 2.60.
15217ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015218ac_sed_dataroot='
15219/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 p
15221 q
15222}
15223/@datadir@/p
15224/@docdir@/p
15225/@infodir@/p
15226/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015227/@mandir@/p'
15228case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229*datarootdir*) ac_datarootdir_seen=yes;;
15230*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15232$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015234cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015235 ac_datarootdir_hack='
15236 s&@datadir@&$datadir&g
15237 s&@docdir@&$docdir&g
15238 s&@infodir@&$infodir&g
15239 s&@localedir@&$localedir&g
15240 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015241 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015242esac
15243_ACEOF
15244
15245# Neutralize VPATH when `$srcdir' = `.'.
15246# Shell code in configure.ac might set extrasub.
15247# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015248cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15249ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015250$extrasub
15251_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015253:t
15254/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015255s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015257s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258s&@srcdir@&$ac_srcdir&;t t
15259s&@abs_srcdir@&$ac_abs_srcdir&;t t
15260s&@top_srcdir@&$ac_top_srcdir&;t t
15261s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15262s&@builddir@&$ac_builddir&;t t
15263s&@abs_builddir@&$ac_abs_builddir&;t t
15264s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15265s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015266s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015268"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015269eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15270 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015271
Martin v. Löwiseba40652007-08-30 20:10:57 +000015272test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015273 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15274 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15275 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015277which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015278$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015279which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015280
Matthias Klose3cef2a92012-03-14 23:39:33 +010015281 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015283 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15284 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015285 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015286 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015287 ;;
15288 :H)
15289 #
15290 # CONFIG_HEADER
15291 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015292 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015293 {
15294 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015295 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15296 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015297 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015298 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015299 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15300$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015302 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015303 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015304 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 fi
15306 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015307 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015308 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015309 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015310 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015312
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313
15314 esac
15315
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015316
15317 case $ac_file$ac_mode in
15318 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15319
15320 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321done # for ac_tag
15322
Guido van Rossum627b2d71993-12-24 10:39:16 +000015323
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015324as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015325_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015326ac_clean_files=$ac_clean_files_save
15327
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015328test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015329 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015330
Martin v. Löwis11437992002-04-12 09:54:03 +000015331
15332# configure is writing to config.log, and then calls config.status.
15333# config.status does its own redirection, appending to config.log.
15334# Unfortunately, on DOS this fails, as config.log is still kept open
15335# by configure, so config.status won't be able to write to it; its
15336# output is simply discarded. So we exec the FD to /dev/null,
15337# effectively closing config.log, so it can be properly (re)opened and
15338# appended to by config.status. When coming back to configure, we
15339# need to make the FD available again.
15340if test "$no_create" != yes; then
15341 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015342 ac_config_status_args=
15343 test "$silent" = yes &&
15344 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015346 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 exec 5>>config.log
15348 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15349 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015350 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015351fi
15352if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15354$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015355fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015356
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015357
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015358echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015359if test ! -f Modules/Setup
15360then
15361 cp $srcdir/Modules/Setup.dist Modules/Setup
15362fi
15363
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015364echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015365if test ! -f Modules/Setup.local
15366then
15367 echo "# Edit this file for local setup changes" >Modules/Setup.local
15368fi
15369
15370echo "creating Makefile"
15371$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15372 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015373 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015374
15375case $ac_sys_system in
15376BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015378
15379 Support for BeOS is deprecated as of Python 2.6.
15380 See PEP 11 for the gory details.
15381 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015382$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015383
15384 Support for BeOS is deprecated as of Python 2.6.
15385 See PEP 11 for the gory details.
15386 " >&2;}
15387 ;;
15388*) ;;
15389esac
15390
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015391mv config.c Modules