summaryrefslogtreecommitdiff
path: root/libdm
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2021-05-09 11:00:22 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2023-02-23 16:46:35 +0100
commitc8868041d871a35c132c1d31af9c7e6342fab51c (patch)
treeb3f9b037d4814dd35ac72c8f410f58e45997dd48 /libdm
parent2b7fa40aacfe3765ea14c476789de4bf7bd5efe6 (diff)
downloadlvm2-c8868041d871a35c132c1d31af9c7e6342fab51c.tar.gz
configure.ac: use pkg-config to detect static libs
Add some Gentoo based patches for better support of static linking. This are not tested nor supported by upstream developers. Usage requires presence of several libraries in their static form which is however not commonly available. Selinux modified by zkabelac to still work on older sofrware which did not provided libselinux.pc at a time - see keep the old check present and use pkg-config only when possible.
Diffstat (limited to 'libdm')
-rw-r--r--libdm/make.tmpl.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in
index 3d032f1b0..cc28e73cb 100644
--- a/libdm/make.tmpl.in
+++ b/libdm/make.tmpl.in
@@ -54,7 +54,7 @@ RM = rm -f
LIBS += @LIBS@ $(PTHREAD_LIBS) $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS)
# Extra libraries always linked with static binaries
-STATIC_LIBS = $(PTHREAD_LIBS)
+STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(RT_LIBS) $(M_LIBS)
DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
@@ -72,10 +72,13 @@ PTHREAD_LIBS = @PTHREAD_LIBS@
READLINE_LIBS = @READLINE_LIBS@
EDITLINE_LIBS = @EDITLINE_LIBS@
SELINUX_LIBS = @SELINUX_LIBS@
+SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@
+UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
BLKID_CFLAGS = @BLKID_CFLAGS@
BLKID_LIBS = @BLKID_LIBS@
+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@