From 566c9f5ad5b3b27f221e1cd4a8d7ca48c8438aa9 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sat, 12 Dec 2015 03:43:45 +0000 Subject: [PATCH 1/2] build-sys: fix ./configure --enable-smack Fixes: $ ./configure ... --enable-smack $ make src/core/load-fragment-gperf.c $ grep -i smack src/core/load-fragment-gperf.c {"Swap.SmackProcessLabel", config_parse_warn_compat, DISABLED_CONFIGURATION, 0}, ... should be {"Swap.SmackProcessLabel", config_parse_exec_smack_process_label, 0, offsetof(Swap, exec_context)}, ... --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c2222c376cf..0160d104561 100644 --- a/configure.ac +++ b/configure.ac @@ -668,7 +668,7 @@ AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK esac], [have_smack=auto]) -if test "x${have_smack}" = xauto; then +if test "x${have_smack}" != xno; then M4_DEFINES="$M4_DEFINES -DHAVE_SMACK" have_smack=yes fi From c0957da3f4cc2a0fe0d8e0c03e695b99cf132718 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sat, 12 Dec 2015 06:08:25 +0000 Subject: [PATCH 2/2] build-sys: refactor `have_smack` detection --- configure.ac | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 0160d104561..3128ca86727 100644 --- a/configure.ac +++ b/configure.ac @@ -669,10 +669,13 @@ AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK [have_smack=auto]) if test "x${have_smack}" != xno; then + AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available]) M4_DEFINES="$M4_DEFINES -DHAVE_SMACK" have_smack=yes fi +AM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"]) + have_smack_run_label=no AC_ARG_WITH(smack-run-label, AS_HELP_STRING([--with-smack-run-label=STRING], @@ -690,12 +693,6 @@ AS_HELP_STRING([--with-smack-default-process-label=STRING], [AC_DEFINE_UNQUOTED(SMACK_DEFAULT_PROCESS_LABEL, ["$withval"], [Default SMACK label for executed processes])], []) -if test "x${have_smack}" = xyes ; then - AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available]) -fi - -AM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"]) - # ------------------------------------------------------------------------------ AC_ARG_ENABLE([gcrypt], AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),