Whamcloud - gitweb
Many files:
[tools/e2fsprogs.git] / configure.in
index 0b81ac9..8b5f4b5 100644 (file)
@@ -222,7 +222,7 @@ dnl
 dnl handle --enable-gcc-wall
 dnl
 AC_ARG_ENABLE([gcc-wall],
-[  --enable-gcc-wall     enable GCC anal warnings],
+[  --enable-gcc-wall     enable GCC anal warnings (DON'T USE IN PRODUCTION)],
 if test "$enableval" = "no"
 then
        W=#
@@ -315,7 +315,7 @@ AC_CHECK_TOOL(STRIP, strip, :)
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_C_CROSS
-AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h mntent.h dirent.h getopt.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 mntent.h dirent.h getopt.h setjmp.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_FUNC_VPRINTF
 dnl
 dnl See if struct dirent has a d_namlen field (like bsd systems), implying
@@ -335,6 +335,23 @@ if test "$e2fsprogs_cv_struct_d_namlen" = yes; then
   AC_DEFINE(HAVE_DIRENT_NAMLEN)
 fi
 dnl
+dnl Check to see if llseek() is declared in unistd.h.  On some libc's 
+dnl it is, and on others it isn't..... Thank you glibc developers....
+dnl
+dnl Warning!  Use of --enable-gcc-wall may throw off this test.
+dnl
+dnl
+AC_MSG_CHECKING(whether llseek declared in unistd.h)
+AC_CACHE_VAL(e2fsprogs_cv_have_llseek_prototype,
+       AC_TRY_COMPILE(
+[#include <unistd.h>], [extern int llseek(int);],
+       [e2fsprogs_cv_have_llseek_prototype=no],
+       [e2fsprogs_cv_have_llseek_prototype=yes]))
+AC_MSG_RESULT($e2fsprogs_cv_have_llseek_prototype)
+if test "$e2fsprogs_cv_have_llseek_prototype" = yes; then
+   AC_DEFINE(HAVE_LLSEEK_PROTOTYPE)
+fi
+dnl
 dnl Word sizes...
 dnl
 if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then
@@ -391,12 +408,8 @@ dnl that holds enough to fake it (hopefully).  Note that the $(top_srcdir) here
 dnl is quoted so that it gets expanded by make, not by configure.
 dnl
 AC_CHECK_HEADER(linux/fs.h, [linux_headers=yes], [linux_headers=no])
-AC_SUBST(EXTRA_PROGS)
 if test "$linux_headers" = yes; then
   AC_DEFINE(HAVE_LINUX_FS_H)
-  # These are some programs that depend on having linux headers around, and
-  # won't work otherwise.  So we only compile them if we can.
-  EXTRA_PROGS="$EXTRA_PROGS flushb"
 else
   LINUX_INCLUDE='-I$(top_srcdir)/include -I$(top_builddir)/include'
   # Use this include directory with test compiles in the configure script too.