summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2022-01-05 14:35:15 +0100
committerChristian Hesse <mail@eworm.de>2022-02-08 10:54:40 +0100
commit4affafe91579799efd83f4c8e05c291eeb684c9c (patch)
tree481ebafa7923f825890c103042615bffa669871a /config.mk
parent617e1f3a75fedb01af851694fe31df5b859239a2 (diff)
use libmagic to detect valid file formats
Writing our own magic bytes detection is prone to errors and an everlasting catch-up-game. Let's use libmagic to get things right, this is less code and makes things more reliable. Building without libmagic is still possible. That will make the code act like specifying FEH_SKIP_MAGIC=1, effectively passing everything to imlib2.
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.mk b/config.mk
index 2d63f72..910eac7 100644
--- a/config.mk
+++ b/config.mk
@@ -6,6 +6,7 @@ curl ?= 1
debug ?= 0
exif ?= 0
help ?= 0
+magic ?= 1
mkstemps ?= 1
verscmp ?= 1
xinerama ?= 1
@@ -68,6 +69,11 @@ ifeq (${mkstemps},1)
CFLAGS += -DHAVE_MKSTEMPS
endif
+ifeq (${magic},1)
+ CFLAGS += -DHAVE_LIBMAGIC
+ LDLIBS += -lmagic
+endif
+
ifeq (${verscmp},1)
CFLAGS += -DHAVE_STRVERSCMP
endif