diff --git a/CHANGELOG.md b/CHANGELOG.md index e62b016c..3707d73c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Release history for s390-tools (MIT version) Changes of existing tools: - dbginfo.sh: rework crypto data collection - dbginfo.sh: add nstat for network and SNMP stats + - `pkg-config` is now mandatory for the build process Bug Fixes: diff --git a/README.md b/README.md index 2dbdb40d..f558dfdd 100644 --- a/README.md +++ b/README.md @@ -325,8 +325,8 @@ This table lists additional build or install options: | initramfs-tools | `HAVE_INITRAMFS` | zdev, zipl | | | `ZDEV_ALWAYS_UPDATE_INITRD` | zdev | -The s390-tools build process uses "pkg-config" if available and hard-coded -compiler and linker options otherwise. +The s390-tools build process uses "pkg-config" and therefore it must be +available. Build and runtime requirements for specific tools ------------------------------------------------- diff --git a/cmsfs-fuse/Makefile b/cmsfs-fuse/Makefile index 4ebe6b11..a77206bd 100644 --- a/cmsfs-fuse/Makefile +++ b/cmsfs-fuse/Makefile @@ -22,13 +22,8 @@ check_dep: all: check_dep cmsfs-fuse -ifneq ($(shell sh -c 'command -v pkg-config'),) FUSE_CFLAGS = $(shell pkg-config --silence-errors --cflags fuse3) FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse3) -else -FUSE_CFLAGS = -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse3 -FUSE_LDLIBS = -lfuse3 -endif ALL_CFLAGS += -DHAVE_SETXATTR $(FUSE_CFLAGS) LDLIBS += $(FUSE_LDLIBS) -lm diff --git a/dasdview/Makefile b/dasdview/Makefile index af52be56..4e54821f 100644 --- a/dasdview/Makefile +++ b/dasdview/Makefile @@ -16,13 +16,8 @@ check_dep: BUILDTARGET = check_dep -ifneq ($(shell sh -c 'command -v pkg-config'),) CURL_CFLAGS = $(shell pkg-config --silence-errors --cflags libcurl) CURL_LDLIBS = $(shell pkg-config --silence-errors --libs libcurl) -else -CURL_CFLAGS = -I/usr/include/s390x-linux-gnu/curl -CURL_LDLIBS = -lcurl -endif # shell endif # HAVE_CURL diff --git a/genprotimg/src/Makefile b/genprotimg/src/Makefile index 6c80ed25..a59ff935 100644 --- a/genprotimg/src/Makefile +++ b/genprotimg/src/Makefile @@ -36,21 +36,12 @@ ALL_CPPFLAGS += $(INCLUDE_PARMS) LDLIBS += $(GLIB2_LIBS) $(LIBCRYPTO_LIBS) $(LIBCURL_LIBS) -ifneq ($(shell sh -c 'command -v pkg-config'),) GLIB2_CFLAGS := $(shell pkg-config --silence-errors --cflags glib-2.0) GLIB2_LIBS := $(shell pkg-config --silence-errors --libs glib-2.0) LIBCRYPTO_CFLAGS := $(shell pkg-config --silence-errors --cflags libcrypto) LIBCRYPTO_LIBS := $(shell pkg-config --silence-errors --libs libcrypto) LIBCURL_CFLAGS := $(shell pkg-config --silence-errors --cflags libcurl) LIBCURL_LIBS := $(shell pkg-config --silence-errors --libs libcurl) -else -GLIB2_CFLAGS := -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -GLIB2_LIBS := -lglib-2.0 -LIBCRYPTO_CFLAGS := -LIBCRYPTO_LIBS := -lcrypto -LIBCURL_CFLAGS := -LIBCURL_LIBS := -lcurl -endif BUILD_TARGETS := skip-$(bin_PROGRAM) INSTALL_TARGETS := skip-$(bin_PROGRAM) diff --git a/hmcdrvfs/Makefile b/hmcdrvfs/Makefile index 46afc5e2..3908ca35 100644 --- a/hmcdrvfs/Makefile +++ b/hmcdrvfs/Makefile @@ -19,13 +19,8 @@ check_dep: "fuse3-devel or libfuse3-dev", \ "HAVE_FUSE=0") -ifneq ($(shell sh -c 'command -v pkg-config'),) FUSE_CFLAGS = $(shell pkg-config --silence-errors --cflags fuse3) FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse3) -else -FUSE_CFLAGS = -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse3 -FUSE_LDLIBS = -lfuse3 -endif ALL_CFLAGS += -DFUSE_USE_VERSION=30 -D_LARGEFILE_SOURCE $(FUSE_CFLAGS) LDLIBS += $(FUSE_LDLIBS) -lpthread -lrt -ldl -lm diff --git a/hsavmcore/Makefile b/hsavmcore/Makefile index 666f0c0e..4d3deb98 100644 --- a/hsavmcore/Makefile +++ b/hsavmcore/Makefile @@ -22,26 +22,16 @@ else # HAVE_FUSE # # FUSE # -ifneq ($(shell sh -c 'command -v pkg-config'),) - FUSE_CFLAGS = $(shell pkg-config --silence-errors --cflags fuse3) - FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse3) -else - FUSE_CFLAGS = -I/usr/include/fuse3 - FUSE_LDLIBS = -lfuse3 -endif +FUSE_CFLAGS = $(shell pkg-config --silence-errors --cflags fuse3) +FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse3) # # systemd # ifneq (${HAVE_SYSTEMD},0) 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 + SYSTEMD_CFLAGS = $(shell pkg-config --silence-errors --cflags libsystemd) + SYSTEMD_LDLIBS = $(shell pkg-config --silence-errors --libs libsystemd) ALL_CPPFLAGS += -DHAVE_SYSTEMD else $(warning "systemd support disabled") diff --git a/libpv/Makefile b/libpv/Makefile index 9bd0dbd3..3ee27868 100644 --- a/libpv/Makefile +++ b/libpv/Makefile @@ -5,21 +5,12 @@ include ../common.mak LIB := libpv.a -ifneq ($(shell sh -c 'command -v pkg-config'),) GLIB2_CFLAGS := $(shell pkg-config --silence-errors --cflags glib-2.0) GLIB2_LIBS := $(shell pkg-config --silence-errors --libs glib-2.0) LIBCRYPTO_CFLAGS := $(shell pkg-config --silence-errors --cflags libcrypto) LIBCRYPTO_LIBS := $(shell pkg-config --silence-errors --libs libcrypto) LIBCURL_CFLAGS := $(shell pkg-config --silence-errors --cflags libcurl) LIBCURL_LIBS := $(shell pkg-config --silence-errors --libs libcurl) -else -GLIB2_CFLAGS := -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -GLIB2_LIBS := -lglib-2.0 -LIBCRYPTO_CFLAGS := -LIBCRYPTO_LIBS := -lcrypto -LIBCURL_CFLAGS := -I/usr/include/s390x-linux-gnu -LIBCURL_LIBS := -lcurl -endif LDLIBS += $(GLIB2_LIBS) $(LIBCRYPTO_LIBS) $(LIBCURL_LIBS) WARNINGS := -Wall -Wextra -Wshadow \ diff --git a/pvattest/src/Makefile b/pvattest/src/Makefile index d0aef3d2..458212cb 100644 --- a/pvattest/src/Makefile +++ b/pvattest/src/Makefile @@ -28,21 +28,12 @@ $(BIN_PROGRAM)_SRCS := \ $(BIN_PROGRAM)_OBJS := $($(BIN_PROGRAM)_SRCS:.c=.o) -ifneq ($(shell sh -c 'command -v pkg-config'),) GLIB2_CFLAGS := $(shell pkg-config --silence-errors --cflags glib-2.0) GLIB2_LIBS := $(shell pkg-config --silence-errors --libs glib-2.0) LIBCRYPTO_CFLAGS := $(shell pkg-config --silence-errors --cflags libcrypto) LIBCRYPTO_LIBS := $(shell pkg-config --silence-errors --libs libcrypto) LIBCURL_CFLAGS := $(shell pkg-config --silence-errors --cflags libcurl) LIBCURL_LIBS := $(shell pkg-config --silence-errors --libs libcurl) -else -GLIB2_CFLAGS := -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -GLIB2_LIBS := -lglib-2.0 -LIBCRYPTO_CFLAGS := -LIBCRYPTO_LIBS := -lcrypto -LIBCURL_CFLAGS := -I/usr/include/s390x-linux-gnu -LIBCURL_LIBS := -lcurl -endif ALL_CFLAGS += -std=gnu11 \ -DPKGDATADIR=$(PKGDATADIR) \ diff --git a/zdsfs/Makefile b/zdsfs/Makefile index 979329b0..aeb511f5 100644 --- a/zdsfs/Makefile +++ b/zdsfs/Makefile @@ -39,17 +39,10 @@ check_dep: "curl-devel or libcurl-dev", \ "HAVE_CURL=0") -ifneq ($(shell sh -c 'command -v pkg-config'),) FUSE_CFLAGS = $(shell pkg-config --silence-errors --cflags fuse3) FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse3) CURL_CFLAGS = $(shell pkg-config --silence-errors --cflags libcurl) CURL_LDLIBS = $(shell pkg-config --silence-errors --libs libcurl) -else -FUSE_CFLAGS = -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse3 -FUSE_LDLIBS = -lfuse3 -CURL_CFLAGS = -I/usr/include/s390x-linux-gnu/curl -CURL_LDLIBS = -lcurl -endif ALL_CPPFLAGS += -DSYSFS ALL_CFLAGS += -DHAVE_SETXATTR -pthread $(FUSE_CFLAGS) $(CURL_CFLAGS) LDLIBS += $(FUSE_LDLIBS) $(CURL_LDLIBS) -lpthread -lrt -lm diff --git a/zdump/Makefile b/zdump/Makefile index 6538ef80..8b0462f0 100644 --- a/zdump/Makefile +++ b/zdump/Makefile @@ -79,17 +79,10 @@ OBJECTS = zgetdump.o opts.o zg.o zg_error.o zg_print.o \ ngdump.o dt_ngdump.o dfi_ngdump.o dfi_vmdump.o \ pv_utils.o -ifneq ($(shell sh -c 'command -v pkg-config'),) GLIB2_CFLAGS := $(shell pkg-config --silence-errors --cflags glib-2.0) GLIB2_LIBS := $(shell pkg-config --silence-errors --libs glib-2.0) LIBCRYPTO_CFLAGS := $(shell pkg-config --silence-errors --cflags libcrypto) LIBCRYPTO_LIBS := $(shell pkg-config --silence-errors --libs libcrypto) -else -GLIB2_CFLAGS := -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -GLIB2_LIBS := -lglib-2.0 -LIBCRYPTO_CFLAGS := -LIBCRYPTO_LIBS := -lcrypto -endif LIBPV = $(rootdir)/libpv/libpv.a LIBPV_CFLAGS := -DOPENSSL_API_COMPAT=0x10100000L \ @@ -101,12 +94,9 @@ LIBPV_LIBS := $(GLIB2_LIBS) $(LIBCRYPTO_LIBS) ifeq ("$(HAVE_FUSE)","0") FUSE_CFLAGS = -DHAVE_FUSE=0 -D_FILE_OFFSET_BITS=64 FUSE_LDLIBS = -else ifneq ($(shell sh -c 'command -v pkg-config'),) +else FUSE_CFLAGS = -DHAVE_FUSE=1 $(shell pkg-config --silence-errors --cflags fuse3) FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse3) -else -FUSE_CFLAGS = -DHAVE_FUSE=1 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse3 -FUSE_LDLIBS = -lfuse3 endif LDLIBS += -lz $(FUSE_LDLIBS) $(LIBPV_LIBS) ALL_CFLAGS += $(FUSE_CFLAGS) $(LIBPV_CFLAGS)