From 73cad5c90344f5ad2c980846760aa3026667bd8a Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 2 Aug 2025 12:35:41 +0200 Subject: [PATCH] configure.ac, Makefile.am: Propagate ./configure flags to 'distcheck' 'make distcheck' runs ./configure (among other things). That command should inherit the flags passed on the command line, as they are the flags necessary to build in the current system. This also allows testing different configurations in the same system. Until now, we only tested the default automagic configuration. With this change, one can test the same default automagic configuration, by not passing any flags to ./configure, or they can test more specific configurations, by passing flags. This allows removing the hardcoded AM_DISTCHECK_CONFIGURE_FLAGS in the "Makefile.am". Signed-off-by: Alejandro Colomar --- Makefile.am | 2 -- configure.ac | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 778d2ea7..00e1fcbc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,6 @@ ## Process this file with automake to produce Makefile.in ACLOCAL_AMFLAGS = -I m4 -AM_DISTCHECK_CONFIGURE_FLAGS = --disable-logind - SUBDIRS = lib if ENABLE_SUBIDS diff --git a/configure.ac b/configure.ac index 71697e7a..3591abce 100644 --- a/configure.ac +++ b/configure.ac @@ -14,6 +14,8 @@ AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.11 foreign dist-xz subdir-objects tar-pax]) AM_SILENT_RULES([yes]) +AC_SUBST([AM_DISTCHECK_CONFIGURE_FLAGS], ["$ac_configure_args"]) + AC_SUBST([LIBSUBID_ABI_MAJOR], [libsubid_abi_major]) AC_SUBST([LIBSUBID_ABI_MINOR], [libsubid_abi_minor]) AC_SUBST([LIBSUBID_ABI_MICRO], [libsubid_abi_micro])