Currently mtd-utils on 32bit systems fail on devices >2GiB due to off_t being
a signed 32bit type. Add AC_SYS_LARGEFILE to make off_t a 64bit type.
Adding AC_SYS_LARGEFILE results in _FILE_OFFSET_BITS being defined to 64
in include/config.h. To let this have an effect we must make sure that
include/config.h is included before all other includes which is
archieved by adding its inclusion to CPPFLAGS.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
ACLOCAL_AMFLAGS = -I m4
-AM_CPPFLAGS = $(WARN_CFLAGS) -D_GNU_SOURCE -std=gnu99 -I$(top_srcdir)/include
+AM_CPPFLAGS = $(WARN_CFLAGS) -D_GNU_SOURCE -std=gnu99 -I$(top_srcdir)/include \
+ -include $(top_builddir)/include/config.h
if WITHOUT_XATTR
AM_CPPFLAGS += -DWITHOUT_XATTR
AC_DISABLE_STATIC
AC_PROG_CC
AC_PROG_INSTALL
-
+AC_SYS_LARGEFILE
m4_ifndef([PKG_PROG_PKG_CONFIG],
[m4_fatal([Could not locate the pkg-config autoconf
#include <unistd.h>
#include <sys/sysmacros.h>
-#include "config.h"
-
#ifndef PROGRAM_NAME
# error "You must define PROGRAM_NAME before including this header"
#endif
#ifndef LIBMISSING_H
#define LIBMISSING_H
-#include "config.h"
-
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif