From aedb8a5b009037c22a09cf492a12967453d9b848 Mon Sep 17 00:00:00 2001 From: Georgia Garcia Date: Mon, 4 Mar 2024 10:27:34 -0300 Subject: [PATCH] libapparmor: check if AX_CHECK_COMPILE_FLAG is available The error message when autoconf-archive is not installed is not very intuitive: ./configure: line 14422: EXTRA_WARNINGS: command not found ./configure: line 14423: syntax error near unexpected token `-flto-partition=none,' ./configure: line 14423: `AX_CHECK_COMPILE_FLAG(-flto-partition=none, , , -Werror)' So, check if AX_CHECK_COMPILE_FLAG is defined and if not, complain that autoconf-archive is missing. Signed-off-by: Georgia Garcia --- libraries/libapparmor/configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/libapparmor/configure.ac b/libraries/libapparmor/configure.ac index 46c47957f..de577bd59 100644 --- a/libraries/libapparmor/configure.ac +++ b/libraries/libapparmor/configure.ac @@ -92,6 +92,7 @@ if test "$ac_cv_prog_cc_c99" = "no"; then AC_MSG_ERROR([C99 mode is required to build libapparmor]) fi +m4_ifndef([AX_CHECK_COMPILE_FLAG], [AC_MSG_ERROR(['autoconf-archive' missing])]) EXTRA_CFLAGS="-Wall $(EXTRA_WARNINGS) -fPIC" AX_CHECK_COMPILE_FLAG([-flto-partition=none], , , [-Werror]) AS_VAR_IF([ax_cv_check_cflags__Werror__flto_partition_none], [yes],