From aab730841f6bf9fe93383649c2e1e25cea3818a8 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 5 Feb 2009 21:23:07 -0800 Subject: Large file support Signed-off-by: Matt Colyer --- configure.ac | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 286b1d8..7c31e2a 100644 --- a/configure.ac +++ b/configure.ac @@ -59,4 +59,31 @@ if test "$no_debug_code" = true; then AC_DEFINE(STRIP_DEBUG_CODE,1,[Strip debug reporting code]) fi +# check for large file support +AC_SYS_LARGEFILE +LFS_CFLAGS='' +if test "$enable_largefile" != no; then + if test "$ac_cv_sys_file_offset_bits" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" + else + AC_MSG_CHECKING(for native large file support) + AC_RUN_IFELSE([#include + int main (int argc, char **argv) + { + exit(!(sizeof(off_t) == 8)); + }], + [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + fi + if test "$ac_cv_sys_large_files" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=1" + fi + AC_FUNC_FSEEKO + if test "$ac_cv_sys_largefile_source" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_LARGEFILE_SOURCE=1" + fi +fi +AC_SUBST(LFS_CFLAGS) + AC_OUTPUT(Makefile src/Makefile include/Makefile fdi/Makefile dev/Makefile libiphone-1.0.pc) -- cgit v1.1-32-gdbae