# USE_NS : enable network namespace support. Supported on Linux >= 2.6.24.
# USE_DL : enable it if your system requires -ldl. Automatic on Linux.
# USE_DEVICEATLAS : enable DeviceAtlas api.
+# USE_51DEGREES : enable third party device detection library from 51degrees
#
# Options can be forced by specifying "USE_xxx=1" or can be disabled by using
# "USE_xxx=" (empty string).
BUILD_OPTIONS += $(call ignore_implicit,USE_DEVICEATLAS)
endif
+ifneq ($(USE_51DEGREES),)
+# Use 51DEGREES_INC and 51DEGREES_LIB to force path to 51degrees headers and libraries if needed.
+51DEGREES_INC =
+51DEGREES_LIB =
+OPTIONS_CFLAGS += -DUSE_51DEGREES $(if $(51DEGREES_INC),-I$(51DEGREES_INC))
+BUILD_OPTIONS += $(call ignore_implicit,USE_51DEGREES)
+OPTIONS_LDFLAGS += $(if $(51DEGREES_LIB),-L$(51DEGREES_LIB)) -lz
+endif
+
ifneq ($(USE_PCRE)$(USE_STATIC_PCRE)$(USE_PCRE_JIT),)
# PCREDIR is used to automatically construct the PCRE_INC and PCRE_LIB paths,
# by appending /include and /lib respectively. If your system does not use the
OBJS += src/trace.o
endif
+ifneq ($(USE_51DEGREES),)
+OBJS += $(51DEGREES_SRC)/51Degrees.o
+endif
+
WRAPPER_OBJS = src/haproxy-systemd-wrapper.o
# Not used right now