summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-03-16 21:40:33 +0100
committerGravatar Jonathan Beck2009-03-16 21:40:33 +0100
commit19992c668afeb53a28e08a1f61572b5379f87590 (patch)
tree4f1784b81afe88a6240889961b5fc3d2b0d6a82e /configure.ac
parent0d05f8de79ee91e9be80c6296eff9ce216582ba4 (diff)
parent201e1ff5bf2054fcb1c0cc3cd7ba1e229dbde3fa (diff)
downloadlibimobiledevice-19992c668afeb53a28e08a1f61572b5379f87590.tar.gz
libimobiledevice-19992c668afeb53a28e08a1f61572b5379f87590.tar.bz2
Merge branch 'master' into contact_sync
Conflicts: configure.ac dev/Makefile.am include/libiphone/libiphone.h src/AFC.c src/AFC.h src/Makefile.am
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ec7e11a..a91d9f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,4 +68,32 @@ fi
AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter")
AC_SUBST(GLOBAL_CFLAGS)
+# 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 <unistd.h>
+ 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 swig/Makefile libiphone-1.0.pc)
+