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 <alx@kernel.org>
This commit is contained in:
Alejandro Colomar 2025-08-02 12:35:41 +02:00 committed by Serge Hallyn
parent e562faf109
commit 73cad5c903
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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])