From 6928adc90ac88770e411cacb850616bf3516f165 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 25 May 2000 23:28:50 +0000 Subject: [PATCH] ChangeLog, configure, configure.in: Add test for lseek64 and open64 ChangeLog, Makefile.in: Makefile.in: Fix makefile so that it's safe to build in parallel. --- ChangeLog | 6 ++++ Makefile.in | 19 +++++++----- configure | 100 +++++++++++++++++++++++++++++++++++++++-------------------- configure.in | 23 +++++++++++++- 4 files changed, 106 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2024a04..ebc8102 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-05-25 + + * Makefile.in: Fix makefile so that it's safe to build in parallel. + + * configure.in: Add test for lseek64 and open64. + 2000-05-25 Theodore Ts'o * configure.in (DO_SUBSTITUTE_SCRIPT): Remove unneeded diff --git a/Makefile.in b/Makefile.in index 0e6c35c..6a5bae9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,25 +15,28 @@ SUBS= include/asm/types.h TAR=tar -all:: $(SUBS) libs progs docs +all:: $(SUBS) + $(MAKE) libs + $(MAKE) progs + $(MAKE) docs progs: $(SUBS) all-progs-recursive libs: $(SUBS) all-libs-recursive docs: - cd doc && make libext2fs.info + cd doc && $(MAKE) libext2fs.info install-doc-libs: - cd doc && make install-doc-libs + cd doc && $(MAKE) install-doc-libs uninstall-doc-libs: - cd doc && make uninstall-doc-libs + cd doc && $(MAKE) uninstall-doc-libs clean-doc: - cd doc && make clean + cd doc && $(MAKE) clean distclean-doc: - cd doc && make distclean + cd doc && $(MAKE) distclean install: all-libs-recursive install-progs-recursive \ install-shlibs-libs-recursive install-doc-libs @@ -102,11 +105,11 @@ realclean-local: distclean-local $(RM) -f configure check: - cd tests && make check + cd tests && $(MAKE) check distribution_tar_file: $(RM) -rf /tmp/dest - make DESTDIR=/tmp/dest install + $(MAKE) DESTDIR=/tmp/dest install cp -r $(srcdir)/README $(srcdir)/install-utils /tmp/dest $(RM) -rf /tmp/dest/install-utils/CVS /tmp/dest/install-utils/ChangeLog cp $(srcdir)/INSTALL.@BINARY_TYPE@ /tmp/dest/INSTALL diff --git a/configure b/configure index 849fbb9..f0f3efc 100644 --- a/configure +++ b/configure @@ -4135,6 +4135,40 @@ if test "$e2fsprogs_cv_have_llseek_prototype" = yes; then EOF fi +echo $ac_n "checking whether lseek64 declared in unistd.h""... $ac_c" 1>&6 +echo "configure:4140: checking whether lseek64 declared in unistd.h" >&5 +if eval "test \"`echo '$''{'e2fsprogs_cv_have_lseek64_prototype'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +extern int lseek64(int); +; return 0; } +EOF +if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + e2fsprogs_cv_have_lseek64_prototype=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + e2fsprogs_cv_have_lseek64_prototype=yes +fi +rm -f conftest* +fi + +echo "$ac_t""$e2fsprogs_cv_have_lseek64_prototype" 1>&6 +if test "$e2fsprogs_cv_have_lseek64_prototype" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LSEEK64_PROTOTYPE 1 +EOF + +fi if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then # if cross-compiling, with no cached values, just assume something common. ac_cv_sizeof_short=2 @@ -4144,7 +4178,7 @@ if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then echo "configure: warning: Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8" 1>&2 fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4148: checking size of short" >&5 +echo "configure:4182: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4152,7 +4186,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -4163,7 +4197,7 @@ main() exit(0); } EOF -if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -4183,7 +4217,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4187: checking size of int" >&5 +echo "configure:4221: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4191,7 +4225,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -4202,7 +4236,7 @@ main() exit(0); } EOF -if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -4222,7 +4256,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4226: checking size of long" >&5 +echo "configure:4260: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4230,7 +4264,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -4241,7 +4275,7 @@ main() exit(0); } EOF -if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -4261,7 +4295,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4265: checking size of long long" >&5 +echo "configure:4299: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4269,7 +4303,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -4280,7 +4314,7 @@ main() exit(0); } EOF -if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -4308,19 +4342,19 @@ SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long echo $ac_n "checking whether struct stat has a st_flags field""... $ac_c" 1>&6 -echo "configure:4312: checking whether struct stat has a st_flags field" >&5 +echo "configure:4346: checking whether struct stat has a st_flags field" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat stat; stat.st_flags = 0; ; return 0; } EOF -if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_struct_st_flags=yes else @@ -4335,19 +4369,19 @@ fi echo "$ac_t""$e2fsprogs_cv_struct_st_flags" 1>&6 if test "$e2fsprogs_cv_struct_st_flags" = yes; then echo $ac_n "checking whether st_flags field is useful""... $ac_c" 1>&6 -echo "configure:4339: checking whether st_flags field is useful" >&5 +echo "configure:4373: checking whether st_flags field is useful" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags_immut'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat stat; stat.st_flags |= UF_IMMUTABLE; ; return 0; } EOF -if { (eval echo configure:4351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_struct_st_flags_immut=yes else @@ -4367,15 +4401,15 @@ EOF fi fi -for ac_func in chflags getrusage llseek strdup getmntinfo strcasecmp srandom fchown mallinfo fdatasync +for ac_func in chflags getrusage llseek lseek64 open64 strdup getmntinfo strcasecmp srandom fchown mallinfo fdatasync do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4374: checking for $ac_func" >&5 +echo "configure:4408: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4423,19 +4457,19 @@ fi done echo $ac_n "checking ino_t defined by sys/types.h""... $ac_c" 1>&6 -echo "configure:4427: checking ino_t defined by sys/types.h" >&5 +echo "configure:4461: checking ino_t defined by sys/types.h" >&5 if eval "test \"`echo '$''{'e2fsprogs_cv_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { ino_t ino; ino = 0; ; return 0; } EOF -if { (eval echo configure:4439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* e2fsprogs_cv_ino_t=yes else @@ -4456,7 +4490,7 @@ EOF fi SOCKET_LIB='' echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:4460: checking for socket in -lsocket" >&5 +echo "configure:4494: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4464,7 +4498,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4497,12 +4531,12 @@ fi echo $ac_n "checking for optreset""... $ac_c" 1>&6 -echo "configure:4501: checking for optreset" >&5 +echo "configure:4535: checking for optreset" >&5 if eval "test \"`echo '$''{'ac_cv_have_optreset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4557,20 +4591,20 @@ if test "$root_prefix" = NONE ; then fi echo $ac_n "checking whether linker accepts -static""... $ac_c" 1>&6 -echo "configure:4561: checking whether linker accepts -static" >&5 +echo "configure:4595: checking whether linker accepts -static" >&5 if eval "test \"`echo '$''{'ac_cv_e2fsprogs_use_static'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static" cat > conftest.$ac_ext < int main() { fflush(stdout); ; return 0; } EOF -if { (eval echo configure:4574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_e2fsprogs_use_static=yes else diff --git a/configure.in b/configure.in index 0405eaa..3d3fa95 100644 --- a/configure.in +++ b/configure.in @@ -400,6 +400,27 @@ if test "$e2fsprogs_cv_have_llseek_prototype" = yes; then AC_DEFINE(HAVE_LLSEEK_PROTOTYPE) fi dnl +dnl Check to see if lseek64() is declared in unistd.h. Glibc's header files +dnl are so convoluted that I can't tell whether it will always be defined, +dnl and if it isn't defined while lseek64 is defined in the library, +dnl disaster will strike. +dnl +dnl Warning! Use of --enable-gcc-wall may throw off this test. +dnl +dnl +AC_MSG_CHECKING(whether lseek64 declared in unistd.h) +AC_CACHE_VAL(e2fsprogs_cv_have_lseek64_prototype, + AC_TRY_COMPILE( +[#define _LARGEFILE_SOURCE +#define _LARGEFILE64_SOURCE +#include ], [extern int lseek64(int);], + [e2fsprogs_cv_have_lseek64_prototype=no], + [e2fsprogs_cv_have_lseek64_prototype=yes])) +AC_MSG_RESULT($e2fsprogs_cv_have_lseek64_prototype) +if test "$e2fsprogs_cv_have_lseek64_prototype" = yes; then + AC_DEFINE(HAVE_LSEEK64_PROTOTYPE) +fi +dnl dnl Word sizes... dnl if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then @@ -445,7 +466,7 @@ if test "$e2fsprogs_cv_struct_st_flags" = yes; then AC_DEFINE(HAVE_STAT_FLAGS) fi fi -AC_CHECK_FUNCS(chflags getrusage llseek strdup getmntinfo strcasecmp srandom fchown mallinfo fdatasync) +AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 strdup getmntinfo strcasecmp srandom fchown mallinfo fdatasync) dnl dnl Check to see if ino_t is defined dnl -- 1.8.3.1