build: break autotools configuration to warn about deprecation

We are planning on completely dropping Autotools in the future.
This breaks the build process with an argument to ignore the deprecation,
so that anyone building NM is warned of this change.

(cherry picked from commit d115dcec50)
This commit is contained in:
Jan Vaclav 2024-04-29 11:22:54 +02:00
parent 8be0ba422d
commit c3a050bad1
4 changed files with 22 additions and 1 deletions

View File

@ -159,6 +159,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--enable-ifcfg-rh \
--enable-ifupdown \
--disable-dependency-tracking \
--disable-autotools-deprecation \
$(NULL)
dist-configure-check:

5
NEWS
View File

@ -8,6 +8,11 @@ subject to change and not guaranteed to be compatible with
the later release.
USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
* Building with autotools is now deprecated and will be completely removed
in the next development cycle. We recommend using meson to build
NetworkManager -- for basic setup, see the CONTRIBUTING.md file.
To ignore this deprecation and still build with Autotools, you can specify
the '--disable-autotools-deprecation' argument when configuring.
* Support changing the OpenSSL ciphers for 802.1X authentication via
connection property "802-1x.openssl-ciphers".
* The reason why a device is unmanaged is now properly set in the

View File

@ -16,6 +16,20 @@ AC_INIT([NetworkManager], [nm_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager],
[NetworkManager])
deprecation_message() {
echo "Building with Autotools is deprecated; meson is the recommended way to build NetworkManager."
echo "To learn more, see the CONTRIBUTING.md file."
echo "To ignore this, pass '--disable-autotools-deprecation' when configuring."
exit 1
}
AC_ARG_ENABLE([autotools-deprecation],
AS_HELP_STRING([--disable-autotools-deprecation],
[Building with autotools is deprecated, passing this argument overrides this error.]),
[ test "$enableval" != "no" && deprecation_message ],
[ deprecation_message ]
)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])

View File

@ -918,7 +918,8 @@ autoreconf --install --force
--with-resolvconf=no \
--with-netconfig=no \
--with-config-dns-rc-manager-default=%{dns_rc_manager_default} \
--with-config-logging-backend-default=%{logging_backend_default}
--with-config-logging-backend-default=%{logging_backend_default} \
--disable-autotools-deprecation
%make_build