aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/make.configuration.defn7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/make.configuration.defn b/src/make.configuration.defn
index eeb57e8..8598186 100644
--- a/src/make.configuration.defn
+++ b/src/make.configuration.defn
@@ -7,3 +7,10 @@ ifeq ($(findstring CactusExternal/FlexIO,$(THORNS)),CactusExternal/FlexIO)
ALL_UTILS += hdf5_convert_from_ieeeio
FLEXIO_INC_DIRS = $(CCTK_HOME)$(DIRSEP)arrangements/CactusExternal/FlexIO/src
endif
+
+# Extend CFLAGS if HDF5 library was built with LFS support
+LFS_support := $(shell grep _LARGEFILE_SOURCE $(strip $(HDF5_LIB_DIRS))/libhdf5.settings)
+
+ifneq ($(strip $(LFS_support)),)
+ CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+endif