diff --git a/Jamconfig.in b/Jamconfig.in index 4d6861a..74bb241 100644 --- a/Jamconfig.in +++ b/Jamconfig.in @@ -57,8 +57,9 @@ EDE_THEMES_DIR ?= "$(EDE_DATA_DIR)/$(EDE_PREFIX_SUBDIR)/themes" ; EDE_TIPS_DIR ?= "$(EDE_DATA_DIR)/$(EDE_PREFIX_SUBDIR)/tips" ; EDE_PANEL_APPLETS_DIR ?= "$(EDE_DATA_DIR)/$(EDE_PREFIX_SUBDIR)/panel-applets" ; -OPTIMFLAGS ?= @EDE_OPTIM_FLAGS@ ; -DEBUGFLAGS ?= @EDE_DEBUG_FLAGS@ ; +OPTIMFLAGS ?= @EDE_OPTIM_FLAGS@ ; +DEBUGFLAGS ?= @EDE_DEBUG_FLAGS@ ; +LARGEFILEFLAGS ?= @LARGEFILE@ ; # FIXME: a quick hack to work everything on SunStudio if $(SUN_COMPILER) { @@ -75,7 +76,7 @@ if $(SUN_COMPILER) { } # global flags used to be passed to every target -GLOBALFLAGS ?= $(WALL) $(PEDANTIC) -DHAVE_CONFIG_H -I$(TOP) $(OPTIMFLAGS) $(DEBUGFLAGS) ; +GLOBALFLAGS ?= $(WALL) $(PEDANTIC) -DHAVE_CONFIG_H -I$(TOP) $(OPTIMFLAGS) $(DEBUGFLAGS) $(LARGEFILEFLAGS) ; STDLIB ?= -lstdc++ ; # Note that REMOVE_UNUSED_DEPENDENCIES_TRICK _does not_ works when diff --git a/configure.in b/configure.in index 103f3d4..18b1e72 100644 --- a/configure.in +++ b/configure.in @@ -193,7 +193,7 @@ if test "$have_libxpm" = "yes"; then fi EDE_CHECK_STATFS -EDE_CHECK_STAT64 +EDE_LARGEFILE AC_PATH_PROG(CURL_CONFIG, curl-config) if test -n "$CURL_CONFIG"; then @@ -223,6 +223,7 @@ AC_SUBST(EFLTK_LIBS) AC_SUBST(EDELIB_API_INDEX) AC_SUBST(CURL_CFLAGS) AC_SUBST(CURL_LIBS) +AC_SUBST(LARGEFILE) AC_OUTPUT([ Jamconfig diff --git a/m4/largefile.m4 b/m4/largefile.m4 new file mode 100644 index 0000000..72c1485 --- /dev/null +++ b/m4/largefile.m4 @@ -0,0 +1,34 @@ +dnl +dnl $Id$ +dnl +dnl Copyright (c) 2009 edelib authors +dnl Copyright 1998-2007 by Bill Spitzak and others. +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with this library. If not, see . + +AC_DEFUN([EDE_LARGEFILE], [ + AC_ARG_ENABLE(largefile, [ --enable-largefile enable large file support],,[enable_largefile=no]) + LARGEFILE="" + + if test "$enable_largefile" = yes; then + LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" + if test "x$ac_cv_sys_large_files" = "x1"; then + LARGEFILE="$LARGEFILE -D_LARGE_FILES" + fi + + if test "x$ac_cv_sys_file_offset_bits" = "x64"; then + LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64" + fi + fi +]) diff --git a/m4/stat64.m4 b/m4/stat64.m4 deleted file mode 100644 index 049acae..0000000 --- a/m4/stat64.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl -dnl $Id$ -dnl -dnl Part of edelib. -dnl Copyright (c) 2009 EDE Authors. -dnl -dnl This program is licenced under terms of the -dnl GNU General Public Licence version 2 or newer. -dnl See COPYING for details. - -AC_DEFUN([EDE_CHECK_STAT64], [ - AC_MSG_CHECKING([for stat64]) - - AC_LANG_SAVE - AC_LANG_C - AC_TRY_COMPILE([ - /* C++ already defines this, but C does not and 'struct stat64' will not be seen */ - #define _LARGEFILE64_SOURCE 1 - #include - ],[ - struct stat64 s; - stat64("/", &s); - ],[have_stat64=yes],[have_stat64=no]) - AC_LANG_RESTORE - - if eval "test $have_stat64 = yes"; then - AC_DEFINE(HAVE_STAT64, 1, [Define to 1 if you have stat64]) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi -])