Whamcloud - gitweb
ChangeLog, mke2fs.c:
[tools/e2fsprogs.git] / configure.in
index 6e81125..783807e 100644 (file)
@@ -363,7 +363,7 @@ if test $cross_compiling = no; then
 else
   AC_CHECK_PROGS(BUILD_CC, gcc cc)
 fi
-AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/sockio.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h)
+AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/mount.h sys/sockio.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h)
 AC_FUNC_VPRINTF
 dnl
 dnl See if struct dirent has a d_namlen field (like bsd systems), implying
@@ -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)
+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
@@ -559,11 +580,6 @@ else
 fi
 AC_SUBST(DO_TEST_SUITE)
 dnl
-dnl
-dnl
-DO_SUBSTITUTE_SCRIPT=$srcdir/lib/do_substitute
-AC_SUBST_FILE(DO_SUBSTITUTE_SCRIPT)
-dnl
 dnl Make our output files, being sure that we create the some miscellaneous 
 dnl directories
 dnl