OSDN Git Service

ChangeLog, configure, configure.in:
authorTheodore Ts'o <tytso@mit.edu>
Thu, 25 May 2000 23:28:50 +0000 (23:28 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 25 May 2000 23:28:50 +0000 (23:28 +0000)
  Add test for lseek64 and open64
ChangeLog, Makefile.in:
  Makefile.in: Fix makefile so that it's safe to build in parallel.

ChangeLog
Makefile.in
configure
configure.in

index 2024a04..ebc8102 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-05-25    <tytso@snap.thunk.org>
+
+       * 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  <tytso@valinux.com>
 
        * configure.in (DO_SUBSTITUTE_SCRIPT): Remove unneeded
index 0e6c35c..6a5bae9 100644 (file)
@@ -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
index 849fbb9..f0f3efc 100644 (file)
--- 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 <<EOF
+#line 4145 "configure"
+#include "confdefs.h"
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#include <unistd.h>
+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 <<EOF
-#line 4156 "configure"
+#line 4190 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 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 <<EOF
-#line 4195 "configure"
+#line 4229 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 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 <<EOF
-#line 4234 "configure"
+#line 4268 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 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 <<EOF
-#line 4273 "configure"
+#line 4307 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 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 <<EOF
-#line 4317 "configure"
+#line 4351 "configure"
 #include "confdefs.h"
 #include <sys/stat.h>
 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 <<EOF
-#line 4344 "configure"
+#line 4378 "configure"
 #include "confdefs.h"
 #include <sys/stat.h>
 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 <<EOF
-#line 4379 "configure"
+#line 4413 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4398,7 +4432,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4402: \"$ac_link\") 1>&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 <<EOF
-#line 4432 "configure"
+#line 4466 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 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 <<EOF
-#line 4468 "configure"
+#line 4502 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4475,7 +4509,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:4479: \"$ac_link\") 1>&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
-#line 4506 "configure"
+#line 4540 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 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 <<EOF
-#line 4567 "configure"
+#line 4601 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 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
index 0405eaa..3d3fa95 100644 (file)
@@ -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 <unistd.h>], [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