diff --git a/configure b/configure index 0a365941a..e59c53382 100755 --- a/configure +++ b/configure @@ -4141,10 +4141,25 @@ else #include "confdefs.h" #include 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 < +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 < 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 < +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 < 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 < 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 < 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 < 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 diff --git a/configure.in b/configure.in index f47626bd1..1d90409c7 100644 --- a/configure.in +++ b/configure.in @@ -255,10 +255,13 @@ AC_CACHE_VAL(scm_cv_fd_setter, AC_TRY_COMPILE([#include ], [stdout->_file = 1], scm_cv_fd_setter="_file", + AC_TRY_COMPILE([#include ], + [stdout->__file = 1], + scm_cv_fd_setter="__file", AC_TRY_COMPILE([#include ], [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 ], [FILE *f = stdin; f->_cnt = 0], scm_cv_struct_file_count="_cnt", + AC_TRY_COMPILE([#include ], + [FILE *f = stdin; f->__cnt = 0], + scm_cv_struct_file_count="__cnt", AC_TRY_COMPILE([#include ], [FILE *f = stdin; f->_r = 0], scm_cv_struct_file_count="_r", AC_TRY_COMPILE([#include ], [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)