diff options
-rw-r--r-- | configure.ac | 27 | ||||
-rw-r--r-- | dev/Makefile.am | 4 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
3 files changed, 30 insertions, 3 deletions
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 <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 libiphone-1.0.pc) diff --git a/dev/Makefile.am b/dev/Makefile.am index 4833728..5f85ad7 100644 --- a/dev/Makefile.am +++ b/dev/Makefile.am @@ -1,6 +1,6 @@ INCLUDES = -I$(top_srcdir)/include -AM_CFLAGS = $(libxml2_CFLAGS) $(libusb_CFLAGS) $(libglib2_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(libgthread2_CFLAGS) -g +AM_CFLAGS = $(libxml2_CFLAGS) $(libusb_CFLAGS) $(libglib2_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(libgthread2_CFLAGS) -g $(LFS_CFLAGS) AM_LDFLAGS = $(libxml2_LIBS) $(libusb_LIBS) $(libglib2_LIBS) $(libgnutls_LIBS) $(libtasn1_LIBS) $(libgthread2_LIBS) bin_PROGRAMS = iphoneclient lckd-client afccheck @@ -16,4 +16,4 @@ lckd_client_LDADD = ../src/libiphone.la afccheck_SOURCES = afccheck.c afccheck_CFLAGS = $(AM_CFLAGS) afccheck_LDFLAGS = $(AM_LDFLAGS) -afccheck_LDADD = ../src/libiphone.la
\ No newline at end of file +afccheck_LDADD = ../src/libiphone.la diff --git a/src/Makefile.am b/src/Makefile.am index 382be1f..2661ed6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ INCLUDES = -I$(top_srcdir)/include -AM_CFLAGS = $(libxml2_CFLAGS) $(libusb_CFLAGS) $(libglib2_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(libgthread2_CFLAGS) -g -Wall +AM_CFLAGS = $(libxml2_CFLAGS) $(libusb_CFLAGS) $(libglib2_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(libgthread2_CFLAGS) -g -Wall $(LFS_CFLAGS) AM_LDFLAGS = $(libxml2_LIBS) $(libusb_LIBS) $(libglib2_LIBS) $(libgnutls_LIBS) $(libtasn1_LIBS) $(libgthread2_LIBS) bin_PROGRAMS = libiphone-initconf |