summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald van Dijk <[email protected]>2020-07-01 17:05:21 +0100
committerGitHub <[email protected]>2020-07-01 09:05:21 -0700
commit22831636c8c132c62c771c64e7131b422e41be34 (patch)
treefed50b3c1ea330abc87b879df93bdd9d7dc7a8a4
parent2ac6aa117603d5856b172114dcc62c454dafddb1 (diff)
configure fixes
a+=b is not supported by all shells. It is equivalent to a=${a}b, so just rewrite it as that. This also fixes commit 9ea6c3d3, which intended to only make the definitions of _dracutdir, _udevdir, and _udevruledir conditional, but actually ensured that _initconfdir no longer got defined if _dracutdir was defined, and defined _udevdir to the value that should have been used for _udevruledir. This also fixes the fact that the checks introduced by commit 9ea6c3d3 could never work: ZFS_AC_PACKAGE was called before the configuration options were processed. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Harald van Dijk <[email protected]> Closes #10518
-rw-r--r--config/zfs-build.m438
-rw-r--r--configure.ac2
2 files changed, 20 insertions, 20 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
index 93bef19ff..19625a7b0 100644
--- a/config/zfs-build.m4
+++ b/config/zfs-build.m4
@@ -110,7 +110,7 @@ AC_DEFUN([ZFS_AC_DEBUG_KMEM], [
[enable_debug_kmem=no])
AS_IF([test "x$enable_debug_kmem" = xyes], [
- KERNEL_DEBUG_CPPFLAGS+=" -DDEBUG_KMEM"
+ KERNEL_DEBUG_CPPFLAGS="${KERNEL_DEBUG_CPPFLAGS} -DDEBUG_KMEM"
DEBUG_KMEM_ZFS="_with_debug_kmem"
], [
DEBUG_KMEM_ZFS="_without_debug_kmem"
@@ -140,7 +140,7 @@ AC_DEFUN([ZFS_AC_DEBUG_KMEM_TRACKING], [
[enable_debug_kmem_tracking=no])
AS_IF([test "x$enable_debug_kmem_tracking" = xyes], [
- KERNEL_DEBUG_CPPFLAGS+=" -DDEBUG_KMEM_TRACKING"
+ KERNEL_DEBUG_CPPFLAGS="${KERNEL_DEBUG_CPPFLAGS} -DDEBUG_KMEM_TRACKING"
DEBUG_KMEM_TRACKING_ZFS="_with_debug_kmem_tracking"
], [
DEBUG_KMEM_TRACKING_ZFS="_without_debug_kmem_tracking"
@@ -261,10 +261,10 @@ AC_DEFUN([ZFS_AC_RPM], [
])
RPM_DEFINE_COMMON='--define "$(DEBUG_ZFS) 1"'
- RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_ZFS) 1"'
- RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_TRACKING_ZFS) 1"'
- RPM_DEFINE_COMMON+=' --define "$(DEBUGINFO_ZFS) 1"'
- RPM_DEFINE_COMMON+=' --define "$(ASAN_ZFS) 1"'
+ RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(DEBUG_KMEM_ZFS) 1"'
+ RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(DEBUG_KMEM_TRACKING_ZFS) 1"'
+ RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(DEBUGINFO_ZFS) 1"'
+ RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(ASAN_ZFS) 1"'
RPM_DEFINE_UTIL=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
@@ -274,20 +274,20 @@ AC_DEFUN([ZFS_AC_RPM], [
dnl # ./configure --with-config=srpm
dnl #
AS_IF([test -n "$dracutdir" ], [
- RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)"'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_dracutdir $(dracutdir)"'
])
AS_IF([test -n "$udevdir" ], [
- RPM_DEFINE_UTIL+=' --define "_udevdir $(udevdir)"'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_udevdir $(udevdir)"'
])
AS_IF([test -n "$udevruledir" ], [
- RPM_DEFINE_UTIL+=' --define "_udevdir $(udevruledir)"'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_udevruledir $(udevruledir)"'
])
- RPM_DEFINE_UTIL+=' $(DEFINE_INITRAMFS)'
- RPM_DEFINE_UTIL+=' $(DEFINE_SYSTEMD)'
- RPM_DEFINE_UTIL+=' $(DEFINE_PYZFS)'
- RPM_DEFINE_UTIL+=' $(DEFINE_PAM)'
- RPM_DEFINE_UTIL+=' $(DEFINE_PYTHON_VERSION)'
- RPM_DEFINE_UTIL+=' $(DEFINE_PYTHON_PKG_VERSION)'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_INITRAMFS)'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_SYSTEMD)'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYZFS)'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PAM)'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYTHON_VERSION)'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYTHON_PKG_VERSION)'
dnl # Override default lib directory on Debian/Ubuntu systems. The
dnl # provided /usr/lib/rpm/platform/<arch>/macros files do not
@@ -299,14 +299,14 @@ AC_DEFUN([ZFS_AC_RPM], [
dnl #
AS_IF([test "$DEFAULT_PACKAGE" = "deb"], [
MULTIARCH_LIBDIR="lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
- RPM_DEFINE_UTIL+=' --define "_lib $(MULTIARCH_LIBDIR)"'
+ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_lib $(MULTIARCH_LIBDIR)"'
AC_SUBST(MULTIARCH_LIBDIR)
])
RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"'
- RPM_DEFINE_KMOD+=' --define "ksrc $(LINUX)"'
- RPM_DEFINE_KMOD+=' --define "kobj $(LINUX_OBJ)"'
- RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"'
+ RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "ksrc $(LINUX)"'
+ RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kobj $(LINUX_OBJ)"'
+ RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "_wrong_version_format_terminate_build 0"'
RPM_DEFINE_DKMS=''
diff --git a/configure.ac b/configure.ac
index 861c02e61..e405ddb57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,8 +55,8 @@ AX_CODE_COVERAGE
_AM_PROG_TAR(pax)
ZFS_AC_LICENSE
-ZFS_AC_PACKAGE
ZFS_AC_CONFIG
+ZFS_AC_PACKAGE
ZFS_AC_DEBUG
ZFS_AC_DEBUGINFO
ZFS_AC_DEBUG_KMEM