1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* configure.in (FD_SETTER, FILE_CNT_GPTR): New cases for SCO's

stdio implementation.  (Thanks to David Tillman.)
* configure: Rebuilt.
This commit is contained in:
Jim Blandy 1998-10-03 19:30:21 +00:00
parent 2adfe1c0de
commit fe75dfc504
2 changed files with 59 additions and 19 deletions

66
configure vendored
View file

@ -4141,10 +4141,25 @@ else
#include "confdefs.h"
#include <stdio.h>
int main() {
stdout->_fileno = 1
stdout->__file = 1
; return 0; }
EOF
if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_fd_setter="__file"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 4156 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
stdout->_fileno = 1
; return 0; }
EOF
if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_fd_setter="_fileno"
else
@ -4157,6 +4172,8 @@ rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
fi
if test "$scm_cv_fd_setter"; then
@ -4173,7 +4190,7 @@ fi
# How to find out whether a FILE structure contains buffered data.
# From Tk we have the following list:
# _cnt: Most UNIX systems
# __cnt: HPUX
# __cnt: HPUX and SCO
# _r: BSD
# readCount: Sprite
# Or, in GNU libc there are two fields, _gptr and _egptr, which
@ -4182,19 +4199,19 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6
echo "configure:4186: checking how to get buffer char count from FILE structure" >&5
echo "configure:4203: checking how to get buffer char count from FILE structure" >&5
if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4191 "configure"
#line 4208 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_cnt = 0
; return 0; }
EOF
if { (eval echo configure:4198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="_cnt"
else
@ -4202,14 +4219,29 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 4206 "configure"
#line 4223 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->__cnt = 0
; return 0; }
EOF
if { (eval echo configure:4230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="__cnt"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 4238 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_r = 0
; return 0; }
EOF
if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="_r"
else
@ -4217,14 +4249,14 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 4221 "configure"
#line 4253 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->readCount = 0
; return 0; }
EOF
if { (eval echo configure:4228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="readCount"
else
@ -4239,6 +4271,8 @@ rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
fi
if test "$scm_cv_struct_file_count"; then
echo "$ac_t""$scm_cv_struct_file_count" 1>&6
@ -4251,14 +4285,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_gptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4255 "configure"
#line 4289 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_gptr = f->egptr;
; return 0; }
EOF
if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_gptr=1
else
@ -4281,14 +4315,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_readptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4285 "configure"
#line 4319 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;
; return 0; }
EOF
if { (eval echo configure:4292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_readptr=1
else
@ -4329,7 +4363,7 @@ fi
### Turn $with_threads into either the name of a threads package, like
### `qt', or `no', meaning that threads should not be supported.
echo $ac_n "checking whether to support threads""... $ac_c" 1>&6
echo "configure:4333: checking whether to support threads" >&5
echo "configure:4367: checking whether to support threads" >&5
case "$with_threads" in
"yes" | "qt" | "coop" | "")
with_threads=qt
@ -4353,7 +4387,7 @@ case "${with_threads}" in
echo $ac_n "checking QuickThreads configuration""... $ac_c" 1>&6
echo "configure:4357: checking QuickThreads configuration" >&5
echo "configure:4391: checking QuickThreads configuration" >&5
# How can we refer to the qt source directory from within the qt build
# directory? For headers, we can rely on the fact that the qt src
# directory appears in the #include path.
@ -4484,7 +4518,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4488: checking for $ac_word" >&5
echo "configure:4522: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else

View file

@ -255,10 +255,13 @@ AC_CACHE_VAL(scm_cv_fd_setter,
AC_TRY_COMPILE([#include <stdio.h>],
[stdout->_file = 1],
scm_cv_fd_setter="_file",
AC_TRY_COMPILE([#include <stdio.h>],
[stdout->__file = 1],
scm_cv_fd_setter="__file",
AC_TRY_COMPILE([#include <stdio.h>],
[stdout->_fileno = 1],
scm_cv_fd_setter="_fileno",
scm_cv_fd_setter="")))
scm_cv_fd_setter=""))))
if test "$scm_cv_fd_setter"; then
AC_MSG_RESULT($scm_cv_fd_setter)
@ -271,7 +274,7 @@ fi
# How to find out whether a FILE structure contains buffered data.
# From Tk we have the following list:
# _cnt: Most UNIX systems
# __cnt: HPUX
# __cnt: HPUX and SCO
# _r: BSD
# readCount: Sprite
# Or, in GNU libc there are two fields, _gptr and _egptr, which
@ -284,13 +287,16 @@ AC_CACHE_VAL(scm_cv_struct_file_count,
AC_TRY_COMPILE([#include <stdio.h>],
[FILE *f = stdin; f->_cnt = 0],
scm_cv_struct_file_count="_cnt",
AC_TRY_COMPILE([#include <stdio.h>],
[FILE *f = stdin; f->__cnt = 0],
scm_cv_struct_file_count="__cnt",
AC_TRY_COMPILE([#include <stdio.h>],
[FILE *f = stdin; f->_r = 0],
scm_cv_struct_file_count="_r",
AC_TRY_COMPILE([#include <stdio.h>],
[FILE *f = stdin; f->readCount = 0],
scm_cv_struct_file_count="readCount",
scm_cv_struct_file_count=""))))
scm_cv_struct_file_count="")))))
if test "$scm_cv_struct_file_count"; then
AC_MSG_RESULT($scm_cv_struct_file_count)
AC_DEFINE_UNQUOTED(FILE_CNT_FIELD, $scm_cv_struct_file_count)