]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/MEDIUM: deviceatlas: fix when installed in custom locations.
authorDavid Carlier <dcarlier@deviceatlas.com>
Wed, 2 Jul 2025 13:00:07 +0000 (14:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Jul 2025 07:08:06 +0000 (09:08 +0200)
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.

addons/deviceatlas/Makefile.inc

index 07d950a14283156a25d439438f2aed3a4f4e2f33..b144f883b48c2b2ef53ca2f149ebc24c9d5ed786 100644 (file)
@@ -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)