Revert "CLEANUP: wurfl: remove dead, broken and unmaintained code"
This reverts commit 8e5e1e7bf000f2603a085c76be118214d22c55b4.
The following patches will fix this code and may be backported.
diff --git a/Makefile b/Makefile
index 35772be..e7a9db0 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,7 @@
# USE_RT : enable it if your system requires -lrt. Automatic on Linux.
# USE_DEVICEATLAS : enable DeviceAtlas api.
# USE_51DEGREES : enable third party device detection library from 51Degrees
+# USE_WURFL : enable WURFL detection library from Scientiamobile
# USE_SYSTEMD : enable sd_notify() support.
# USE_OBSOLETE_LINKER : use when the linker fails to emit __start_init/__stop_init
#
@@ -624,6 +625,24 @@
OPTIONS_LDFLAGS += $(if $(51DEGREES_LIB),-L$(51DEGREES_LIB)) -lm
endif
+ifneq ($(USE_WURFL),)
+# Use WURFL_SRC and possibly WURFL_INC and WURFL_LIB to force path
+# to WURFL headers and libraries if needed.
+WURFL_SRC =
+WURFL_INC = $(WURFL_SRC)
+WURFL_LIB = $(WURFL_SRC)
+OPTIONS_OBJS += src/wurfl.o
+OPTIONS_CFLAGS += -DUSE_WURFL $(if $(WURFL_INC),-I$(WURFL_INC))
+ifneq ($(WURFL_DEBUG),)
+OPTIONS_CFLAGS += -DWURFL_DEBUG
+endif
+ifneq ($(WURFL_HEADER_WITH_DETAILS),)
+OPTIONS_CFLAGS += -DWURFL_HEADER_WITH_DETAILS
+endif
+BUILD_OPTIONS += $(call ignore_implicit,USE_WURFL)
+OPTIONS_LDFLAGS += $(if $(WURFL_LIB),-L$(WURFL_LIB)) -lwurfl
+endif
+
ifneq ($(USE_SYSTEMD),)
OPTIONS_LDFLAGS += -lsystemd
endif