From: David Carlier Date: Wed, 2 Jul 2025 13:00:07 +0000 (+0100) Subject: BUILD/MEDIUM: deviceatlas: fix when installed in custom locations. X-Git-Tag: v3.3-dev3~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e8e20a83f4dd789443b9176cd93573bcfa75c20;p=thirdparty%2Fhaproxy.git BUILD/MEDIUM: deviceatlas: fix when installed in custom locations. We are reusing DEVICEATLAS_INC/DEVICEATLAS_LIB when the DeviceAtlas library had been compiled and installed with cmake and make install targets. Works fine except when ldconfig is unaware of the path, thus adding cflags/ldflags into the mix. Ideally, to be backported down to the lowest stable branch. --- diff --git a/addons/deviceatlas/Makefile.inc b/addons/deviceatlas/Makefile.inc index 07d950a14..b144f883b 100644 --- a/addons/deviceatlas/Makefile.inc +++ b/addons/deviceatlas/Makefile.inc @@ -5,7 +5,8 @@ CXX := c++ CXXLIB := -lstdc++ ifeq ($(DEVICEATLAS_SRC),) -OPTIONS_LDFLAGS += -lda +OPTIONS_CFLAGS += -I$(DEVICEATLAS_INC) +OPTIONS_LDFLAGS += -Wl,-rpath,$(DEVICEATLAS_LIB) -L$(DEVICEATLAS_LIB) -lda else DEVICEATLAS_INC = $(DEVICEATLAS_SRC) DEVICEATLAS_LIB = $(DEVICEATLAS_SRC)