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=#
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
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
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.