From e1b7a5c750cf1dc09d7e14909234c7079ee9fabf Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 28 Mar 2012 10:56:54 +1100 Subject: build: combine off_t 64 bit and largefile test --- source3/configure.in | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) (limited to 'source3') diff --git a/source3/configure.in b/source3/configure.in index 5aaa4587d4..e278a390b0 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2071,13 +2071,21 @@ if test x"$samba_cv_TIME_T_MAX" = x"yes"; then fi +# +# As a gating factor for large file support, in order to +# use >4GB files we must have the following minimal support +# available: a 64 bit off_t +# If we don't have all of these then fail the build +# + +AC_MSG_CHECKING([if large file support can be enabled]) AC_CACHE_CHECK([for 64 bit off_t],samba_cv_SIZEOF_OFF_T,[ AC_TRY_RUN([#include #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); }], samba_cv_SIZEOF_OFF_T=yes,samba_cv_SIZEOF_OFF_T=no,samba_cv_SIZEOF_OFF_T=cross)]) -if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then - AC_DEFINE(SIZEOF_OFF_T,8,[The size of the 'off_t' type]) +if test x"$samba_cv_SIZEOF_OFF_T" = x"no"; then + AC_MSG_ERROR(["large file support support not available: sizeof(off_t) != 8"]) fi AC_CACHE_CHECK([for 64 bit ino_t],samba_cv_SIZEOF_INO_T,[ @@ -5067,28 +5075,6 @@ if test $space = no; then fi fi -# -# As a gating factor for large file support, in order to -# use <4GB files we must have the following minimal support -# available: a 64 bit off_t -# If we don't have all of these then fail the build -# -AC_MSG_CHECKING([if large file support can be enabled]) -AC_TRY_COMPILE([ -#if (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)) -#include -#else -__COMPILE_ERROR_ -#endif -], -[int i], -samba_cv_HAVE_LARGEFILE_SUPPORT=yes,samba_cv_HAVE_LARGEFILE_SUPPORT=no) -if test x"$samba_cv_HAVE_LARGEFILE_SUPPORT" != x"yes"; then - AC_MSG_ERROR(["large file support support not available: sizeof(off_t) != 8"]) -fi -AC_MSG_RESULT([$samba_cv_HAVE_LARGEFILE_SUPPORT]) - - ################################################# # check for cluster extensions -- cgit