mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
hsavmcore: Disable systemd support during build if systemd header not found
Check for systemd C header and disable systemd support even if HAVE_SYSTEMD make variable is set to 1. Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Acked-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
49901079d4
commit
89d25559e0
+16
-19
@@ -21,26 +21,30 @@ else # HAVE_FUSE
|
||||
# FUSE
|
||||
#
|
||||
ifneq ($(shell sh -c 'command -v pkg-config'),)
|
||||
FUSE_CFLAGS = $(shell pkg-config --silence-errors --cflags fuse)
|
||||
FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse)
|
||||
FUSE_CFLAGS = $(shell pkg-config --silence-errors --cflags fuse)
|
||||
FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse)
|
||||
else
|
||||
FUSE_CFLAGS = -I/usr/include/fuse
|
||||
FUSE_LDLIBS = -lfuse
|
||||
FUSE_CFLAGS = -I/usr/include/fuse
|
||||
FUSE_LDLIBS = -lfuse
|
||||
endif
|
||||
|
||||
#
|
||||
# systemd
|
||||
#
|
||||
ifneq (${HAVE_SYSTEMD},0)
|
||||
ifneq ($(shell sh -c 'command -v pkg-config'),)
|
||||
SYSTEMD_CFLAGS = $(shell pkg-config --silence-errors --cflags libsystemd)
|
||||
SYSTEMD_LDLIBS = $(shell pkg-config --silence-errors --libs libsystemd)
|
||||
else
|
||||
SYSTEMD_CFLAGS =
|
||||
SYSTEMD_LDLIBS = -lsystemd
|
||||
ifeq ($(call check_header_prereq,"systemd/sd-daemon.h"),yes)
|
||||
ifneq ($(shell sh -c 'command -v pkg-config'),)
|
||||
SYSTEMD_CFLAGS = $(shell pkg-config --silence-errors --cflags libsystemd)
|
||||
SYSTEMD_LDLIBS = $(shell pkg-config --silence-errors --libs libsystemd)
|
||||
else
|
||||
SYSTEMD_CFLAGS =
|
||||
SYSTEMD_LDLIBS = -lsystemd
|
||||
endif
|
||||
ALL_CPPFLAGS += -DHAVE_SYSTEMD
|
||||
else
|
||||
$(warning "systemd support disabled")
|
||||
endif
|
||||
endif
|
||||
ALL_CPPFLAGS += -DHAVE_SYSTEMD
|
||||
endif # HAVE_SYSTEMD
|
||||
|
||||
ALL_CPPFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
ALL_CFLAGS += $(FUSE_CFLAGS) $(SYSTEMD_CFLAGS)
|
||||
@@ -68,13 +72,6 @@ check_dep:
|
||||
"fuse.h", \
|
||||
"fuse-devel or libfuse-dev", \
|
||||
"HAVE_FUSE=0")
|
||||
ifneq (${HAVE_SYSTEMD},0)
|
||||
$(call check_dep, \
|
||||
"hsavmcore", \
|
||||
"systemd/sd-daemon.h", \
|
||||
"systemd-devel or libsystemd-dev", \
|
||||
"HAVE_SYSTEMD=0")
|
||||
endif
|
||||
|
||||
hsavmcore: $(OBJECTS) $(libs)
|
||||
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
|
||||
Reference in New Issue
Block a user