diff --git a/.gitignore b/.gitignore
index eb6940e5666c246f1401392b4c17bd8af361b893..d6525496ab19c98c64b26a4bd57cc249881139c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,7 @@ doc/info_reader_ex
 doc/mojitos.1
 tests/run
 src/counters_option.h
-src/meminfo_option.h
+src/memory_option.h
 src/sensors.h
 sensors.mk
 bin
diff --git a/configure.sh b/configure.sh
index 7e10ec378cdb26b03b660f5d79b2ed78fba6c475..56abf93595a0d3ba564c2683277a75ec4436daa4 100755
--- a/configure.sh
+++ b/configure.sh
@@ -117,6 +117,7 @@ detect_caps() {
 	[ -r /usr/include/linux/perf_event.h ] && hdr_whitelist=counters
 	[ -d /sys/class/infiniband ] && hdr_whitelist="${hdr_whitelist}|infiniband"
 	[ -r /proc/stat ] && hdr_whitelist="${hdr_whitelist}|load"
+	[ -r /proc/meminfo ] && hdr_whitelist="${hdr_whitelist}|memory_counters"
 
 	if [ "$(uname -r | cut -d "." -f 1)" -gt "2" ]; then
 		hdr_whitelist="${hdr_whitelist}|memory"
diff --git a/makefile b/makefile
index f25d5630f9f65be71fb7220785bc97a30ea6030a..63fa9838ebef6d292cfbf86e6c084a4c0a360309 100644
--- a/makefile
+++ b/makefile
@@ -40,8 +40,9 @@ $(BIN): $(BIN_DIR) $(OBJ) $(OBJ_DIR)/$(BIN).o
 
 $(OBJ): $(OBJ_DIR)
 $(OBJ_DIR)/counters.o: $(SRC_DIR)/counters_option.h
+$(OBJ_DIR)/memory_counters.o: $(SRC_DIR)/memory_option.h
 
-$(OBJ_DIR)/$(BIN).o: $(SRC_DIR)/$(BIN).c $(SRC_DIR)/counters_option.h
+$(OBJ_DIR)/$(BIN).o: $(SRC_DIR)/$(BIN).c $(SRC_DIR)/counters_option.h $(SRC_DIR)/memory_counters.h
 	$(CC) $(CFLAGS) -c $< -o $@
 
 $(OBJ_DIR)/util.o: $(SRC_DIR)/util.c $(SRC_DIR)/util.h
@@ -50,6 +51,9 @@ $(OBJ_DIR)/util.o: $(SRC_DIR)/util.c $(SRC_DIR)/util.h
 $(SRC_DIR)/counters_option.h: $(SRC_DIR)/counters_option.sh
 	sh ./$(SRC_DIR)/counters_option.sh > $(SRC_DIR)/counters_option.h
 
+$(SRC_DIR)/memory_option.h: $(SRC_DIR)/memory_option.sh
+	sh ./$(SRC_DIR)/memory_option.sh > $(SRC_DIR)/memory_option.h
+
 $(OBJ_DIR):
 	mkdir -p $(OBJ_DIR)
 
diff --git a/src/memory_counters.h b/src/memory_counters.h
index a066c422d0f9201fc59360bfe6ed5f325fdea90a..a0b9613515c8d6bc41a0816c12db1ba9ad27720d 100644
--- a/src/memory_counters.h
+++ b/src/memory_counters.h
@@ -24,7 +24,7 @@ void label_memory_counters(char **labels, void *ptr);
 void clean_memory_counters(void *ptr);
 void *show_all_memory_counters(void *, size_t);
 
-sensor memory_counters = {
+Sensor memory_counters = {
     .init = init_memory_counters,
     .get = get_memory_counters,
     .clean = clean_memory_counters,
diff --git a/src/meminfo_option.sh b/src/memory_option.sh
old mode 100644
new mode 100755
similarity index 100%
rename from src/meminfo_option.sh
rename to src/memory_option.sh